Compiling Qt 3.1.1

Ralf Habacker kde-cygwin@mail.kde.org
Fri, 21 Feb 2003 13:28:44 +0100


> Yes.  I'm compiling under cygwin (cvs) and used your
> config.cygwin-thread script.
>
> >You can't compile trolltech's source under cygwin, you need the
> source from the
> >kde-cygwin cvs area. We have send some patches to trolltech, but they are not
> >applied until now.
> >
> >
> I've been curious for some time now about why things cant just compile
> nicely under cygwin.  This is just the
> an exercise in finding out what's up.  What kind of changes did you have
> to make?
>
There are several issues.

See http://cygwin.com/cygwin-ug-net/cygwin-ug-net.html and
http://cygwin.com/faq/ and for the source difference see the online cvs area.
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/kde-cygwin/qt-3/

Some of them has an effect on programming, some not. If this does not help
enough, let me know for that I can can give you more details.

> >In the cygwin dll. I haven't found this function in recent cvs release of the
> >cygwin1.dll
> >
> >
> Here is an example where I perhaps dont know whats up.  I implemented
> getlogin_r in my own version of cygwin1.dll. to get
> libqt-mt.dll.3.1.1 to link.

In the cvs area you can find a wrapper as workaround for this function.
If you have a full working implemtation, please offer this patch to the cygwin
distribution.

> I'm somewhat knowledgeable about windows runtime linking and such and
> not so knowledgeable about linux.  I want to learn more.
>
> It is just wierd. Essentially I'm linking a really simple file to
> libqt-mt.dll and I'm getting errors like

g++ -c -pipe -fno-exceptions -Wall -W -O2 -D_REENTRANT  -DQT_NO_DEBUG
-DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_SHARED
-I/usr/src/qt-x11-free-3.1.1/mkspecs/cygwin-g++ -I.
            ^^^^^
It seems, that you are using the original source from trolltech., this will not
work.

> blahblah/libqt-mt.dll(.text+0x0):fake: multiple definition of
> `___do_frame_init'
> blahblah/i686-pc-cygwin/3.2/crtbegin.o(.text+0x0): first defined here
                          ^^^^^
You are using gcc 3.2. We haven't tested qt 3.0.4 with gcc >=3, currently we are
working with gcc 2.95xx.

If you feel comfortable, try to fix this issues, otherwise use gcc2.x from the
cygwin distribution.

Regards
Ralf