質問

I'm trying to build omnet++ on Mac OS X Lion.

configure works fine, however I got this error when creating tk shared library.

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

I modified configure.user to use 64 bit architecture.

CFLAGS_DEBUG='-g -Wall -arch x86_64'
CFLAGS_RELEASE='-O2 -DNDEBUG=1 -arch x86_64'
LDFLAGS="-arch x86_64"

However, it looks like that omnet++ just uses 32 bit architecture.

make MODE=release
***** Configuration: MODE=release, TOOLCHAIN_NAME=cc_-arch_i386, LIB_SUFFIX=.dylib ****

How can I build omnet++ as 64 bit architecture?

役に立ちましたか?

解決

I needed to add more options.

./configure CFLAG_ARCH='-arch x86_64'
make TOOLCHAIN_NAME=cc_-arch_x86_64
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top