LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

GetExternalModuleAddrEx returns a -5 only through an executable, not debug mode

What are the circumstances that would cause GetExternalModuleAddrEx to return a -5 (undefined references) for a function when the executable is run, but return a 0 when running in debug mode?

 

I have a Test Executive that runs tests through a series of object files listed in a sequence file. One of these tests returns the 'undefined references' error when the Test Exec executable is run. If I run the Test Exec in debug mode through CVI 5.0.1 no error is found.

0 Kudos
Message 1 of 5
(3,626 Views)
I'm not sure what is going on, but you can use the options parameter.  Pass GETEXTMODADDR_OPTIONS_LIST_UNDEFINED to obtain a list of the undefined symbols if this function fails because of undefined symbols.

This will at least let you know which symbols are undefined, then you can look into what the differences might be between the executable and the debug version.  Might they be using different versions of the library that you're loading?

Mark E.
National Instruments

0 Kudos
Message 2 of 5
(3,596 Views)
Is GETEXTMODADDR_OPTIONS_LIST_UNDEFINED available in 5.0.1? From looking around, it seems to be an option only to GetExternalModuleAddrEx, which isn't included with CVI 5.0.1.
0 Kudos
Message 3 of 5
(3,592 Views)
I did make one mistake with my original post. The error is occurring in 'GetExternalModuleAddr', not 'GetExternalModuleAddrEx'.
0 Kudos
Message 4 of 5
(3,588 Views)

The functionality you need is in the GetExternalModuleAddrEx, which was released in CVI version 5.5, according to The CVI 5.5 Release Notes.  The Ex stands for Extended.

 


Mark E.
National Instruments

0 Kudos
Message 5 of 5
(3,564 Views)