Menu

#18 patch to allow enable support for building as a dll

open
nobody
Rtlib (5)
2012-10-09
2009-04-17
Ebben
No

I have modified the FBCALL definition to include the necessary declspec info for using a dll version of the rtlib when passing certain defines to the compiler.

The only modified file is src/rtlib/fb.h changes start @ line 217:

Begin Code

ifndef FBCALL

#if defined (BUILD_DLL)
    #if defined (TARGET_WIN32)  
        #define FBCALL __declspec(dllexport)
    #elif defined (TARGET_LINUX)
        #define FBCALL
    #else
        #error "Unsupported platform"
    #endif
#elif defined (USE_DLL)
    #if defined (TARGET_WIN32)
        #define FBCALL __declspec(dllimport)
    #elif defined (TARGET_LINUX)
        #define FBCALL
    #else
        #error "Unsupported platform"
    #endif
#else
    #define FBCALL
#endif

endif / !defined FBCALL /

END CODE

This patch only adds the declspec info for WIN32, it doesn't alter the makefile at all. I tested it with a simple manual build and it some portions of the code will need some work for the lib to link.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.