我正在尝试在 Mac OS X Lion 上构建 omnet++。
configure
工作正常,但是在创建 tk 共享库时出现此错误。
Creating shared library: /Applications/omnetpp-4.3/lib/cc_-arch_i386/libopptkenv.dylib
ld: warning: ld: warning: ignoring file /Applications/omnetpp-4.3/out/cc_-arch_i386-
release/src/tkenv/tkImgPNG.o, file was built for i386 which is not the architecture being
linked (x86_64): /Applications/omnetpp-4.3/out/cc_-arch_i386-
release/src/tkenv/tkImgPNG.oignoring file /Applications/omnetpp-4.3/out/cc_-arch_i386-
release/src/tkenv/tkImgPNGInit.o, file was built for i386 which is not the architecture
being linked (x86_64): /Applications/omnetpp-4.3/out/cc_-arch_i386-
release/src/tkenv/tkImgPNGInit.o
Undefined symbols for architecture x86_64:
"_Tkpng_Init", referenced from:
initTk(int, char**) in tklib.o
ld: symbol(s) not found for architecture x86_64
我修改了 configure.user 以使用 64 位架构。
CFLAGS_DEBUG='-g -Wall -arch x86_64'
CFLAGS_RELEASE='-O2 -DNDEBUG=1 -arch x86_64'
LDFLAGS="-arch x86_64"
但是,看起来 omnet++ 只是使用 32 位架构。
make MODE=release
***** Configuration: MODE=release, TOOLCHAIN_NAME=cc_-arch_i386, LIB_SUFFIX=.dylib ****
如何将 omnet++ 构建为 64 位架构?