Undefined symbols for architecture i386 [solved]
-
It shouldn't harm. I had no problems compiling the plugins for my Qt libs. So this seems to be some weird combo of issues.
Can you give some more details on your environment:
- Qt version?
- SDK or prebuilt binary framework or manually compiled libs?
- Carbon or Cocoa?
- output of "qmake -query"
- output of "file /path/to/your/qt/libs-or-framworks/QtCore.framework/Versions/Current/QtCore (it shows you the architectures Qt is built for)
- output of the compiler run (calling make), at least a snippet, to analyze the actual compiler calls
-
Qt version 4.7.3, manually compiled (there are no precompiled libs for Mac 32).
I don't know how to determine whether Carbon or Cocoa is used.
Output of qmake -query
@QT_INSTALL_PREFIX:/usr/local/Trolltech/Qt-4.7.3
QT_INSTALL_DATA:/usr/local/Trolltech/Qt-4.7.3
QT_INSTALL_DOCS:/usr/local/Trolltech/Qt-4.7.3/doc
QT_INSTALL_HEADERS:/usr/local/Trolltech/Qt-4.7.3/include
QT_INSTALL_LIBS:/usr/local/Trolltech/Qt-4.7.3/lib
QT_INSTALL_BINS:/usr/local/Trolltech/Qt-4.7.3/bin
QT_INSTALL_PLUGINS:/usr/local/Trolltech/Qt-4.7.3/plugins
QT_INSTALL_IMPORTS:/usr/local/Trolltech/Qt-4.7.3/imports
QT_INSTALL_TRANSLATIONS:/usr/local/Trolltech/Qt-4.7.3/translations
QT_INSTALL_CONFIGURATION:/Library/Preferences/Qt
QT_INSTALL_EXAMPLES:/usr/local/Trolltech/Qt-4.7.3/examples
QT_INSTALL_DEMOS:/usr/local/Trolltech/Qt-4.7.3/demos
QMAKE_MKSPECS:/usr/local/Trolltech/Qt-4.7.3/mkspecs
QMAKE_VERSION:2.01a
QT_VERSION:4.7.3
@Output of file QtCore:
@file QtCore
QtCore: Mach-O dynamically linked shared library i386
@Output of make:
@
cd components/ && make -f Makefile
cd styleitem/ && make -f Makefile
rm -f libstyleplugin.dylib
g++ -headerpad_max_install_names -arch i386 -single_module -dynamiclib -o libstyleplugin.dylib tmp/qrangemodel.o tmp/qstyleplugin.o tmp/qdeclarativefolderlistmodel.o tmp/qstyleitem.o tmp/moc_qrangemodel.o tmp/moc_qstyleplugin.o tmp/moc_qdeclarativefolderlistmodel.o tmp/moc_qstyleitem.o -F/usr/local/Trolltech/Qt-4.7.3/lib -L/usr/local/Trolltech/Qt-4.7.3/lib -framework QtDeclarative -L/usr/local/Trolltech/Qt-4.7.3/lib -F/usr/local/Trolltech/Qt-4.7.3/lib -framework QtScript -framework QtCore -framework QtSvg -framework QtGui -framework QtSql -framework QtXmlPatterns -framework QtNetwork
Undefined symbols for architecture i386:
"StylePlugin::registerTypes(char const*)", referenced from:
vtable for StylePluginin moc_qstyleplugin.o
"StylePlugin::initializeEngine(QDeclarativeEngine*, char const*)", referenced from:
vtable for StylePluginin moc_qstyleplugin.o
"non-virtual thunk to StylePlugin::registerTypes(char const*)", referenced from:
vtable for StylePluginin moc_qstyleplugin.o
"non-virtual thunk to StylePlugin::initializeEngine(QDeclarativeEngine*, char const*)", referenced from:
vtable for StylePluginin moc_qstyleplugin.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
make[2]: *** [../plugin/libstyleplugin.dylib] Error 1
make[1]: *** [sub-styleitem-make_default] Error 2
make: *** [sub-components-make_default] Error 2
@ -
Now I've got the same shit with a 64 bit Mac but with the error-message:
@symbol(s) not found for architecture x86_64@
This is the compile output:
@Undefined symbols for architecture x86_64:
"StylePlugin::registerTypes(char const*)", referenced from:
vtable for StylePluginin moc_qstyleplugin.o
"StylePlugin::initializeEngine(QDeclarativeEngine*, char const*)", referenced from:
vtable for StylePluginin moc_qstyleplugin.o
"non-virtual thunk to StylePlugin::registerTypes(char const*)", referenced from:
vtable for StylePluginin moc_qstyleplugin.o
"non-virtual thunk to StylePlugin::initializeEngine(QDeclarativeEngine*, char const*)", referenced from:
vtable for StylePluginin moc_qstyleplugin.o
ld: symbol(s) not found for architecture x86_64@I added macx:CONFIG += x86_64 to the pro-file but that didn't change anything.
EDIT: I finally found the reason why building the desktop components failed. For some reason two files of the desktop components were changed (I found out via a simple git status). Now it compiles fine on both Macs.
-
[quote author="Hedge" date="1305379186"]
EDIT: I finally found the reason why building the desktop components failed. For some reason two files of the desktop components were changed (I found out via a simple git status). Now it compiles fine on both Macs.[/quote]Ah! Good to know. Could be I cloned the already corrected version from gitorious. Usually Mac environments are not that different :-)
Good luck with your further development!
-
I have the same problem, the version of my Mac is 10.7, and when I compile the same message appears, have tried everything. Do you know any solution?!
Tks,
Tokunaga.
-
I decided that....
TKS,
Tokunaga
-
Why Wolker??? Do u have a problem???
-
[quote author="Tokunaga" date="1320012719"]Why Wolker??? Do u have a problem???[/quote]
Me? No. I think it's you having a problem. At least that's what you stated previously:
[quote author="Tokunaga" date="1319961219"]I have the same problem[/quote]
But it's hard to know what you did decide, though:
[quote author="Tokunaga" date="1319987713"]I decided that....
TKS,
Tokunaga[/quote]
Can you elaborate a bit more precisely?
-
Volker
somebody could solve this?
well, if you use a qt 4.7.4 on a Mac 32-bit it really appears, I checked other tutorials and talk to compile gcc libraries.
You know what really needs to be done? anyone have any solution? -
Do you have msn or something??
my email hxcx_dod@hotmail.com