Re: Building on MinGW (Was: Trouble with linking C++ DLLs)
[email protected] Fri, 4 Nov 2005 15:24:37 -0000 (GMT)
| Newsgroups | gmane.comp.db.metakit |
|---|---|
| Message-ID | <[email protected]> |
> My initial attempt wasn't successful - when the make script runs > > gcc -shared -o libmk4.so column.o custom.o derived.o fileio.o field.o > format.o handler.o persist.o remap.o std.o store.o string.o table.o univ.o > view.o viewx.o > > gcc fails with screens and screens full of undefined references. I also > note that "libmk4.so" should presumably be "libmk4.dll" for MinGW. > > I'll investigate further this evening and check that my environment is > sane - I'm using the MSYS/MinGW download from tcl.sf.net rather than the > one from the mingw.org. Watch this space. I've figured out the major problem - it looks like both MSYS/MinGW and cygwin/MinGW environments need "g++" to be used to link the final DLL, not "gcc". Changing SHLIB_LD in the Makefile to g++ allowed the build to continue to completion and the examples run perfectly. As an aside, I did notice that the section of configure.in that evaluates $build_os does not recognize my cygwin install as cygwin, since $ uname -s CYGWIN_NT-5.1 i.e. the case is different to the cyg* pattern match attempted in configure.in. There's no code at all to set correct extensions for MSYS/MinGW. Jean-Claude, I can have a go at fixing this if you'd like a patch. Gareth _____________________________________________ Metakit mailing list - [email protected] http://www.equi4.com/mailman/listinfo/metakit