After far too long without a proper way to build our applications from the command line in VO 2.7 we’ve finally created a program to do that.
There was one hitch we had when building our program; getting the Assembler to compile the modules that needed compiling. We use the VO27NASM.DLL plug in which is essentially just NASM embedded into a dll to compile some assembler code.
There were 2 problems with the assembler code. The first was that after importing the AEF the assembly code wouldn’t compile, even from within VO itself. This turns out to be because they weren’t imported as source code entities. We fixed that by replacing those entities with an identical entity that we created as a source entity. Once we’d done that the application could be built from within the IDE.
The second problem was that compiling from Adam within our app didn’t work. To fix that we just needed to call SubSysInit in the CAVOSSYS . This loads in the plug-ins like the assembler.
This is the import you need for the SubSysInit function. You can call it with all 0’s.
_DLL FUNC SubSysInit (hMenu AS PTR, uiFirstMenuID AS DWORD, wMenuCount AS DWORD) AS LOGIC STRICT:CAVOSSYS._SubSysInit@12
We haven’t tried VO 2.5, 2.6 or2.8 yet but I’m guessing that it should all be essentially the same.
Note: VO refers to CA Visual Objects – http://www.cavo.com/. If you don’t know it don’t worry about it!
colinnewell said
I just realised it’s probably worth calling SubSysExit too. The prototype for that is as follows,
_DLL FUNC SubSysExit () AS VOID STRICT:CAVOSSYS._SubSysExit@0