my whole command line script is: g++ -mno-cygwin -D__int64="long long" -Wl,-mno-cygwin -shared -I "C:\Apps\Java\jdk1.6.0_05\include" -I "C:\Apps\Java\jdk1.6.0_05\include\win32" -I "C:\Users\me\My Documents\shapefiles\shapelib-1.2.10\shapelib-1.2.10" -I "C:\Users\me\My Documents\shapefiles\shapelib128_bin_win" -L "C:\Users\me\My Documents\shapefiles\shapelib128_bin_win" myFile.cpp -o libShapeData.dll "C:\Users\me\My Documents\shapefiles\shapelib128_bin_win\shpopen.obj" "C:\Users\me\My Documents\shapefiles\shapelib128_bin_win\dbfopen.obj"
yeah i just typed in the 1 wrong. i am actually using an 'L'. if i take the -Wl,-mno-cygwin option out then i get the following error(s): -undefined reference to '_libmsvcrt_a_iname' along with other .drective warnings for -defaultLib such as LIBC and OLDNAMES -undefined reference to __nm___itob Info: resolving __itob by linked to __imp___itob(auto-import) thanks Dave K! On Tue, Jun 3, 2008 at 8:33 AM, Dave Korn <[EMAIL PROTECTED]> wrote: > C S wrote on 03 June 2008 14:25: > >> Brian, >> >> i figured out that not only do i need to compile against the >> no-cygwin flag but also link to it as well. so i tried to add the -Wl >> option like this: >> >> g++ -mno-cygwin -D__int64="long long" -W1-mno-cygwin > > Ah, there's your problem. You typed a '1' instead of an 'l'. And you > forgot the comma. > > No, wait a minute, I was wrong. The actual problem is that you aren't > correctly describing what you've done. Cut and paste stuff from your shell > into your email, don't just make it up or you'll inevitably get it wrong. > > Fortunately I can still tell what the actual error is: > >> the error i get now is: >> >> /usr/lib/gcc/i686-pc-mingw32/3.4.4../../../../i686-pc-mingw32/bin/ld: >> unrecognized emulation mode: no-cygwin >> Supported Emulations: i386pe >> collect2: ld returned exit status >> >> at the prompt i did a ls /lib/gcc/i686-pc-mingw32 and it returned >> 3.4.4 so that seems right. >> >> any clues or suggestions?? thanks all in advance! > > It's not a linker option in that sense; you just need to make sure you've > passed it to gcc or g++ along with all the .o files and it knows how to > drive the linker from that. So just remove your -Wl altogether; the plain > old "-mno-cygwin" that you have immediately after the "g++" will do the job. > The effect it has is to cause g++.exe to pass different -L options to ld. > > > cheers, > DaveK > -- > Can't think of a witty .sigline today.... > > > -- > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > Problem reports: http://cygwin.com/problems.html > Documentation: http://cygwin.com/docs.html > FAQ: http://cygwin.com/faq/ > > -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/