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 on QT 5 MinGW windows XP #2

Closed
dibok opened this issue Feb 22, 2013 · 7 comments
Closed

Cannot compile on QT 5 MinGW windows XP #2

dibok opened this issue Feb 22, 2013 · 7 comments
Labels

Comments

@dibok
Copy link

dibok commented Feb 22, 2013

Hi, (issue copied from code.google, I saw that git is new repo)

Maybe will be better when you read this stackoverflow topic:
http://stackoverflow.com/questions/15029894/qt-cant-add-external-package

I have also tried precompiled binaries but they need Qt 4. So I don't know what to do.

Notice that on linux 64bit Qt 5.0.1 it is working fine. I just added whole tufao source into my project and everything works fine. On windows this trick doesn't work. I get hounded of errors "undefined reference...".

Regards

@dibok
Copy link
Author

dibok commented Feb 23, 2013

Ok. In my library project I forgot this lines:
CONFIG += dll
DEFINES += TUFAO_LIBRARY

Now I get tufao.dll but when want to use it in my simple test application then it crash on startup with SIGSEGV. Debugger stop in line:
const QMetaObject Tufao::WebSocket::staticMetaObject = {
{ &AbstractMessageSocket::staticMetaObject, qt_meta_stringdata_Tufao__WebSocket.data,
qt_meta_data_Tufao__WebSocket, qt_static_metacall, 0, 0}
};

in file moc_websocket.cpp

@vinipsmaker
Copy link
Owner

This doesn't seem to be a bug in the code that I am providing. It seems like a bug in your customized version of Tufão.

If it's not a bug in the official Tufão code, you should use another channel to comunicate and then, I may help.

Why aren't you using the official build and install instructions?

If you really need to use qmake to build Tufão, a good start point is the qmake file project that Tufão used to have.

@dibok
Copy link
Author

dibok commented Feb 23, 2013

Ok I finally get it working by adding all source into my dest project. So I'm using tufao without dll, but while compiling I get houndred of errors: "undefined reference to imp_". But after adding DEFINES += TUFAO_LIBRARY my project compiling fine. Why this is needed?

@dibok
Copy link
Author

dibok commented Feb 23, 2013

... and I can't use official instructions because I can't configure CMake to working with MinGW shipped with QT Creator

@vinipsmaker
Copy link
Owner

TUFAO_LIBRARY macro controls whether the implementation should be exported or imported. Read this if you want to know more.

Doesn't the following work?

cmake -G"MinGW Makefiles"

This is weirdo, because CMake supports MinGW.

@dibok
Copy link
Author

dibok commented Feb 23, 2013

Thanks for explanation. I'm very newbie in C++ world. CMake GUI throw me a lot of errors like it cant find make program etc (I have QT\bin\ in system PATH but there is only qmake, no make). Some times ago I tried to install MinGW but then I had conflicts with MinGW in QT\bin. So now I have clean OS with QT only and trying to use QT tools so I'm sure that everything should works fine.

@vinipsmaker
Copy link
Owner

The PATH environment variable tells where to find the executables. Qt SDK provides a command prompt where this variable is well-defined to work with Qt. If you run CMake from within this environment, you should be able to compile the project.

It's not a good habit convert build issues in source code issues. What if I release a new version of Tufão containing security fixes? You would need to edit your source code to include the fixes.

Include the dependency with the app itself is more common if you are building a game and/or the dependency is a script engine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants