Open warm-dawn opened 2 years ago
I don't think it's the problem of this project. Many have already successfully compiled in windows, please make sure you follow exactly the compile guide in readme.
I had the same issue when trying to use MinGW. Thus I used MVSC2015 instead, which worked. This is with Qt 5.15.2
Note that this is on the GUI version -- the only compile guide I found was for the console version, is there another one?
I had the same issue when trying to use MinGW. Thus I used MVSC2015 instead, which worked. This is with Qt 5.15.2
Note that this is on the GUI version -- the only compile guide I found was for the console version, is there another one?
MVSC produce slower executable, don't use it.
make sure you use Mingw64 instead of Mingw32. For Gui version I didn't actually write the compile guide, you should just set the QT C compiler to mingw64 and you should get the project running.
I tried both, makes no difference. Issue is in these lines of "Makefile.Release" in the build directory: release/moc_predefs.h: C:/Qt/5.15.2/mingw81_64/mkspecs/features/data/dummy.cpp g++ -fno-keep-inline-dllexport -openmp -O2 -Wall -Wextra -Wextra -dM -E -o release\moc_predefs.h C:\Qt\5.15.2\mingw81_64\mkspecs\features\data\dummy.cpp
Error of that g++ call is "cc1plus.exe: error: output filename specified twice" But I don't see where that 2nd specification would come from...
Can you please compare what you have in the makefile, and maybe also provide the resulting release\moc_predefs.h from the subdirectory?
I think I found the issue in teh .pro file , this fixes it quick and dirty for me: win32: {
QMAKE_CXXFLAGS += -fopenmp QMAKE_LFLAGS += -fopenmp RC_ICONS = imgs/texassolver_logo.ico }
Yes, seems to be faster by 25%, but was so only on the 2nd run onwards. 1st run was actually 20% slower, for whatever reason.
I believe this would be the proper fix:
win32-msvc*: { QMAKE_CXXFLAGS+= -openmp QMAKE_LFLAGS += -openmp RC_ICONS = imgs/texassolver_logo.ico }
win32-g++: { QMAKE_CXXFLAGS += -fopenmp QMAKE_LFLAGS += -fopenmp RC_ICONS = imgs/texassolver_logo.ico }
win64-msvc*: { QMAKE_CXXFLAGS+= -openmp QMAKE_LFLAGS += -openmp RC_ICONS = imgs/texassolver_logo.ico }
win64-g++: { QMAKE_CXXFLAGS += -fopenmp QMAKE_LFLAGS += -fopenmp RC_ICONS = imgs/texassolver_logo.ico }
I believe this would be the proper fix:
win32-msvc*: { QMAKE_CXXFLAGS+= -openmp QMAKE_LFLAGS += -openmp RC_ICONS = imgs/texassolver_logo.ico }
win32-g++: { QMAKE_CXXFLAGS += -fopenmp QMAKE_LFLAGS += -fopenmp RC_ICONS = imgs/texassolver_logo.ico }
win64-msvc*: { QMAKE_CXXFLAGS+= -openmp QMAKE_LFLAGS += -openmp RC_ICONS = imgs/texassolver_logo.ico }
win64-g++: { QMAKE_CXXFLAGS += -fopenmp QMAKE_LFLAGS += -fopenmp RC_ICONS = imgs/texassolver_logo.ico }
I see, will do some tests.
I have met the same problem when compiling on Windows
The hack https://github.com/bupticybee/TexasSolver/issues/87#issuecomment-1156893766 worked fine for me. However, https://github.com/bupticybee/TexasSolver/issues/87#issuecomment-1157015922 doesn't work for me
I have the same problems, (cc1.exe: error: output filename specified twice) what is the best solution to solve it?
keyor
try @Endle code
https://github.com/Endle/TexasSolver/commit/39859a501afe32155fcd8a77537b2ad7d7bc93a7
g++ -fno-keep-inline-dllexport -openmp -g -std=gnu++11 -Wall -W -Wextra -dM -E -o debug/moc_predefs.h C:/Qt/Qt5.11.3/5.11.3/mingw53_32/mkspecs/features/data/dummy.cpp cc1plus.exe: error: output filename specified twice Makefile.Debug:400: recipe for target 'debug/moc_predefs.h' failed mingw32-make[1]: Leaving directory 'E:/temp/build-TexasSolverGui-Desktop_Qt_5_11_3_MinGW_32bit-Debug' mingw32-make[1]: [debug/moc_predefs.h] Error 1 Makefile:36: recipe for target 'debug' failed mingw32-make: [debug] Error 2 16:59:30: 进程"C:\Qt\Qt5.11.3\Tools\mingw530_32\bin\mingw32-make.exe"退出,退出代码 2 。 Error while building/deploying project TexasSolverGui (kit: Desktop Qt 5.11.3 MinGW 32bit) When executing step "Make"