Closed kelteseth closed 9 years ago
The README has build instructions that should work fine on Windows (minus the use of sudo, a Linux/OS X command):
qmake
make
make install
This will install the framework in your system's QML modules directory so you can use it as a shared framework with import Material 0.1
I am a bit lost with windows here. On my linux laptop I have no problems installing qml-material. I succesful created a Makefile and copied it to the qml-extra directory. But when I try to use the make command with the mingw32-make.exe I get the following error message:
C:\Qt\Tools\mingw491_32\bin> mingw32-make.exe make C:\Users\Elias\Documents\GitHu
b\qml-extras
mingw32-make.exe: *** No rule to make target 'make'. Stop.
Thanks!
@kelteseth Try changing directories to C:\Users\Elias\Documents/GitHub\qml-extras and then run _C:\Qt\Tools\mingw49132\bin\mingw32-make.exe install
I do wonder why you copied a Makefile, though... That sounds wrong. Qmake should have created the Makefile in place for you.
I:\Develope\qml-material>mingw32-make.exe cd modules\Material\ && ( if not exist Makefile D:\Qt\Qt5.4.0\5.4\msvc2010_opengl\bin\qmake.exe I:\Develope\qml-material \modules\Material\Material.pro -o Makefile ) && mingw32-make.exe -f Makefile mingw32-make.exe[1]: Entering directory 'I:/Develope/qml-material/modules/Material' mingw32-make.exe[1]: Nothing to be done for 'first'. mingw32-make.exe[1]: Leaving directory 'I:/Develope/qml-material/modules/Material' cd tests\ && ( if not exist Makefile D:\Qt\Qt5.4.0\5.4\msvc2010_opengl\bin\qmake.exe I:\Develope\qml-material\tests\test s.pro -o Makefile ) && mingw32-make.exe -f Makefile mingw32-make.exe[1]: Entering directory 'I:/Develope/qml-material/tests' mingw32-make.exe -f Makefile.Release mingw32-make.exe[2]: Entering directory 'I:/Develope/qml-material/tests' Makefile.Release:62: * missing separator. Stop. mingw32-make.exe[2]: Leaving directory 'I:/Develope/qml-material/tests' Makefile:34: recipe for target 'release' failed mingw32-make.exe[1]: * [release] Error 2 mingw32-make.exe[1]: Leaving directory 'I:/Develope/qml-material/tests' Makefile:74: recipe for target 'sub-tests-make_first' failed mingw32-make.exe: *\ [sub-tests-make_first] Error 2
@cgafeng You're using the mingw32 make utility, but your Qt build is for MSVC 2010. I'm not sure if you can mix those two. That might be your issue here; I'm not sure. You might need to use nmake if you want to stick with the MSVC build of Qt, but I have no idea how to use it.
@nathanhourt Thanks for your help!
C:\Users\Elias\Documents\GitHub\qml-extras>C:\Qt\5.4\mingw491_32\bin\qmake.exe
C:\Users\Elias\Documents\GitHub\qml-extras>C:\Qt\Tools\mingw491_32\bin\mingw32-m
ake.exe install
cd tests\ && ( if not exist Makefile C:\Qt\5.4\mingw491_32\bin\qmake.exe C:\User
s\Elias\Documents\GitHub\qml-extras\tests\tests.pro -o Makefile ) && C:/Qt/Tools
/mingw491_32/bin/mingw32-make -f Makefile install
mingw32-make[1]: Entering directory 'C:/Users/Elias/Documents/GitHub/qml-extras/
tests'
C:/Qt/Tools/mingw491_32/bin/mingw32-make -f Makefile.Release install
mingw32-make[2]: Entering directory 'C:/Users/Elias/Documents/GitHub/qml-extras/
tests'
g++ -c -pipe -fno-keep-inline-dllexport -O2 -Wall -Wextra -frtti -fexceptions -m
threads -DUNICODE -DQUICK_TEST_SOURCE_DIR="\"C:/Users/Elias/Documents/GitHub/qml
-extras/tests\"" -DQT_NO_DEBUG -DQT_QMLTEST_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -D
QT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I"C:\Qt\5.4\mingw491_32\include"
-I"C:\Qt\5.4\mingw491_32\include\QtQuickTest" -I"C:\Qt\5.4\mingw491_32\include\Q
tWidgets" -I"C:\Qt\5.4\mingw491_32\include\QtGui" -I"C:\Qt\5.4\mingw491_32\inclu
de\QtQml" -I"C:\Qt\5.4\mingw491_32\include\QtNetwork" -I"C:\Qt\5.4\mingw491_32\i
nclude\QtCore" -I"release" -I"C:\Qt\5.4\mingw491_32\mkspecs\win32-g++" -o releas
e\tst_extras.o tst_extras.cpp
g++: error: CreateProcess: No such file or directory
Makefile.Release:153: recipe for target 'release/tst_extras.o' failed
mingw32-make[2]: *** [release/tst_extras.o] Error 1
mingw32-make[2]: Leaving directory 'C:/Users/Elias/Documents/GitHub/qml-extras/t
ests'
Makefile:44: recipe for target 'release-install' failed
mingw32-make[1]: *** [release-install] Error 2
mingw32-make[1]: Leaving directory 'C:/Users/Elias/Documents/GitHub/qml-extras/t
ests'
makefile:50: recipe for target 'sub-tests-install_subtargets' failed
mingw32-make: *** [sub-tests-install_subtargets] Error 2
@kelteseth It looks like Qt's MinGW gcc is not in PATH, which it requires. If you use QtCreator to manage the project, it will set PATH for you, but you can also add gcc's path (I think it's in C:\Qt\Tools\mingw491_32\bin on your system) to PATH yourself.
@nathanhourt Ive added 'C:\Qt\Tools\mingw48_32\bin' and 'C:\Qt\Tools\mingw491_32\libexec\gcc\i686-w64-mingw32\4.9.1' to my windows path (http://www.richelbilderbeek.nl/CppInstallErrorGppErrorCreateProcessNoSuchFileOrDirectory.htm) but now I get an error message that the libwinpthread-1.ddl is missing:
C:\Users\Elias\Documents\GitHub\qml-extras>C:\Qt\Tools\mingw491_32\bin\mingw32-m
ake.exe install
cd tests\ && ( if not exist Makefile C:\Qt\5.4\mingw491_32\bin\qmake.exe C:\User
s\Elias\Documents\GitHub\qml-extras\tests\tests.pro -o Makefile ) && C:/Qt/Tools
/mingw491_32/bin/mingw32-make -f Makefile install
mingw32-make[1]: Entering directory 'C:/Users/Elias/Documents/GitHub/qml-extras/
tests'
C:/Qt/Tools/mingw491_32/bin/mingw32-make -f Makefile.Release install
mingw32-make[2]: Entering directory 'C:/Users/Elias/Documents/GitHub/qml-extras/
tests'
g++ -c -pipe -fno-keep-inline-dllexport -O2 -Wall -Wextra -frtti -fexceptions -m
threads -DUNICODE -DQUICK_TEST_SOURCE_DIR="\"C:/Users/Elias/Documents/GitHub/qml
-extras/tests\"" -DQT_NO_DEBUG -DQT_QMLTEST_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -D
QT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I"C:\Qt\5.4\mingw491_32\include"
-I"C:\Qt\5.4\mingw491_32\include\QtQuickTest" -I"C:\Qt\5.4\mingw491_32\include\Q
tWidgets" -I"C:\Qt\5.4\mingw491_32\include\QtGui" -I"C:\Qt\5.4\mingw491_32\inclu
de\QtQml" -I"C:\Qt\5.4\mingw491_32\include\QtNetwork" -I"C:\Qt\5.4\mingw491_32\i
nclude\QtCore" -I"release" -I"C:\Qt\5.4\mingw491_32\mkspecs\win32-g++" -o releas
e\tst_extras.o tst_extras.cpp
g++: error: CreateProcess: No such file or directory
Makefile.Release:153: recipe for target 'release/tst_extras.o' failed
mingw32-make[2]: *** [release/tst_extras.o] Error 1
mingw32-make[2]: Leaving directory 'C:/Users/Elias/Documents/GitHub/qml-extras/t
ests'
Makefile:44: recipe for target 'release-install' failed
mingw32-make[1]: *** [release-install] Error 2
mingw32-make[1]: Leaving directory 'C:/Users/Elias/Documents/GitHub/qml-extras/t
ests'
makefile:50: recipe for target 'sub-tests-install_subtargets' failed
mingw32-make: *** [sub-tests-install_subtargets] Error 2
The output you pasted is the same as before...
Update: I successful copied the copiled files from my fedroa laptop /home/Kelteseth/Qt/5.4/gcc_64/qml/Material to my windows pc mingw folder and its works fine. Its also works on my android device. Maybe we could use github releases for the windows folks out there ;)
@kelteseth The install instructions work fine and are cross-platform, there is just something wrong with your local setup.
For the record, instead of trying to compile Qt apps in Windows yourself (which is a chore because the included mingw toolchain is very stripped down/limited), I would HIGHLY recommend cross-compiling Windows Qt apps in Linux using MXE (https://github.com/mxe/mxe). I've gone through many headaches before settling on this seamless solution.
As a side note (if that's of any help to someone), if you are on Windows with Visual C++ installed and you don't have the make
command available:
Note: I'm using a Windows x64 system with Visual C++ 2013 and a x64 Qt (5.5.1 as I'm writing this).
"VS2013 x64 Cross Tools Command Prompt"
)bin
directory of your Qt installation):
C:\Qt\Qt5.5.1\5.5\msvc2013_64\bin\qtenv2.bat
bin
directory path is in your %PATH% env variable, add it if it's not:
set path=C:\Qt\Qt5.5.1\Tools\QtCreator\bin\;%PATH%
jom.exe
(which is in the QtCreator directory) in your PATH. Jom is a make
compatible tool from Qt.qml-material
repository> qmake
> jom all
> jom install
You should have now the test executable and qml-material
installed:
C:\Qt\Qt5.5.1\5.5\msvc2013_64\tests\tst_material.exe
for the test executableC:\Qt\Qt5.5.1\5.5\msvc2013_64\qml\Material
for the qml-material
directoryWith your prompt (you must have the Qt bin directory in your PATH)
> qmlscene .\demo\main.qml
Hope that is of any help.
When run 'jom all', got this error: C:\Qt\Qt5.5\5.5\msvc2013_64\include\QtCore/qglobal.h(39) : fatal error C1083: Cannot open include file: 'cstddef': No such file or directory Looks like unix '\' problem?
I would also like to point out that once you run qmake
, you can run nmake install
on MSVC compiler, and then restarting Creator will allow you to import Material 0.1
when i run make i qet an error code 604 with the Qt 5.5 command tool and the MSVC 2015 cross compiler doesnt recognize gcc
@Kunoacc on Windows, if you are using MSVC, then you run nmake
not make
if you want to install it for future use, you use nmake install
nmake install outputs this error after copying a few files
@Kunoacc I think a little needs to be explained. VS cross compiler is not like the other *nix cross compilers. Instead of compiling for different Operating Systems, it compiles for 2 different architectures, so that it runs on x86 and x86_64 on windows. It will not generate a program for linux, or unix. That is why it is telling you it cannot find g++. In general, you cannot really mix MinGW (which you are using for Qt) and Visual Studio (which you are using for make). My suggestion is that you either install MinGW and add that to your path, or install a version of qt that has qt-opensource-windows-x86-msvcXXXX, where XXXX is the year of the Visual Studio version you are running. Hope this helps.
but what is that last block of code for because as it stands i can still import Material 0.1 but i can't edit it with the designer, the form is just blank
This is running the tests, which failed. You didn't give the full output, but it seems the test failed because it couldn't find g++, I don't know why Material installed. Also, I do not believe Material supports the designer. You may have to do some of the work by hand. I could be wrong.
What would be the best setting to work on Windows, what version of QT and compilers are optimal? I tried with the comment @neitsa works "qmlscene" command but I can not run the executable, I have problems with icons not loading using "qmlscene".
How do I install qml-material in order to use it in my applications as normal QML import? Do I have to copy the qml files every time to my project or can I use it somehow like a shared libary?