I know it says: > DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO > THE LINK BELOW.
But I don't think this sort of query should even be in the STR database, so I'm replying here in the offchance that the OP will see my response and we can start a dialog to help them achieve their aobjectives... > [STR New] > > Link: http://www.fltk.org/str.php?L2069 > Version: 2.0-feature > > > Can show a Window from dll, using load_plugin? I write > fltk_plugin.cxx, > including fltk_main.cxx, fltk_plugin.cxx. after compile, > fltk_main.cxx -> fltk_main.exe > fltk_plugin.cxx -> fltk_plugin.dll > Use fltk_main.exe to show a window from fltk_plugin.dll, but > CAN NOT show > normally. OK - for the benefit of the OP... - Firstly, there's something odd about how you are building your code. It appears to be fltk2 code, but your are using fltk-config (i.e. fltk-1.1's configure script) to build it? That seems very unlikely. - Secondly, that's not really how you build a "plugin", or indeed a DLL, on a winXX host. I think that approach might work on linux (for example) but even there I'd be inclined to add a "-Wl,--export-dynamic" just to be on the safe side... the way symbols and so forth are exposed under win32 is quite different, so that's going to need a bit more work. Also, it's not clear from the example whether you are linking against fltk itself as a DLL or statically. Again, for win32, it is probably more likely to work if you have fltk itself (and whatever other helper libs you are using) in DLL's, as symbol visibility between DLL's is easier than if you link static. Linking the app and the plugin *both* statically against fltk just causes you to end up with two independent copies of all the symbols, and a lot of things then just will not work, so that is unlikley to be what you intended... (Note that on linux, for example, symbols in a static lib bound to the "parent" app loading the plugin can be made visible to the plugin, but that is hard to do on win32.) Can you tell us what you are trying to do? Maybe we can show you how. SELEX Sensors and Airborne Systems Limited Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL A company registered in England & Wales. Company no. 02426132 ******************************************************************** This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ******************************************************************** _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

