-mno-cygwin and C++ -- solved!

Kenton Varda temporal@gauge3d.org
Tue Mar 27 21:48:00 GMT 2001


> When you say "no longer works with C++", I think you actually mean "never
> worked with C++".

Actually, the old version worked just fine with mingw-extra installed.


I managed to get it (the new version) working!  Here's what you have to do:

- Install the latest cygwin
- Download the mingw-runtime package.  (not sure if this is necessary)
   - Put the libs in /usr/lib/mingw
   - Put the includes in /usr/include/mingw
- Download the mingw gcc package, find libstdc++.a in it, and put that it 
/usr/lib/mingw
- Copy /usr/include/g++-3 to /usr/include/mingw/g++-3

After doing all that, I could compile C++ executables without linking against 
cygwin1.dll.  However, I was still having problems compiling DLL's.  Here is 
my dllwrap command line:

dllwrap --target i686-mingw32 -mno-cygwin --def $objdir/$soname-def -o 
$objdir/$soname $libobjs $deplibs $linkopts

It complained that it couldn't find dllcrt2.o, even though the file was in 
/usr/lib/mingw.  So, I copied dllcrt2.o from there to /usr/lib, and now 
everything works!

I guess I'm satisfied for now, but I would really like for this stuff to work 
out-of-the-box.  For now, I will distribute hack-package with my source to 
allow others to compile it on cygwin.

> If you are asking for a a mingw-extra-gcc-2.95.3 --libstdc++, libgcc.a (for
> C++ exception handling), libg2c.a)-- where should I upload it.  I haven't
> tested objc components but others seem to work fine

I think that's what I was originally looking for. :)  Why isn't this part of 
cygwin's mingw package already?

-Kenton Varda

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list