link error

Duan Wang duanwang@alcatel-lucent.com
Wed Apr 1 13:23:00 GMT 2009


Hi gcc experts,

I try to compile a sample .c file that communicates with the GPIB 
interface (see attached c file) by using
GCC type of compilers, such as cygwin, Dev-Cpp, MinGW, and C-Free4. Then 
I got the same sort
of error messages - the low level drivers were not found, see the log below:

gcc.exe "C:\Program Files\Agilent\IO Libraries 
Suite\ProgrammingSamples\C\VISA\idn.c" -o "C:\Program Files\Agilent\IO 
Libraries Suite\ProgrammingSamples\C\VISA\idn.exe"   -ansi  
-I"C:\Program Files\VXIPNP\WINNT\include"   -L"C:\Program 
Files\VXIPNP\WINNT\lib\msc"
C:\DOCUME~1\duanwang\LOCALS~1\Temp/ccOycaaa.o(.text+0x59):idn.c: 
undefined reference to `viOpenDefaultRM@4'
C:\DOCUME~1\duanwang\LOCALS~1\Temp/ccOycaaa.o(.text+0x86):idn.c: 
undefined reference to `viOpen@20'
C:\DOCUME~1\duanwang\LOCALS~1\Temp/ccOycaaa.o(.text+0x9c):idn.c: 
undefined reference to `viPrintf'
C:\DOCUME~1\duanwang\LOCALS~1\Temp/ccOycaaa.o(.text+0xb9):idn.c: 
undefined reference to `viScanf'
C:\DOCUME~1\duanwang\LOCALS~1\Temp/ccOycaaa.o(.text+0xda):idn.c: 
undefined reference to `viClose@4'
C:\DOCUME~1\duanwang\LOCALS~1\Temp/ccOycaaa.o(.text+0xe8):idn.c: 
undefined reference to `viClose@4'
collect2: ld returned 1 exit status

The low level drivers, such as viPrintf and viScanf  are in the file of 
visa32.lib that is seated in the directory of ...\lib\msc.
I mean the drivers are sit there but he compiler complains that the 
drivers were not found. And the same error happens
either in windows application or in DOS window. Is there something 
wrong? Please advise. What I expect is to produce
an .exe file that will talk to the instrument that is connected with the 
pc with a GPIB interface.

Thanks,

Duan Wang
Alcatel-Lucent
978-952-7057
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: idn.c
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20090401/f99749b3/attachment.c>


More information about the Gcc-help mailing list