1

I am back in c++, but i am using a macosx maverick for a project i have to use an external library which is https://github.com/augcampos/asterisk-cpp

So, I have compiled the library and got my .dylib

Then I have compiled like this a main test: g++ -Wall Test.cpp -o teste -L/usr/local/lib/ -I/usr/local/include -lasteriskcpp -lpthread -lboost_system -std=c++0x

But I got this error when i run my binary

dyld: Symbol not found: __ZTVN11asteriskcpp10ParkActionE
  Referenced from: /usr/local/lib/libasteriskcpp.0.dylib
  Expected in: flat namespace
 in /usr/local/lib/libasteriskcpp.0.dylib
Trace/BPT trap: 5

I search on google during 3 days they said it can be a problem in the code (i doubt it) or it's principally an error link during the compilation. I don't know how it cannot be linked properly because it was ok during the compilation time of the lib, and my little main test :/

Thanks for your help. Have a nice day

Ruu
  • 1,245
  • 9
  • 9
  • I think this is because you have dynamically linked, so it is only trying to load the symbols at run-time. So I think this is a linker error, but it is only showing itself at runtime. How did you compile the asterisk-cpp lib? What command did you use etc? – Choc13 Dec 26 '13 at 10:47
  • I used the configuration mode, it use boost, c++0x – user2110674 Dec 30 '13 at 16:15

1 Answers1

0

Are you compiling the asterisk library with the same flags? E.g. do you compile that with std=c++0x?

Choc13
  • 796
  • 7
  • 23