[Qt-interest] "not of required architecture" error message on my own static library

Warren warren at wantonhubris.com
Sun Sep 6 17:17:52 CEST 2009


I'm working in OSX on an Intel Macbook Pro, for reference.  QT 4.5.3.

I'm getting pretty frustrated here as this makes little sense to me.   
I created a project in QT and built a static library.  That dropped a  
".a" file on my hard drive which is all good.  I then created a GUI  
project in QT and cannot for the life of me get it to link to the  
static library.

Whenever I compile the GUI app, I get this error:

"ld: warning: in ../CommonFramework/libCommonFramework.a, file is not  
of required architecture"

I'm brand new to the land of QT so be gentle.  Which idiotic newbie  
mistake am I committing here?



The .PRO file for the static library:

# -------------------------------------------------
# Project created by QtCreator 2009-09-06T09:50:35
# -------------------------------------------------
QT -= gui
TARGET = CommonFramework
TEMPLATE = lib
CONFIG += staticlib x86
SOURCES += xmapreader.cpp
HEADERS += xmapreader.h \
CommonInclude.h
PRECOMPILED_HEADER += CommonInclude.h

The .PRO file for the GUI app:

# -------------------------------------------------
# Project created by QtCreator 2009-09-06T08:01:41
# -------------------------------------------------
QT += opengl \
webkit
TARGET = LevelEd
TEMPLATE = app
SOURCES += main.cpp \
leveledwindow.cpp
HEADERS += leveledwindow.h \
LevelEdInclude.h
FORMS += leveledwindow.ui
PRECOMPILED_HEADER += LevelEdInclude.h

# HACK : This is the only way to get QT 4.5 to compile on Snow  
Leopard. Should be removed once a better version of QT is released.
CONFIG += x86

LIBS += ../CommonFramework/libCommonFramework.a




- Warren
(warren at wantonhubris.com)







More information about the Qt-interest-old mailing list