gpt4 book ai didi

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

转载 作者:太空宇宙 更新时间:2023-11-04 11:35:13 24 4
gpt4 key购买 nike

我正在尝试使用 Qt 编译 C++ 程序。当我尝试编译时,我得到了这个输出:

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

我能做什么?为什么会这样?我已经尝试设置

QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9

(如这篇文章中的建议 OpenCv + mac os x + qt creator = strange linking bug? )在我的项目文件中,但它没有解决问题。

有什么想法吗?

编辑:

这是我的项目文件的样子:

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

最佳答案

当我在头文件中有原型(prototype)方法但未在源文件中定义它们时,或者如果函数已原型(prototype)但未定义,我会收到此错误。确保所有原型(prototype)函数和类方法都有定义。

关于c++ - QtCreator : symbol(s) not found for architecture x86_64 issue on Mac OS Mavericks,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23256162/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com