Problem: static library linked with a dynamic library

Hey!

I have created a dynamic library that is an application framework and I'm linking it with another project that is the actual application. However I'm having a problem with a static LUA library that I'm linking with the framework. Everything is fine when I compile the framework (framework.dll) but compiling the application I'm linking the framework with fails (undefined reference to 'luaL_newstate). If I also link the actual application with the static LUA library it works like a charm...why? Shouldn't the static LUA code be embedded in the dynamic framework library? What am I doing wrong here? How should it be done? I really dont want to link lua with the application code too.

I wish to do this:

libLua5.1.a --linking with--> framework.dll --linking with--> application.exe

NOT THIS:

libLua5.1.a --linking with--> framework.dll --linking with--> application.exe
libLua5.1.a ------------------linking with------------------------->


BTW: I'm using MinGW on Windows.



Last edited on
Let us see the actual commands you are using to compile and link each project.

By LUA you mean Ierusalimschy's scripting language, right?
Topic archived. No new replies allowed.