我和我的朋友正在将我们的软件移植到 Mac OSX。该应用程序大量构建在 SDL 之上,我们很难在 Qt5 中链接和编译 SDL。我们没有在我们的代码中使用 Qt 的任何部分,而是使用 IDE 来简化跨平台。
目前,我里面有 SDL 框架/Library/Frameworks/
在 application.pro 里面我有:
TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
CONFIG -= qt
SOURCES += main.cpp
macx {
INCLUDEPATH += "/Library/Frameworks/SDL.framework/headers/"
}
在main.cpp
我显然有#include "SDL.h"
并且如果我 ctrl 单击SDL.h
它表明它正在链接到框架......
当我去构建/编译我得到这个错误:
14:21:24: Running steps for project BDGame...
14:21:24: Configuration unchanged, skipping qmake step.
14:21:24: Starting: "/usr/bin/make" -w
make: Entering directory `/Users/Kite/Dropbox/Wizardry Games/BDGame/BDGame-build-Desktop_Qt_5_0_0_clang_64bit_SDK-Release'
g++ -headerpad_max_install_names -mmacosx-version-min=10.6 -o BDGame main.o
Undefined symbols for architecture x86_64:
"_main", referenced from:
start in crt1.10.6.o
(maybe you meant: _SDL_main)
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [BDGame] Error 1
make: Leaving directory `/Users/Kite/Dropbox/Wizardry Games/BDGame/BDGame-build-Desktop_Qt_5_0_0_clang_64bit_SDK-Release'
14:21:24: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project BDGame (kit: Desktop Qt 5.0.0 clang 64bit (SDK))
When executing step 'Make'
我做错了什么阻止 Qt 使用 SDL?