View Issue Details

IDProjectCategoryView StatusLast Update
0001695NoesisGUIC++ SDKpublic2020-05-28 14:51
ReporterstevehAssigned Tojsantos 
PrioritynormalSeveritymajorReproducibilityalways
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
        #else
            #if __has_declspec_attribute(dllexport)
                #define NS_DLL_EXPORT __declspec(dllexport)
            #else
                #define NS_DLL_EXPORT __attribute__ ((visibility("default")))
            #endif
        #endif // @Sumo SPH - Ignore DLL export / import tags
    #endif

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

Activities

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