5

In a DLL (linked at runtime) I need to call functions statically linked in my application.

I achieved to do this on the Linux side linking the application with the -rdynamic gcc option, but with Visual Studio I can't find a way to export all non-static symbols to dynamic libraries and to link the DLL without unresolved symbol errors.

  • I don't really want to convert all my application in multiple DLLs and adding handy macros to handle the _declspec(dllimport)/_declspec(dllexport) properly.
  • I neither don't want to pass all my API to DLLs by function pointers.

Is there a better way to work around this issue?

greydet
  • 5,509
  • 3
  • 31
  • 51
  • 2
    There doesn't seem to be a non-kludgy way to do what you're looking for. See this old question: http://stackoverflow.com/questions/225432/export-all-symbols-when-creating-a-dll But maybe someone has come up with a better technique in the few years since those answers... – Michael Burr Aug 21 '12 at 17:50
  • 1
    @MichaelBurr Yep I already found this one, but obviously it seems even more complicated to set up a .def file – greydet Aug 22 '12 at 06:50

0 Answers0