简体   繁体   中英

QtCreator: symbol(s) not found for architecture x86_64 issue on Mac OS Mavericks

I am trying to compile a C++ program using Qt. When I try to compile I get this output:

symbol(s) not found for architecture x86_64
linker command failed with exit code 1 (use -v to see invocation)

What can I do? Why is this happening? I already tried setting

QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9

(as suggested in this post OpenCv + mac os x + qt creator = strange linking bug? ) in my project file but it did not resolve the issue.

Any ideas?

EDIT:

This is what my project file looks like:

TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
CONFIG -= qt

SOURCES += main.cpp \
    a.cpp \
    b.cpp \
    c.cpp

HEADERS += \
    a.h \
    b.h \
    c.h

I get this error when I have prototyped methods in a header file but not defined them in a source file, or if a function is prototyped but not defined. Make sure all the prototyped functions and class methods have definitions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM