View Issue Details

IDProjectCategoryView StatusLast Update
0001695NoesisGUIC++ SDKpublic2020-05-28 14:51
ReporterstevehAssigned Tojsantos 
Status resolvedResolutionfixed 
Product Version3.0.0 
Target Version3.0.1Fixed in Version3.0.1 
Summary0001695: Noesis does not compile properly with Clang as static libraries
DescriptionHi guys,

I forgot that we had changed this locally in previous Noesis versions. I've just hit this issue again as I overwrote our local slighly tweaked modified version of Noesis with the vanilla 3.0.0 base and ran into this issue again when compiling with Clang. It looks like NS_STATIC_LIBRARY is not respected on GNU / Clang for NS_DLL_IMPORT / NS_DLL_EXPORT. You can see that this definition is only considered on MSVC in CompilerSettings.h.

My fix is trivial, just check to make see if NS_STATIC_LIBRARY has been defined, and if so, define the NS_DLL_IMPORT / NS_DLL_EXPORT to empty:

    #ifndef NS_DLL_EXPORT
        #ifdef NS_STATIC_LIBRARY // @Sumo SPH - Ignore DLL export / import tags
            #define NS_DLL_EXPORT
            #if __has_declspec_attribute(dllexport)
                #define NS_DLL_EXPORT __declspec(dllexport)
                #define NS_DLL_EXPORT __attribute__ ((visibility("default")))
        #endif // @Sumo SPH - Ignore DLL export / import tags

    #ifndef NS_DLL_IMPORT
        #ifdef NS_STATIC_LIBRARY // @Sumo SPH - Ignore DLL export / import tags
            #define NS_DLL_IMPORT
            #if __has_declspec_attribute(dllimport)
                #define NS_DLL_IMPORT __declspec(dllimport)
                #define NS_DLL_IMPORT __attribute__ ((visibility("default")))
        #endif // @Sumo SPH - Ignore DLL export / import tags
TagsNo tags attached.


There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2020-05-24 15:29 steveh New Issue
2020-05-25 11:17 jsantos Assigned To => jsantos
2020-05-25 11:17 jsantos Status new => assigned
2020-05-25 11:17 jsantos Target Version => 3.0.1
2020-05-28 14:51 jsantos Status assigned => resolved
2020-05-28 14:51 jsantos Resolution open => fixed
2020-05-28 14:51 jsantos Fixed in Version => 3.0.1