On Mon, Mar 7, 2011 at 3:31 AM, David Lichteblau <david@lichteblau.com> wrote:
Quoting Elliott Slaughter (elliottslaughter@gmail.com):
> g++ -headerpad_max_install_names -single_module -dynamiclib
> -compatibility_version 1.0 -current_version 1.0.0 -install_name
> libcommonqt.1.dylib
> -o libcommonqt.1.0.0.dylib commonqt.o  -F/Library/Frameworks
> -L/Library/Frameworks -lsmokeqtcore -framework QtGui
> -L/tmp/qt-stuff-6474/source/qt-everywhere-opensource-src-4.7.0/lib
> -F/tmp/qt-stuff-6474/source/qt-everywhere-opensource-src-4.7.0/lib
> -framework QtCore

Hmm, I don't see any -I or -L flags pointing to smoke there.

Perhaps that's normal (if smoke is installed in a default location that
works without special flags, like /usr/local), and it must have found
the header, but given that it fails to link afterwards, that's what I'd
try to investigate first.

For example, if you built smokeqt with
 cmake CMakeLists.txt -DCMAKE_INSTALL_PREFIX=/opt/smoke
 make install

then CommonQt needs to be configured using:
 qmake LIBS=-L/opt/smoke/lib/ INCLUDEPATH=/opt/smoke/include/

Ok, my smoke was installed to ${HOME}/Programming/Lisp/new_kde_build/install, so I would have expected the following to work. I'm still getting the same error, although the -I and -L arguments do appear in the commands. See anything wrong with the following?

Thanks.

$ qmake LIBS=-L${HOME}/Programming/Lisp/new_kde_build/install/lib INCLUDEPATH=${HOME}/Programming/Lisp/new_kde_build/install/include -spec macx-g++
$ make clean
rm -f commonqt.o
rm -f *~ core *.core
$ make
g++ -c -pipe -g -gdwarf-2 -Wall -W -fPIC -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/usr/include -I/Users/elliott/Programming/Lisp/new_kde_build/install/include -I. -F/Library/Frameworks -o commonqt.o commonqt.cpp
rm -f libcommonqt.1.0.0.dylib libcommonqt.dylib libcommonqt.1.dylib libcommonqt.1.0.dylib
g++ -headerpad_max_install_names -single_module -dynamiclib -compatibility_version 1.0 -current_version 1.0.0 -install_name libcommonqt.1.dylib -o libcommonqt.1.0.0.dylib commonqt.o  -F/Library/Frameworks -L/Library/Frameworks -L/Users/elliott/Programming/Lisp/new_kde_build/install/lib -lsmokeqtcore -framework QtGui -L/tmp/qt-stuff-6474/source/qt-everywhere-opensource-src-4.7.0/lib -F/tmp/qt-stuff-6474/source/qt-everywhere-opensource-src-4.7.0/lib -framework QtCore  
ld: warning: directory '/tmp/qt-stuff-6474/source/qt-everywhere-opensource-src-4.7.0/lib' following -L not found
ld: warning: directory '/tmp/qt-stuff-6474/source/qt-everywhere-opensource-src-4.7.0/lib' following -F not found
Undefined symbols:
  "Smoke::classMap", referenced from:
      Smoke::findClass(char const*)in commonqt.o
      Smoke::findClass(char const*)in commonqt.o
  "Smoke::NullModuleIndex", referenced from:
      Smoke::idMethod(short, short)in commonqt.o
      Smoke::idClass(char const*, bool)in commonqt.o
      Smoke::idClass(char const*, bool)in commonqt.o
      Smoke::idMethodName(char const*)in commonqt.o
      Smoke::findClass(char const*)in commonqt.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [libcommonqt.1.0.0.dylib] Error 1

Just to show that the libs are really there:

$ ls ${HOME}/Programming/Lisp/new_kde_build/install/lib
libclsmokeqtcore.0.0.1.dylib libsmokeqtnetwork.dylib
libclsmokeqtcore.0.0.dylib libsmokeqtopengl.3.0.0.dylib
libclsmokeqtcore.dylib libsmokeqtopengl.3.dylib
libcppparser.dylib libsmokeqtopengl.dylib
....

P.S. Do you know what /tmp/qt-stuff-6474 is? I have no idea what that would be, I definitely didn't install Qt to that location.

--
Elliott Slaughter

"Don't worry about what anybody else is going to do. The best way to predict the future is to invent it." - Alan Kay