Compiling .gxc at Visual Studio
FarzadGholamian
Posts: 6
in Oasis montaj
Hello there,
Can I compile the .gxc file in Visual Studio? And add the header files directory (gxh files) and set the compilers (gxc.exe or grc.exe). Thank you
Can I compile the .gxc file in Visual Studio? And add the header files directory (gxh files) and set the compilers (gxc.exe or grc.exe). Thank you
Tagged:
0
Best Answer
-
Hi, yes you can compile a GXC, but not in Visual studio. Follow the instructions in this link: Geosoft GX Language - GX Developer 9.8 - Confluence (atlassian.net)
0
Answers
-
Hi, I could compile a GXC outside of VS, but my question is about inside VS, and you said it's impossible. Thank you.0
-
Hi,
As Elizabeth mentioned already, you can compile a GXC, not really directly with VS compiler.
By not directly I mean that you still need GXC compiler (gxc.exe and grc.exe) and associated environment to be configured, which you already had since you could compile a GXC outside VS.
You can use Visual Studio to create, for example, an empty C# project, include all GXCs that you want to develop, and use the Custom Build resources of VS to compile the corresponding GXs.
For each GX you add the two files (one .GXC and one .GRC, the last of course only if you need a dialog to be created for it), and select Custom Build, e.g. right click on .GRC file (then on .GXC) and set:
Configuration Properties->General->Item Type-> Custom Build Tool
Then in Custom Build Tool -> General->Command Line, enter
- for newGX.grc the text from below:
grc %(Identity)
- for newGX.gxc the text from below:
gxc %(Identity)
where newGX is the name of the new GX that you want implemented.
On both files, set in Custom Build Tool -> General:
- Outputs: write something (it doesn't matter what, I wrote: "don't bother")
- Link Objects: No
Then compile first testNewGX.grc, then testNewGX.gxc (e.g. right click on the filename from Solution Explorer, and select Compile).
After compilation, you may check the messages listed in Error List and Output.
Of course, you may get more sophisticated and organize the above so that you can serialize, prioritize, set dependencies etc, use many useful resources in VS to build many GX's at once and maintain them more easily.
0 -
Thank you for the information. The reason that I wanted to use VS was to track the problems. I don't know if this is good why for that or not. I will try the way that you mention to see how it works. Thank you again.0
-
I am not sure if you want to track a specific issue (in a recent GX that you try to develop) or in general for any GX.
Visual Studio may be helpful to organize your GX development, including editing code, automate complex GX compilation steps and surely developing your own standalone programs that use OM libraries (which you can debug directly in VS).
But if you want VS to debug a GX that I can't tell. I can only suggest you use GX Developer Debugger for GX runtime (though I believe you do that) along with VS as an editor aside.0