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

Error compiling with Mingw 64 #93

Closed
tiedtke opened this issue Aug 5, 2016 · 2 comments
Closed

Error compiling with Mingw 64 #93

tiedtke opened this issue Aug 5, 2016 · 2 comments

Comments

@tiedtke
Copy link

tiedtke commented Aug 5, 2016

I'm trying to compile qjson using the mingw64 provided by the msys2 [1] and mingw64 (gcc version 6.1.0 (Rev1, Built by MSYS2 project) [2].

I'm using the latest updates from git.

Using cmake or cmake-gui, configure and generate runs ok, with these messages in output:

Qt5 found (in red)
Enable QStringBuilder (in red)
Configuring done
Generating done

Now, in the console of msys2:

cd build
mingw32-make.exe

Some error occurs in the compilation, time, like these lines copied from console:

Tiedtke@Tiedtke-PC MINGW64 ~/dev/qjson/build
$ mingw32-make.exe
[ 11%] Building CXX object src/CMakeFiles/qjson-qt5.dir/parser.cpp.obj
[ 22%] Building CXX object src/CMakeFiles/qjson-qt5.dir/qobjecthelper.cpp.obj
[ 33%] Building CXX object src/CMakeFiles/qjson-qt5.dir/json_scanner.cpp.obj
[ 44%] Building CXX object src/CMakeFiles/qjson-qt5.dir/json_parser.cc.obj
[ 55%] Building CXX object src/CMakeFiles/qjson-qt5.dir/parserrunnable.cpp.obj
[ 66%] Building CXX object src/CMakeFiles/qjson-qt5.dir/serializer.cpp.obj
[ 77%] Building CXX object src/CMakeFiles/qjson-qt5.dir/serializerrunnable.cpp.obj
mingw32-make[2]: *** No rule to make target 'src/qjson-qt5_autogen.cpp', needed by 'src/CMakeFiles/qjson-qt5.dir/qjson-qt5_autogen.cpp.obj'. Stop.
CMakeFiles\Makefile2:117: recipe for target 'src/CMakeFiles/qjson-qt5.dir/all' failed
mingw32-make[1]: *** [src/CMakeFiles/qjson-qt5.dir/all] Error 2
Makefile:126: recipe for target 'all' failed
mingw32-make: *** [all] Error 2

Searching the file: qjson-qt5_autogen.cpp I verified that it not exists or was not generated.

There are some tips for use in mingw64 that I forgot?

Thanks on advance!

Best Regards.

Thiago Tiedtke dos Reis

[1] https://msys2.github.io/
[2] https://github.com/Alexpux/MINGW-packages and https://github.com/Alexpux/MSYS2-packages

@flavio
Copy link
Owner

flavio commented Aug 8, 2016

Sorry, but I have no experience with building on Windows.

@tiedtke
Copy link
Author

tiedtke commented Aug 9, 2016

Hi,

After reading something in internet, I've noticed that the problem remais in version of used qt.

With a simple modification in CMakeLists.txt the package was generated.

in:

./src/CMakeLists.txt

I've commented the follow lines:

#IF (NOT Qt5Core_FOUND)
qt5_wrap_cpp(qjson_MOC_SRCS ${qjson_MOC_HDRS})
#ENDIF()

And the code compiles fine.

I think this one is not a elegant solution, but the intentuon is just help another users.

Best Regards,

Tiedtke

@tiedtke tiedtke closed this as completed Aug 9, 2016
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