undefined-symbol

Undefined symbol error for base class in C++ shared library

I compiled the following code as a shared library using g++ -shared ...: class Foo { public: Foo() {} virtual ~Foo() = 0; virtual int Bar() = 0; }; class TestFoo : public Foo { public: int Bar() { return 0; } }; extern "C" { Foo* foo; void init() { // Runtime error: undefined symbol: _ZN3FooD2Ev foo = new TestFoo()...

Undefined symbol errors when linking of C++ project using Eclipse

I compiled one C++ project which transplanted from another project, and there are some undefined symbol warnings while linking after compiled. The point is that these warnings are so strange. They are divided into 2 types: Type 1: dld: warning: Undefined symbol **'__record_needed_destruction'** in file './xxx/xx.o' dld: warning: Undefi...

syntax error; unexpected symbol:

Hi! I'm making a bunch of c/src files, and get: syntax error; unexpected symbol: "EnableUART" It is referenced in a driver.c file and defined in a .src file. It is XDEF'd correctly, Here is the c snippet: int main() { EnableUART(0, 9600, 'N'); } Any ideas of why something gives this error? TYTY ...

Undefined symbols error in C++ / Eclipse

I have a function to display the values of a vector in a table, but I keep getting an "Undefined symbols" error when linking. Here is my function prototype: void displayVectors(vector<string> & nameVec, vector<double> & scoreVec, vector<char> & gradeVec); Here is the definition: void dipslayVectors(vector<string> & nameVec, vector<d...

Linking error: Undefined Symbols, lots of them (cpp cross compiling)

Hello, I get to the very last linking command (the actual executable is being linked) but i get a BUNCH of undefined symbols (and they're in cpp and look so scary to me, a simple c programmer) --its probably something simple but i cant get what im supposed to put as linker (its using gcc here...? is that appropriate? g++ told me too ma...

Error with swig: undefined symbol: _ZN7hosters11hostersLink7getLinkEi

I'm trying to make a python binding for the this library: http://code.google.com/p/hosterslib/. I'm using swig, heres is the code: %module pyhosters %{ #include "hosters/hosters.hpp" %} %include "hosters/hosters.hpp" I run swig -c++ -python -o swig_wrap.cxx swig.i and I compile with g++ -O2 -fPIC -shared ...

ld reports missing symbols, but symbols seem to exist

I'm trying to link my mac application to the wonderful libancillary library. However, I have changed the library build script to create a shared library. I can inspect the symbols in this library using nm libancillary.dylib - the result is: libancillary.dylib(single module): U ___sF U __keymgr_get_and_lock_processwide_...

Undefined symbol error on loading a module in Apache that uses libxml2

Hello everyone! I am writing an Apache 2.2 module that uses the libxml2 API. I have compiled the module using following commands: apxs -I /usr/include/libxml2/ -c mod_xmltest.c sudo apxs -n xmltest_module -i mod_xmltest.la and used the following LoadFile directive in httpd.conf LoadFile /usr/lib/libxml2.so However on starting the...

Why does Lua report that lua_pushlstring is undefined?

I managed to compile Lua 5.1.4 for Palm webOS and now I'm trying to write an extension to use webOS' services from Lua. However, when I try to load my library, Lua reports: undefined symbol: lua_pushlstring Here's my code: #define LUA_LIB #include "lua.h" #include "lauxlib.h" static int hellopalm(lua_State *L) { lua_pushliteral(...

Why would a runtime undefined symbol be fixed by adding /usr/lib to ld.so.conf?

I've got a case in linux where gcc and ld build things cleanly, but at runtime I get an undefined symbol (for something in libxerces-c.so.28), reported by one of my own shared libraries, when running my program. First assumption was cache was broken, xerces recently installed, or something similar, so I ran ldconfig. Didn't fix it. But...

In Xcode how do I specify the correct library in my project settings to avoid a link error?

I get a Undefined symbols error attempting to build an XCode project, and I'm pretty sure it is because the linker can't find a library (it's the library needed to use curses.h btw). I'm writing a terminal program. The errors I'm getting are: Undefined symbols: "_initscr", referenced from: _main in RogueSmackCmdLine.o "_wref...