[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Library linking problem under gcc on Mac OS Tiger

From: Linwei Wang
Subject: Library linking problem under gcc on Mac OS Tiger
Date: Tue, 30 Oct 2007 22:44:34 -0400

Dear all,

I have been got stuck in a linking problem for my c++ program with gcc on Mac OS Tiger, it happens when I need to use shared libraries. For example, when I use matlab engine in the program, the compiling is ok, but the liking will give error as:

  -ld: undefined symbol: ..........
  /usr/bin/libtool: internal link edit command failed

  I have included the necessary path during linking: eg

g++ -L/Applications/MATLAB_SV74/bin/maci -L/Applications/ MATLAB_SV74/bin/maci -dynamiclib -o engdemo.o ...

and I use nm which shows, eg, _engClose is in the library libeng.dylib, which is under the matlabroot/bin/maci path

Besides, I also set the DYLD_LIBRARY_PATH to include these library paths.......

and I dun think it is related to matlab issue, because in another program using vtk, it also give "undefined symbol" error during linking..

I've checked a lot, seems there are similar situations reported, but I still can not find a solution to it.. Can anyone help?

  Thanks very much


reply via email to

[Prev in Thread] Current Thread [Next in Thread]