LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Link problem when using interactive window with external libraries

I have a problem using a library created with MS VC++ within the interactive Window in Labwindows/CVI 6.0.
If I use a function exported from that library in a test program it compiles and links and runs perfectly.
The testprogram show like that:
#include "library.h"
int main (void) {
// ...some code
library_function();
// ... some code
}
But if I create a function panel with a function which uses that library function and try to run the function panel it fails with a "Interactive execution link error" "Undefined Symbol 'library function' referenced in 'Source.c'
The source code looks like that
#include "library.h"
int main (void) {}
void my_FP_function(void) {
// ...some code
library_f
unction();
// ... some code
}
In both cases the library.lib is included in the project.
Any ideas why the interactive windows doesn't link ?
0 Kudos
Message 1 of 5
(3,462 Views)
Markus,

CVI will not include the files from the project to the interactive window by defaul. You need to set that option in the environment options.

Just go to Options >> Environment.. and check the option "Force Project Files into Interactive Window; this should fix the linker problems.

Regards,

Juan Carlos
N.I.
Message 2 of 5
(3,461 Views)
There is no such option in CVI 6.0
There are the options
"Force Project compiled Source Files into Interactive Windows" and "Force Loaded Instrument drivers'Source into interactive Windows"
Enabling both options makes no difference. The linker problem still exists.
0 Kudos
Message 3 of 5
(3,461 Views)
You are right, the option that I mentioned is new to CVI 7.0 however checking the 2 options that you mention should allow you to run the functions.

Have you reopen CVI and recopiled your FP since those options were checked?

I'll do some more research here to see if there is anything missing. I'll let you know.

Regards,

Juan Carlos
N.I.
0 Kudos
Message 4 of 5
(3,461 Views)
Reopening CVI and recompiling the FP after changing the options don't make a difference,too.
Then I moved to another PC with a fresh installion of Windows NT SP6a and CVI-6.0, which didn't change anything.
I also tried to write a wrapper around that library
build an object file with the wrapper, included that wrapper object file into the project and now the functions in the wrapper object file weren't found by the linker. So it seems, that the linker in the interactive window doesn't link anything but the standard CVI libraries.
0 Kudos
Message 5 of 5
(3,462 Views)