-
Notifications
You must be signed in to change notification settings - Fork 793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[22704] Link problem with MinGW #5575
Comments
Hi @RookieCLY, Can you share more details on the errors that you had when compiling fastdds? And what were the "solution means" that you did? |
@Javgilavi As for the error in this issue, I solved this problem with "declspec( dllexport )" and "-Wno-attributes". So i can use almost all the symbols from libfastdds.dll and libfastdds.dll.a. |
Hi again @RookieCLY, Currently, MinGW is not officially supported, and it's highly probable your issue is related to that. At first, seams like maybe after the changes you made for compiling, an export can be missing on TypeSupport. For further help, please contact us directly to [email protected] for further work on this issue if this is a need for your project. |
Hi, @Javgilavi |
Hi @RookieCLY, Really happy to hear you successfully solve the issue!! Regarding the destructor behavior you mentioned, feel free to add any findings or workarounds you have to the existing discussion #3820 — it’s always helpful to have more details. Yes, absolutely, we encourage you to open a PR with your MinGW compilation improvements. Every contribution is appreciated, and we’re happy to review and merge good PRs that help others build Fast DDS on more platforms. Thanks again. |
I have hit the same walls as you hence reproducible and have reached the same point in compilation. Where do we go from here? |
Hi @Atharvsam , @RookieCLY has kindly opened a PR that should make compilation with MinGW possible. We will be reviewing his contribution as soon as possible, feel free to test it out in the meantime. |
Hi, @Atharvsam , I have opened a PR for this problem. Simply put, I deleted the key words virtual. if you can't wait to know it, you can get more detail in https://github.com/RookieCLY/Fast-DDS. |
Is there an already existing issue for this?
Expected behavior
I have already compile foonathan_memory, fastcdr and tinyxml2 with MinGW successfully. But there are some problem when I compile the fastdds with MinGW, like "i64 to LL","stat redefined","declspec( dllexport ) to attribute((visibility("default")))"...... I used some special means to solve these problems and finally successfully compiled fastdds, then i got libfastdds.dll and libfastdds.dll.a
Current behavior
But when I use libfastdds.dll and libfastdds.dll.a in my project, there are some thing wrong like
E:/mingw32-14/bin/../lib/gcc/i686-w64-mingw32/14.2.0/../../../../i686-w64-mingw32/bin/ld.exe: CMakeFiles\MBus.dir/objects.a(startlogPubSubTypes.cxx.obj):startlogPubSubTypes.cxx:(.text+0x5cd): undefined reference to
eprosima::fastdds::MD5::MD5()'`......All the symbol from FastDDS which i used in my project was undefined. I tried every import and export combination in fastdds_dll.hpp, "attribute((visibility("default")))" "declspec( dllexport )" "declspec( dllimport )" "null" . But does not work.
Are there some special export config for MinGW in FastDDS?
Steps to reproduce
1:Compile foonathan_memory, fastcdr and tinyxml2 with MinGW.
2:Modify the source code, like modify CMAKE_CXX_FLAGS, modify include in some files, and so on.
3:Use libfastdds.dll.a in your project.
Fast DDS version/commit
FastDDS v3.1.1 master
FastCDR v2.2.5
MinGW v14.2.0
Windows10
Platform/Architecture
Other. Please specify in Additional context section.
Transport layer
Default configuration, UDPv4 & SHM
Additional context
No response
XML configuration file
No response
Relevant log output
No response
Network traffic capture
No response
The text was updated successfully, but these errors were encountered: