Additionally, we've added the capability to link libraries at runtime, in both Windows and Mac OS X builds. A simple example for how to use this with the glewfw library is to create a header which you include instead of the glewfw.h header as follows:
#pragma onceWhen included by runtime compiled code, the library will be linked during compilation as and when required. Note that for OS X, we need to specify frameworks with "-framework [name]" and "-l[name]" where [name] is the framework or library (see ld documentation on Apple's developer site). You can link to both static and dynamic libraries this way, but the use of dynamic libraries should be preferred. With dynamic libraries only one instance will be loaded by the executable, and resources (such as graphics data) can be preserved without serialization between runtime compiles.
#include <GL/glewfw.h>
#include "RuntimeLinkLibrary.h"
#ifdef _WIN32
RUNTIME_COMPILER_LINKLIBRARY( "glewfw.lib");
RUNTIME_COMPILER_LINKLIBRARY( "opengl32.lib");
#endif
#ifdef __APPLE__
RUNTIME_COMPILER_LINKLIBRARY( "-framework glewfw");
RUNTIME_COMPILER_LINKLIBRARY( "-framework OpenGL");
#endif
Being able to use libraries is a significant improvement in functionality. For example, core rendering functionality can now be runtime compiled.
Furthermore, we've fixed up the Visual Studio property sheets so the solution will now build with Visual Studio 2012 (including the express version), though you'll need to upgrade the solution so that it uses the default VS 2012 toolset (called v110) if you want or need to. Visual Studio should prompt you to upgrade the solution when opened.
There's quite a lot more, For full list check out the commits..
Awesome! The boost dependency was one of the reasons I haven't yet tested this out myself!
ReplyDeleteLet me know if you have any questions. We're planning to put together more information on using RCC++, though it's always hard to take time away from programming.
ReplyDeleteI'm looking forwards to Sanctum 2 by the way!