g++ vs. g++33: conflicts with qt 3.1.2 on FreeBSD 4.8

Rob Lahaye lahaye at snu.ac.kr
Wed Aug 20 03:58:14 PDT 2003



Hi,

FreeBSD 4.8 and Qt 3.1.2 compiled "as is" from the portscollection.
I have a brief Qt code:

	#include <qglobal.h>
	#include <qstring.h>

	int main ()
	{
	 QString s("mangle_failure");
	 return 0;
	}

I compile this as follows:

${CC} MyQtCode.C -g -O -pthread -I/usr/X11R6/include -L/usr/X11R6/lib -I/usr/local/include -L/usr/local/lib \
       -lSM -lICE -lc -lm -lX11 -lqt-mt

Where CC is either "/usr/bin/g++" or "/usr/local/bin/g++33"
With g++ this compiles fine.

But with g++33, I get an error, that says:
/var/tmp//ccI2rls3.o: In function `main':
/home/lahaye/MyQtCode.C:6: undefined reference to `QString::QString[in-charge](char const*)'
/var/tmp//ccI2rls3.o: In function `main':
/usr/X11R6/include/qstring.h:770: undefined reference to `QString::shared_null'
/usr/X11R6/include/qstring.h:771: undefined reference to `QStringData::deleteSelf()'
collect2: ld returned 1 exit status


Any idea how I can fix this?

Thanks,
Rob.



More information about the freebsd-questions mailing list