/MP: No such file or directory (when Building sankore on Windows)
-
Hi all,
I am trying to build a project from source--(Sankore) and I am getting the error:
/MP: No such file or directory.The /MP is refered to in my .pro file but I can't figure out what might be going wrong.Here is the section of my .pro file that refers to it:
@win32 {
RC_FILE = resources/win/sankore.rc
CONFIG += qaxcontainer
exists(console):CONFIG += console
QMAKE_CXXFLAGS += /MP
QMAKE_CXXFLAGS_RELEASE += /Od /Zi
QMAKE_LFLAGS_RELEASE += /DEBUG
UB_LIBRARY.path = $$DESTDIR
UB_I18N.path = $$DESTDIR/i18n
UB_ETC.path = $$DESTDIR
UB_THIRDPARTY_INTERACTIVE.path = $$DESTDIR/library
system(md $$replace(BUILD_DIR, /, \))
system(echo "$$VERSION" > $$BUILD_DIR/version)
system(echo "$$LONG_VERSION" > $$BUILD_DIR/longversion)
system(echo "$$SVN_VERSION" > $$BUILD_DIR/svnversion)}@
Google search has given me a hint that it might be related to multicore processors.I am trying to run it to a 64bit Windows 7.
My dev environment is Qt Creator 2.4.1 Based on Qt 4.7.4 (32 bit).Is there anything I could do to get it to work?
Any help would be appreciated. -
Which compiler are you using to build? /MP is a msvc option, but you are setting it for all windows compilers, including mingw.
-
I don't know which compiler you should use, that depends a lot on your setup after all.
You do need to use parameters that your compiler actually understands if you want them to have any effect (not counting random ones like the parameter being considered to be a file) though.
-
Your C++ flags are "/MP", "/Od" and "/Zi" -- these are all for Visual Studio's compiler. MinGW uses a different compiler called GCC, which doesn't understand those flags.
You have two options:
Keep those flags, change your compiler
Keep your compiler, change those flags
Did you write the .pro file yourself, or did you get it from somewhere else?
-
There is of course always option 3: Keep the flags, but make sure qmake only applies them to msvc compilers.
That will allow you to build your application with both mingw and msvc which is nice when having different parties work on it.
-
It is an open source project that I want to costumize.I guess my best option is to keep the flags and change the compiler.I just learnt that it was done using visual studio 2008 with qt add ins.Looking into that .Thanks for your help.It pointed me in the right direction.
-
If it is open source, then you should definitely bother with fixing the build for both MSVC and mingw.
Next step would then require getting rid of the win32 section and the system calls. Afterwards your code might build on Linux as well which is where the biggest open source developer audience is.
-
I was in a hurry to get it running for my company .I could successfully build it and I am looking into customization options.When the time allows I plan to write down all the steps I followed and make 'm into a nice tutorial.Who knows,somebody might run into the hassle I was into the last two days.Anyways thanks for your help Tobias.
-
@musimbate
I'm encountering the same issue..Please tell me how u solved it ? :)