03-21-2012 01:18 PM
Is there some kind of compatibility option I can use to load .obj files created from an older version of LabWindows (in this case 4.0) ?
03-22-2012 11:26 AM
Hi seanmu13,
I just tested it myself, and I had no trouble using an object file created using CVI 4.0 for Visual C/C++. Do you know what compiler this object file was created for? I believe 4.0 is capable of creating .obj files for msvc, borland, symantec, and watcom so it may have been created for one of these. Is there a specific error message you received?
03-27-2012 10:33 AM
I'm not sure what compiler was used for this object file, but I'm starting to believe it's a DLL file being referenced that is giving us trouble. The specific error is while calling RunExternalModule. I get an error return code of -5 (Undefined References), although I'm not sure what that means for my program.
03-27-2012 11:22 AM
Hi seanmu13,
So you are actually getting the program to compile and run and it errors out during runtime? This indicates that you are using the proper compiler, but you may be correct about it not being able to find a DLL import LIB or another OBJ that is trying to be loaded.
03-27-2012 11:56 AM
Yes, that is correct, the program compiles but throws an error during runtime.
03-27-2012 12:11 PM
Hi seanmu13,
It does indeed sound like that OBJ is trying to load and call an external module. Without the source code, it makes figuring out what it is trying to load a bit tricky. You may be able to attach an external debugger to the process to see what resource it is trying to load. I am not sure how extensive this piece of code is, but you may be better off rewriting this portion.
04-02-2012 11:49 AM
You could try calling GetExternalModuleAddrEx before calling RunExternalModule. That function allows you to pass in a buffer that is filled with the names of any unresolved symbols. You'll have to pass GetExternalModuleAddrEx the name of an external symbol in the module; you should be able to pass _foo_entry_point (if the file were named FOO.obj).
Mert