Skip to content
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

Cannot compile plugin under Windows #54

Open
Nagetier opened this issue Sep 13, 2019 · 1 comment
Open

Cannot compile plugin under Windows #54

Nagetier opened this issue Sep 13, 2019 · 1 comment

Comments

@Nagetier
Copy link

Hi,
I am trying to compile the plugin code under windows, using Qt 5.12.4 with MSVC 2017 64bit.

The first error I encountered is in extplane-plugin.pro:
QMAKE_LFLAGS = += ../extplane-server/libextplane-server.a

The compiler would give me warnings that this file couldn't be located. As .a looks like a UNIX static library to me I changed it to .lib and match the output of what extplane-server is producing:
QMAKE_LFLAGS = += ../extplane-server/extplane-server.lib

The compile error went away after that.
However, I still cannot get a working .xpl file. The QMAKE_POST_LINK step would fail with an error, however a .dll is produced which on the other hand only has a size of 118KB (seemingly way off the size of the files you distribute). I renamed it to .xpl copy it over to X-Plane but when starting X-Plane I get the expected:
Error Code = 126 : The specified module could not be found.

Is there anything I am missing when compiling the plugin?
I was also trying to manually set it to 64bit as the architecture detection in the extplane-plugin.pro file is not properly working on windows as you mentioned in your comments as well.

Thanks!

@vranki
Copy link
Owner

vranki commented Sep 15, 2019

Sounds like you're getting a shared (non-static) build.. The extplane-plugin.pro has QMAKE_LFLAGS += -shared which seems to do the trick on linux at least.

Could this be useful: https://wiki.qt.io/Build_Standalone_Qt_Application_for_Windows

Are you using Qt Creator or MSVC as build IDE?

I don't use Windows so probably I've broken the build in some change. Let me know if you get it fixed so I can update the project file and/or documentation.

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

No branches or pull requests

2 participants