cygwin - shpopen.c - linker errors __assert, __ftol

View: New views
2 Messages — Rating Filter:   Alert me  

cygwin - shpopen.c - linker errors __assert, __ftol

by C S-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi all - i am trying to compile a C++ native library using the shapelibrary. the one for linux is built but in cygwin i seem to be having some linker error problems and i have to assume it has to do with something regarding MSVC. i am including Java because i am using JNI to talk back and forth to Java. libShapeData.dll is my own native library that i want to build for windows.

at the cygwin prompt:

gcc -D__int64="long long" -shared -I\C:\Apps\Java\jdk1.6.0_05\include -I\C:\Apps\Java\jdk1.6.0_05\include\win32 -I\c:\Users\usmsci\My Documents\shapefiles\shapelib128_bin_win -L\c:\Users\usmsci\My Documents\shapefiles\shapelib128_bin_win myFile.cpp -o libShapeData.dll c:\Users\usmsci\My Documents\shapefiles\shapelib128_bin_win\shpopen.obj c:\Users\usmsci\My Documents\shapefiles\shapelib128_bin_win\dbfopen.obj

the errors i get are:

Warning: .drectve '-defaultlib:LIBC' - unrecognized
Warning: .drectve '-defaultlib:OLDNAMES' - unrecognized
Warning: .drectve '-defaultlib:LIBC' - unrecognized
Warning: .drectve '-defaultlib:OLDNAMES' - unrecognized

c:\Users\usmsci\My Documents\shapefiles\shapelib128_bin_win\shpopen.o:shpopen.c
(.text+0x1485):undefined reference to __assert

the same thing happens for dbfopen.c. other undefined references include __ftol and __itob. those are the only 3.

is there a compiler option that i can use or is there a way to somehow rebuild the shapefile library somehow? i am really not sure what is going on here - so it is kind of hard what to specifically ask. thanks all for the help in advance!  







     
_______________________________________________
Shapelib mailing list
Shapelib@...
http://lists.maptools.org/mailman/listinfo/shapelib

Re: cygwin - shpopen.c - linker errors __assert, __ftol

by Bram de Greve :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm a bit confused here.  Are you using object files of shapelib that
are compiled with MSVC?   Try to build shapelib separately in cygwin.  
You might find that more convenient.  Just say 'make' ...

Bram

C S wrote:

> hi all - i am trying to compile a C++ native library using the shapelibrary. the one for linux is built but in cygwin i seem to be having some linker error problems and i have to assume it has to do with something regarding MSVC. i am including Java because i am using JNI to talk back and forth to Java. libShapeData.dll is my own native library that i want to build for windows.
>
> at the cygwin prompt:
>
> gcc -D__int64="long long" -shared -I\C:\Apps\Java\jdk1.6.0_05\include -I\C:\Apps\Java\jdk1.6.0_05\include\win32 -I\c:\Users\usmsci\My Documents\shapefiles\shapelib128_bin_win -L\c:\Users\usmsci\My Documents\shapefiles\shapelib128_bin_win myFile.cpp -o libShapeData.dll c:\Users\usmsci\My Documents\shapefiles\shapelib128_bin_win\shpopen.obj c:\Users\usmsci\My Documents\shapefiles\shapelib128_bin_win\dbfopen.obj
>
> the errors i get are:
>
> Warning: .drectve '-defaultlib:LIBC' - unrecognized
> Warning: .drectve '-defaultlib:OLDNAMES' - unrecognized
> Warning: .drectve '-defaultlib:LIBC' - unrecognized
> Warning: .drectve '-defaultlib:OLDNAMES' - unrecognized
>
> c:\Users\usmsci\My Documents\shapefiles\shapelib128_bin_win\shpopen.o:shpopen.c
> (.text+0x1485):undefined reference to __assert
>
> the same thing happens for dbfopen.c. other undefined references include __ftol and __itob. those are the only 3.
>
> is there a compiler option that i can use or is there a way to somehow rebuild the shapefile library somehow? i am really not sure what is going on here - so it is kind of hard what to specifically ask. thanks all for the help in advance!  
>
>
>
>
>
>
>
>      
> _______________________________________________
> Shapelib mailing list
> Shapelib@...
> http://lists.maptools.org/mailman/listinfo/shapelib
>  
_______________________________________________
Shapelib mailing list
Shapelib@...
http://lists.maptools.org/mailman/listinfo/shapelib