On Sun, 22 Jun 2008 01:18:13 -0500, Jeremy Messenger wrote: > On Sat, 21 Jun 2008 14:04:08 -0500, Max Brazhnikov <[EMAIL PROTECTED]> wrote: > > On Sat, 21 Jun 2008 11:20:38 -0500, Jeremy Messenger wrote: > >> Hello folks, > >> > >> I am wondering if there is a bug in QtCore.pc for not have > >> -I/usr/local/include or qglobal.h for should be '#include > >> <QtCore/qconfig.h>' -> '#include <qconfig.h>'? A simple test.cc failed > >> to > >> compile unless I add -I/usr/local/include. > >> > >> ------------------------------------- > >> # cat test.cc > >> #include <cstdio> > >> #include <QtGlobal> > >> extern "C" int main(void) > >> { > >> printf("found version %s", QT_VERSION_STR); > >> #if QT_VERSION >= 0x040200 > >> printf(", OK.\n"); > >> return 0; > >> printf(", expected version 4.2.0 or higher\n"); > >> return 1; > >> #endif > >> } > >> ------------------------------------- > >> > >> ------------------------------------- > >> # c++ -O -Wall -o test test.cc `pkg-config QtCore --cflags --libs` > >> In file included from /usr/local/include/QtCore/QtGlobal:1, > >> from test.cc:2: > >> /usr/local/include/QtCore/qglobal.h:62:28: error: QtCore/qconfig.h: No > >> such file or directory > >> /usr/local/include/QtCore/qglobal.h:942:31: error: QtCore/qfeatures.h: > >> No > >> such file or directory > >> /usr/local/include/QtCore/qglobal.h:1139:4: error: #error "Qt not > >> configured correctly, please run configure" > >> /usr/local/include/QtCore/qglobal.h:2036:6: error: #error "Qt not > >> configured correctly, please run configure" > >> ------------------------------------- > >> > >> The solution is to add -I/usr/local/include. > >> > >> ------------------------------------- > >> # c++ -O -Wall -o test test.cc `pkg-config QtCore --cflags --libs` > >> -I/usr/local/include > >> # ./test > >> found version 4.3.4, OK. > >> ------------------------------------- > >> > >> ------------------------------------- > >> # pkg-config QtCore --cflags --libs > >> -DQT_SHARED -I/usr/local/include/QtCore -pthread -L/usr/local/lib > >> -lQtCore -lz -lm -lgthread-2.0 -lglib-2.0 -liconv > >> ------------------------------------- > >> > >> BTW: Please add me in CC. > >> > >> Cheers, > >> Mezz > > > > /usr/local/include was removed (incorrectly) from Qt*.pc. The problem is > > that > > qt3 installs headers (one of them is qconfig.h) to /usr/local/include > > and > > this sometimes confuses qt4 ports. > > I have both qt3 and qt4 installed, and I don't have any problem. I think > it's matter of order. Does qt4 still has problem even if it has > /usr/local/include in the last order? Like this: > > -I/usr/local/include/QtCore -I/usr/local/include This might break some qt4-dependent ports, if their include path will be like -I/usr/local/include/QtCore -I/usr/local/include -I/usr/local/include/QtGui
> I believe that it needs to be fix in *.pc files. The qt3 doesn't has > QtCore, so I think it should be no problem. the fix is needed indeed, moving qt3 headers out from /usr/local/include will help _______________________________________________ kde-freebsd mailing list kde-freebsd@kde.org https://mail.kde.org/mailman/listinfo/kde-freebsd