From: Deepak C. <dch...@gm...> - 2008-08-26 16:44:41
|
Hello, I was under the impression that if I have a an achive file (.a) that I use in Linux, I can can use the same file with MinGW -- basically use the same call that I would use in Linux. MinGW is recognizing the library (does not produce a no such file error) and using "ar t ..." on the .a files does show all the .o files), but it gives "unrecognized reference: " errors for all the functions from the library that I am using. Here are the specifics: Here is the Linux command (works in Ubuntu): gcc mathfuncs.c main.c -lm -lsundials_cvode -lsundials_nvecserial I executed the same command using MinGW, and I get the following errors: C:\Users\Deepak\AppData\Local\Temp/ccGBkQwd.o:cvodesim.c:(.text+0x179): undefined reference to `N_VNew_Serial' C:\Users\Deepak\AppData\Local\Temp/ccGBkQwd.o:cvodesim.c:(.text+0x23e): undefined reference to `CVodeCreate' C:\Users\Deepak\AppData\Local\Temp/ccGBkQwd.o:cvodesim.c:(.text+0x2a2): undefined reference to `CVodeMalloc' ...several other similar errors.... collect2: ld returned 1 exit status The .a files are in C:/MinGW/lib, and since there is no "cannot find..." error, I am assuming that the library files are found. Is it possible that the exported symbols have changed when using MinGW? What do I need to do to use the .a files? Thanks. |