Skip to content

Conversation

@star-hengxing
Copy link
Contributor

No description provided.

@luadebug
Copy link
Contributor

luadebug commented Apr 20, 2025

Is it export surface (dllimport/dllexport) issue? It feels like static symbols broke for .lib on MinGW.

@star-hengxing
Copy link
Contributor Author

star-hengxing commented Apr 21, 2025

Is it export surface (dllimport/dllexport) issue? It feels like static symbols broke for .lib on MinGW.

I've also find a similar issue on MinGW: jbaldwin/libcoro#283
We need to investigate the different effects of these function decoration:

  • __attribute__((visibility("default")))
  • __declspec((dllexport/dllimport))
  • __attribute__((dllexport/dllimport))

https://github.com/FreeRDP/FreeRDP/blob/e2e6e9fd8581b779d2accba4e054fa652a13df9e/include/freerdp/api.h

#if defined _WIN32 || defined __CYGWIN__
    #ifdef FREERDP_EXPORTS
        #ifdef __GNUC__
            #define FREERDP_API __attribute__((dllexport))
        #else
            #define FREERDP_API __declspec(dllexport)
        #endif
    #else
        #ifdef __GNUC__
            #define FREERDP_API __attribute__((dllimport))
        #else
            #define FREERDP_API __declspec(dllimport)
        #endif
    #endif
#else
    #if defined(__GNUC__) && (__GNUC__ >= 4)
        #define FREERDP_API __attribute__((visibility("default")))
    #else
        #define FREERDP_API
    #endif
#endif

@luadebug
Copy link
Contributor

Is it export surface (dllimport/dllexport) issue? It feels like static symbols broke for .lib on MinGW.

I've also find a similar issue on MinGW: jbaldwin/libcoro#283 We need to investigate the different effects of these function decoration:

* `__attribute__((visibility("default")))`

* `__declspec((dllexport/dllimport))`

* `__attribute__((dllexport/dllimport))`

https://github.com/FreeRDP/FreeRDP/blob/e2e6e9fd8581b779d2accba4e054fa652a13df9e/include/freerdp/api.h

#if defined _WIN32 || defined __CYGWIN__
    #ifdef FREERDP_EXPORTS
        #ifdef __GNUC__
            #define FREERDP_API __attribute__((dllexport))
        #else
            #define FREERDP_API __declspec(dllexport)
        #endif
    #else
        #ifdef __GNUC__
            #define FREERDP_API __attribute__((dllimport))
        #else
            #define FREERDP_API __declspec(dllimport)
        #endif
    #endif
#else
    #if defined(__GNUC__) && (__GNUC__ >= 4)
        #define FREERDP_API __attribute__((visibility("default")))
    #else
        #define FREERDP_API
    #endif
#endif

I tried to rely over existing implementation, it required to add two more syslinks. It seems passing.

@star-hengxing star-hengxing marked this pull request as ready for review June 14, 2025 09:04
@star-hengxing star-hengxing requested a review from Copilot June 15, 2025 01:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new package recipe for FreeRDP to the xmake packages. Key changes include defining package metadata (homepage, description, license), adding numerous configuration options and dependencies, and providing platform-specific adjustments in the install and test functions.

@star-hengxing star-hengxing merged commit 97e8276 into dev Jun 15, 2025
73 checks passed
@star-hengxing star-hengxing deleted the freerdp branch June 15, 2025 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants