I've got an application that has exported a bunch of symbols in it
(specifically the lua runtime) and I've got a plugin that gets loaded
by that application that uses the symbols in the parent.

I can make it work with a bunch of annoying if(...) statements, like:

if(APPLE)
  set(MY_EXTRA_C_FLAGS "-shared -avoid-version -no-undefined
-flat_namespace -undefined suppress"
endif()

...and that seems to work, but it's extremely compiler dependent
(read: I haven't figured out how to do it on visual studio yet).

Is there a better and more portable way to be doing this?

In my specific situation I have a lua plugin (blah.lua + blah.so /
blah.dll) that needs to call the lua c runtime, but the lua runtime is
already statically linked to the parent application.

Linked against a second copy of the runtime causes crashes (deliberate
lua design issue), and the API is exposed in the application.

So I need to link the shared library / dll with missing symbols and
the right 'magical linker arguments' so that when the dll loads it
resolves the symbols from the parent.

~
Doug.
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to