Hi! I'm getting some errors from g++ when linking my UI-Framework project.
My Model is this: I have a frontend that
defines and implements the UI controls and
defines some base classes for the backend (the Binding class in binding.h), and a backend that
defines and implements a specialised Binding for whichever Graphics library i want to use - in this case SDL. (SdlBinding in sdl_binding.h and .cpp)
Both were compiled and stuffed into two static library archives (libasc_uix_com.a for the frontend and libasc_uix_g2d.a for the backend)
Now I want to write a test program for these libraries, and all it does in its main method is to construct an instance of SdlBinding. Some of its more general methods are implemented in Binding, so the asc_uix_com library is needed too, obviously.
When compiling this program thus:
g++ -lSDL -lasc_uix_com -lasc_uix_g2d test.cpp
I get undefined reference errors:
1 2
|
test.cpp:(.text+0x12): undefined reference to `asc::uix::g2d::SdlBinding::SdlBinding()'
test.cpp:(.text+0x23): undefined reference to `asc::uix::g2d::SdlBinding::~SdlBinding()'
|
However, I checked that this constructor is implemented in asc_uix_g2d library. I didn't get compiler errors in any of the object files for either library. I referenced the asc_uix_com library first, since some of SdlBinding's Base Class's methods are implemented in it (in binding.cpp, which is part of libasc_uix_com.a)
I hope someone can help me.