DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New] Link: http://www.fltk.org/str.php?L2632 Version: 1.3-current Mathieu, thanks for your analysis and the MS link. I think most of us FLTK developers are "confused" by this MS-specific dll_export and dll_import stuff. Probably no one is using the MS tools for development, and most use static linking anyway. That said... As for why class Fl_Output is marked "don't use FL_EXPORT here !": We got a message about missing FL_EXPORT statement for classes, and I tried to add them and maybe some more. Then we got a report about error messages (I don't remember exactly which errors), and someone removed some FL_EXPORT statements and added the comment shown above. Maybe the reason was to do with link errors because of missing c'tors and d'tors. My assumptions, as far as I *may* have understood the problem: Maybe your assumption is correct that "header only" classes should not have the FL_EXPORT statement, since they would never be implemented in a (FLTK) dll. But then we are in the dilemma that derived classes would suffer from the rule that all base classes must be in the dll as well (FL_EXPORT), since their c'tors would call the base class's c'tor. Your second assumption that moving the c'tors of all classes to their own .cxx files (with FL_EXPORT) would really solve this problem seem reasonable... And you are doing it the right way if you only use FL_DLL in your compilations (FL_INTERNAL may optionally used as well, as you noted). To understand the problem even better, please answer these questions: (1) What are the exact error messages you encounter (1a) with the default build (1b) with any modifications (2) How is the structure of your project= (2a) Main program [1] with only FLTK as dll(s) ? (2b) Main program [1] + your dll(s) (including FLTK code) + FLTK dll(s) ? This might make a difference. [1] No matter if only one module or more than 1 .cxx files. (3) From which problematic FLTK classes did you derive your own classes (and if, are they in your main program or in your own dll)? With "problematic" I mean the header-only classes you mentioned above. Do you only get error messages for those that you derived your own classes from? (This would explain why we get error reports about *some* classes only, and this all doesn't seem to be consistent.) Last question: Do you have a simple project that you could post here that exhibits the problem? Maybe as a .zip or .tgz file? I'd like to understand the problem and have this fixed eventually. I could test with VS 2008/2010 Express... Link: http://www.fltk.org/str.php?L2632 Version: 1.3-current _______________________________________________ fltk-bugs mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-bugs
