首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法为NS-2安装Otcl-1.14

无法为NS-2安装Otcl-1.14
EN

Stack Overflow用户
提问于 2014-01-15 11:57:15
回答 2查看 2K关注 0票数 1

我正在尝试使用ns-allinone在Mac 10.9.x Mavericks上安装NS-2

每次我运行安装脚本时,它都会在安装Otcl的步骤中失败,并显示以下错误:

代码语言:javascript
复制
rm -f libotcl otcl.o so_locations
gcc -c -g -O2 -DNDEBUG -DUSE_SHM -DHAVE_UNISTD_H=1 -fPIC -I. -I/Users/songsong/Downloads/ns-allinone-2.35/include -I/Users/songsong/Downloads/ns-allinone-2.35/include -I/Users/songsong/Downloads/ns-allinone-2.35/include -I/usr/X11R6/include -I/include  otcl.c
otcl.c:784:14: warning: cast to 'Proc *' (aka 'struct Proc *') from smaller
      integer type 'int' [-Wint-to-pointer-cast]
      return Tcl_CmdInfoGetProc(co);
             ^
otcl.c:74:32: note: expanded from macro 'Tcl_CmdInfoGetProc'
#define Tcl_CmdInfoGetProc(co) (Proc *)(co->isNativeObjectProc) ? co->ob...
                               ^
1 warning generated.
o libotcl otcl.o
make: o: No such file or directory
make: [libotcl] Error 1 (ignored)
rm -f libotcl
gcc -o otclsh  -g -O2 -I. -I/Users/songsong/Downloads/ns-allinone-2.35/include -I/Users/songsong/Downloads/ns-allinone-2.35/include -I/Users/songsong/Downloads/ns-allinone-2.35/include -I/usr/X11R6/include -I/include  otclAppInit.c \
    -L. -lotcl -L/Users/songsong/Downloads/ns-allinone-2.35/lib -ltk8.5 -L/Users/songsong/Downloads/ns-allinone-2.35/lib -ltcl8.5 -L/usr/X11R6/lib -lXext -lX11  -lm
Undefined symbols for architecture x86_64:
  "_CFAbsoluteTimeGetCurrent", referenced from:
      _Tcl_SetTimer in libtcl8.5.a(tclMacOSXNotify.o)
      _Tcl_ServiceModeHook in libtcl8.5.a(tclMacOSXNotify.o)
      _Tcl_Sleep in libtcl8.5.a(tclMacOSXNotify.o)
  "_CFBundleCopyBundleURL", referenced from:
      _Tcl_MacOSXOpenVersionedBundleResources in libtcl8.5.a(tclMacOSXBundle.o)
  "_CFBundleCopyResourceURL", referenced from:
      _Tcl_MacOSXOpenVersionedBundleResources in libtcl8.5.a(tclMacOSXBundle.o)
  "_CFBundleCreate", referenced from:
      _Tcl_MacOSXOpenVersionedBundleResources in libtcl8.5.a(tclMacOSXBundle.o)
  "_CFBundleGetBundleWithIdentifier", referenced from:
      _Tcl_MacOSXOpenVersionedBundleResources in libtcl8.5.a(tclMacOSXBundle.o)
  "_CFLocaleCopyCurrent", referenced from:
      _TclpSetVariables in libtcl8.5.a(tclUnixInit.o)
  "_CFLocaleGetIdentifier", referenced from:
      _TclpSetVariables in libtcl8.5.a(tclUnixInit.o)
  "_CFRelease", referenced from:
      _Tcl_FinalizeNotifier in libtcl8.5.a(tclMacOSXNotify.o)
      _TclpSetVariables in libtcl8.5.a(tclUnixInit.o)
      _Tcl_MacOSXOpenVersionedBundleResources in libtcl8.5.a(tclMacOSXBundle.o)
  "_CFRunLoopAddObserver", referenced from:
      _Tcl_InitNotifier in libtcl8.5.a(tclMacOSXNotify.o)
      _TclMacOSXNotifierAddRunLoopMode in libtcl8.5.a(tclMacOSXNotify.o)
  "_CFRunLoopAddSource", referenced from:
      _Tcl_InitNotifier in libtcl8.5.a(tclMacOSXNotify.o)
      _TclMacOSXNotifierAddRunLoopMode in libtcl8.5.a(tclMacOSXNotify.o)
  "_CFRunLoopAddTimer", referenced from:
      _TclMacOSXNotifierAddRunLoopMode in libtcl8.5.a(tclMacOSXNotify.o)
      _Tcl_ServiceModeHook in libtcl8.5.a(tclMacOSXNotify.o)
  "_CFRunLoopGetCurrent", referenced from:
      _Tcl_InitNotifier in libtcl8.5.a(tclMacOSXNotify.o)
  "_CFRunLoopObserverCreate", referenced from:
      _Tcl_InitNotifier in libtcl8.5.a(tclMacOSXNotify.o)
  "_CFRunLoopObserverInvalidate", referenced from:
      _Tcl_FinalizeNotifier in libtcl8.5.a(tclMacOSXNotify.o)
  "_CFRunLoopRunInMode", referenced from:
      _Tcl_WaitForEvent in libtcl8.5.a(tclMacOSXNotify.o)
      _Tcl_Sleep in libtcl8.5.a(tclMacOSXNotify.o)
  "_CFRunLoopSourceCreate", referenced from:
      _Tcl_InitNotifier in libtcl8.5.a(tclMacOSXNotify.o)
  "_CFRunLoopSourceInvalidate", referenced from:
      _Tcl_FinalizeNotifier in libtcl8.5.a(tclMacOSXNotify.o)
  "_CFRunLoopSourceSignal", referenced from:
      _Tcl_AlertNotifier in libtcl8.5.a(tclMacOSXNotify.o)
      _NotifierThreadProc in libtcl8.5.a(tclMacOSXNotify.o)
  "_CFRunLoopTimerCreate", referenced from:
      _Tcl_ServiceModeHook in libtcl8.5.a(tclMacOSXNotify.o)
  "_CFRunLoopTimerGetNextFireDate", referenced from:
      _Tcl_Sleep in libtcl8.5.a(tclMacOSXNotify.o)
  "_CFRunLoopTimerInvalidate", referenced from:
      _Tcl_FinalizeNotifier in libtcl8.5.a(tclMacOSXNotify.o)
  "_CFRunLoopTimerSetNextFireDate", referenced from:
      _Tcl_SetTimer in libtcl8.5.a(tclMacOSXNotify.o)
      _Tcl_Sleep in libtcl8.5.a(tclMacOSXNotify.o)
  "_CFRunLoopWakeUp", referenced from:
      _Tcl_AlertNotifier in libtcl8.5.a(tclMacOSXNotify.o)
      _NotifierThreadProc in libtcl8.5.a(tclMacOSXNotify.o)
  "_CFStringCompare", referenced from:
      _Tcl_MacOSXOpenVersionedBundleResources in libtcl8.5.a(tclMacOSXBundle.o)
  "_CFStringCreateWithCString", referenced from:
      _Tcl_MacOSXOpenVersionedBundleResources in libtcl8.5.a(tclMacOSXBundle.o)
  "_CFStringGetCString", referenced from:
      _TclpSetVariables in libtcl8.5.a(tclUnixInit.o)
  "_CFURLCopyLastPathComponent", referenced from:
      _Tcl_MacOSXOpenVersionedBundleResources in libtcl8.5.a(tclMacOSXBundle.o)
  "_CFURLCreateCopyAppendingPathComponent", referenced from:
      _Tcl_MacOSXOpenVersionedBundleResources in libtcl8.5.a(tclMacOSXBundle.o)
  "_CFURLGetFileSystemRepresentation", referenced from:
      _Tcl_MacOSXOpenVersionedBundleResources in libtcl8.5.a(tclMacOSXBundle.o)
  "___CFConstantStringClassReference", referenced from:
      CFString in libtcl8.5.a(tclMacOSXNotify.o)
      CFString in libtcl8.5.a(tclMacOSXBundle.o)
      CFString in libtcl8.5.a(tclMacOSXBundle.o)
  "_kCFRunLoopCommonModes", referenced from:
      _Tcl_InitNotifier in libtcl8.5.a(tclMacOSXNotify.o)
      _Tcl_ServiceModeHook in libtcl8.5.a(tclMacOSXNotify.o)
  "_kCFRunLoopDefaultMode", referenced from:
      _Tcl_WaitForEvent in libtcl8.5.a(tclMacOSXNotify.o)
      _Tcl_Sleep in libtcl8.5.a(tclMacOSXNotify.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [otclsh] Error 1
EN

回答 2

Stack Overflow用户

发布于 2014-01-15 12:27:06

我发现_CF*中的CF确实表示CoreFoundation框架(可能是Xcode的一部分),但安装程序无法识别它。

因此,我将-framework CoreFoundation设置为Makefile中的$CFLAGS

如果在make之前运行./configureMakefile将被修改,您所做的修改将丢失。在这种情况下,请在./configure中将CFLAGS="-g -O2"替换为CFLAGS="-g -O2 -framework CoreFoundation"

票数 2
EN

Stack Overflow用户

发布于 2016-10-04 02:25:04

在配置exe文件中的otcl目录中,更改此设置

代码语言:javascript
复制
if test "$GCC" = yes; then CFLAGS="-g -O2"

到这个

代码语言:javascript
复制
if test "$GCC" = yes; then CFLAGS="-g -O2 -framework CoreFoundation"
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/21128859

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档