Hi, I am using gcc under cygwin, trying to compile with a 3rd party dll. (CEI22032.dll) I used imdef to create the definitions file (condor.def). I used dlltool to create condor.a. I used gcc to compile foo.c and link. I get the error message foo.o(.text+0x31):foo.c: undefined reference to `_ar_version@4' I used od -c on foo.o and indeed the _ar_version@4 is in foo.o I thought the -U to ddl_tool would prepend the "_" to the definitions and that --kill-at to gcc would get rid of the @4 Any ideas what I am doing wrong? Thanks Don Shugard gcc -v Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/specs Configured with: /gcc/gcc-3.3.3-3/configure --verbose --prefix=/usr --exec-prefix=/usr --sysconfdir= /etc --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --ena ble-languages=c,ada,c++,d,f77,java,objc,pascal --enable-nls --without-included-gettext --enable-libg cj --with-system-zlib --enable-interpreter --enable-threads=posix --enable-java-gc=boehm --enable-sj lj-exceptions --disable-version-specific-runtime-libs --disable-win32-registry Thread model: posix gcc version 3.3.3 (cygwin special) foo.c #include <stdlib.h> #include <stdio.h> #include <time.h> #include <ctype.h> #include "utildefs.h" int main(void) { char api_version[150]; ar_version(api_version); return 0; } condor.def EXPORTS ar_close ar_clr_rx_count ar_define_msg ar_execute_bit ar_force_version ar_formatarinclabel ar_formatbinarylabel ar_get_boardtype ar_get_config ar_get_error ar_get_harris ar_get_label_filter ar_get_latest ar_get_raw_mode ar_get_rx_count ar_get_timercnt ar_get_timercntl ar_getblock ar_getfilter ar_getnext ar_getnextt ar_getword ar_getwordt ar_go ar_init_dual_port ar_init_slave ar_int_control ar_int_set ar_int_slave ar_label_filter ar_loadslv ar_loadslv_init_discrete ar_modify_msg ar_msg_control ar_num_rchans ar_num_xchans ar_putblock ar_putfilter ar_putword ar_putword2x16 ar_recreate_parity ar_reformat ar_reset ar_reset_int ar_reset_timercnt ar_setinterrupts ar_set_config ar_set_harris ar_set_raw_mode ar_set_storage_mode ar_set_timerrate ar_timetag_control ar_unformat ar_version ar_xmit_sync ar_channel_cmd ar_dump_dp ar_set_arinc_config ar_get_errorLV ar_get_map ar_setchparms ar_get_boardname ar_get_boardnameLV __DebuggerHookData @__lockDebuggerData$qv @__unlockDebuggerData$qv make.log gcc -D_WIN32 -c foo.c ./impdef/impdef.exe CEI22032.dll > condor.def #dlltool -A -U -k --input-def ./condor.def --dllname CEI22032.dll --output-lib ./condor.a #dlltool -A --input-def ./condor.def --dllname CEI22032.dll --output-lib ./condor.a dlltool -A -U --input-def ./condor.def --dllname CEI22032.dll --output-lib ./condor.a #gcc foo.o CEI22032.dll -o foo.exe #gcc foo.o ./condor.exp ./condor.a -o foo.exe #gcc --verbose --kill-at foo.o ./condor.a -o foo.exe #gcc foo.o ./condor.a --add-stdcall-alias --kill-at -o foo.exe gcc foo.o ./condor.a --kill-at -o foo.exe foo.o(.text+0x31):foo.c: undefined reference to `_ar_version@4' collect2: ld returned 1 exit status make: *** [foo.exe] Error 1