ollydbg: These patches fail to compile on linux (I've fixed it in the branch). Also they do stuff that they should not.
Like:
1. The patch that changes the link to wx3-debug should not be pushed
Sure, I won't plan to push this commit to our svn repo. On my test, C::B crashes if it link to wx3 release library(build with g++ -O2) under Windows XP, so I have to use the debug version of wx3(build with g++ -O0).
2. Exporting functions/classes from tinyxml is wrong. Same for the other static libraries. Project needing the libs should link directly. Squirrel stuff was tricky, because of globals.
Under Windows, all the static libraries are build with all symbol exported(Note this option is enabled by default), and later those symbols were exported through codeblocks.dll(the sdk target). That's the current way we have used for many years.
I have said that before in this thread. Those kinds of static libraries are quite similar as shared libraries. And you will see that all the plugins are only need to link the the codeblocks.dll, and they don't need static to link to tinyxml like libraries.
My change on those static libraries is that I use explicitly symbol export, which means all the symbols needed to export from the codeblocks.dll is need to be decorated as "__declspec(dllexport)", This reduce the export table of the codeblocks.dll, and make resolution of the symbols a bit faster.
3. Why do you need the workaround commits? Just include the settings.h header?
The macro "WXEXPORT" is defined as empty in wxWidgets header, which make all the symbols were exported from wxWidgets shared dll. (This issue is solved by a recent commit in wx's trunk
https://groups.google.com/d/msg/wx-users/BLeNygSYyx0/-57vTa3CAwAJ I have mentioned before.
The reason why I don't use settings.h is that it does not works OK, see below:
#ifndef SETTINGS_H
#define SETTINGS_H
/*
Exclude VC++, because it has silly constraints on importing/exporting classes
from DLLs. Instead, we build "sdk" as a static library
*/
#if defined(__WXMSW__)
#ifndef DLLIMPORT
#if defined(EXPORT_LIB)
#define DLLIMPORT __declspec (dllexport)
#else
#define DLLIMPORT __declspec (dllimport)
#endif // EXPORT_LIB
#endif // DLLIMPORT
#ifndef EVTIMPORT
#if defined(EXPORT_EVENTS)
#define EVTIMPORT __declspec (dllexport)
#else
#define EVTIMPORT __declspec (dllimport)
#endif // EXPORT_EVENTS
#endif // EVTIMPORT
#else
#define DLLIMPORT
#define EVTIMPORT
#endif
#endif // SETTINGS_H
When building the static libraries mentioned before, __WXMSW__ is not defined(no wx header is included to build the static libraries). This still make the DLLIMPORT as an empty string. Unless you change the __WXMSW__ to some other windows specific macros, like _WIN32 or others.EDIT: look at the code: "#ifndef DLLIMPORT", here DLLIMPORT is defined as empty inside the wxwdigets' header files, actually we need to overwrite this definition.