LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Question with Function GetCompName();

Solved!
Go to solution

I am having some trouble when try to use the 2013 CVI function.

 

in the main routine I include the hearder file of GetCompName();

#include "toolbox.h"

defined the variable with 

char ComputerName[MAX_COMPNAME_LEN]; 

 

and in Main.c I just put GetCompName(ComputerName);

but I keep getting the error message:  error: Undefined symbol '_GetCompName@4' referenced in "f:\XXX\Test\cvibuild.test\Debug\test.obj".  everything is fine if I comment out the section of GetCompName(ComputerName);

 

Is there anything I missed?  Or is it because the system have compatible issue? I am using Windows 7 64bit environment.

 

0 Kudos
Message 1 of 6
(4,859 Views)

Hello,

 

this function GetCompName() belongs to the Programmer's Toolbox, so you need to include the respective include file

 

include <toolbox.h>

0 Kudos
Message 2 of 6
(4,853 Views)

Hi Wolfgang,

 

Thank you for the reply, I did include the library before using it with #include "toolbox.h"

But the error remains.

0 Kudos
Message 3 of 6
(4,851 Views)
Solution
Accepted by topic author Silverwolfman

You also will need to add the library to your project. This can be done in two ways:

 

- Use the Library / Customize menu to add \toolslib\toolbox\toolbox.fp to your libraries

or

- Use Edit / Add Files to Project to add toolbox.fp to your project

 

Message 4 of 6
(4,849 Views)

Thank you for the help!

 

That works.

 

0 Kudos
Message 5 of 6
(4,843 Views)

My pleasure Smiley Happy

0 Kudos
Message 6 of 6
(4,832 Views)