EclipseでNS2がビルドできなくなった時のメモ

**** Build of configuration Debug for project ns-2.34 ****

make all 
Building file: ../ns_tclsh.cc
Invoking: GCC C++ Compiler
g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"ns_tclsh.d" -MT"ns_tclsh.d" -o"ns_tclsh.o" "../ns_tclsh.cc"
In file included from ../ns_tclsh.cc:28:
../config.h:60:19: warning: tclcl.h: No such file or directory
../ns_tclsh.cc:30: error: ISO C++ forbids declaration of ‘init_misc’ with no type
../ns_tclsh.cc:34: error: ‘Tcl_Interp’ was not declared in this scope
../ns_tclsh.cc:34: error: ‘interp’ was not declared in this scope
../ns_tclsh.cc:35: error: expected ‘,’ or ‘;’ before ‘{’ token
../ns_tclsh.cc: In function ‘int main(int, char**)’:
../ns_tclsh.cc:52: error: ‘Tcl_Main’ was not declared in this scope
make: *** [ns_tclsh.o] エラー 1

こんな感じのエラーが出たとき

  • プロジェクトのプロパティを開く
  • C/C++ ビルドのビルドディレクトリーの記述を確認
    • 最後にDebugなりReleaseなりついてたら、それを消す

これで解決したよーん

  • Check for your Project property
  • Check C/C++ Build -> Build Directory
    • If written Debug or Release in Build Directory paths, removing those writings

英語のコメントくるとは思わんかった( ´゚д゚`)