PDA

View Full Version : problem with building a GUI project in QT Creator



Aver
12th March 2013, 19:01
I downloaded QT 5.0.1 with QT Creator and MinGW. When I try to bulid a project there is an error:


cc1plus.exe:-1: błąd:error: unrecognized command line option "-fno-keep-inline-dllexport"

I managed to find out that it can be a problem with a MinGW but I don't know hot to solve it. I have also a Code::Blocks with MinGW and QT Creator detected both compilers. My OS is Windows 7 64-bit. Anyone can help?

ChrisW67
12th March 2013, 23:32
So which compiler is it trying to compile with? What version of GCC is it? The bundled version should be GCC 4.7.

Aver
13th March 2013, 12:14
I don't know which compiler is used. Here is the screen:

LINK (http://s14.postimage.org/tvxqgm6xt/screen.jpg)

I can't remove any of auto-detected copilers and I don't know how to choose which compiler should be used.

ChrisW67
14th March 2013, 04:21
Take a look at the Kits tab of that dialog. Then look at the Build configuration of your Project.

Failing that read the Compile Output pane after a rebuild to see what commands are actually run

Aver
14th March 2013, 16:14
17:06:38: Running steps for project untitled2...
17:06:38: Starting: "C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin\qmake.exe" C:\Users\Adrian\Desktop\untitled2\untitled2.pro -r -spec win32-g++ "CONFIG+=debug" "CONFIG+=declarative_debug" "CONFIG+=qml_debug"
17:06:39: The process "C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin\qmake.exe" exited normally.
17:06:39: Starting: "C:\Program Files (x86)\CodeBlocks\MinGW\bin\mingw32-make.exe"
C:/Program Files (x86)/CodeBlocks/MinGW/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `C:/Users/Adrian/Desktop/untitled2-build-Desktop_Qt_5_0_1_MinGW_32bit-Debug'
C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin\uic.exe ..\untitled2\mainwindow.ui -o ui_mainwindow.h
g++ -c -pipe -fno-keep-inline-dllexport -g -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -DQT_NEEDS_QMAIN -I..\untitled2 -I"..\..\..\..\Qt\Qt5.0.1\5.0.1\mingw47_32\include" -I"..\..\..\..\Qt\Qt5.0.1\5.0.1\mingw47_32\include\Qt Widgets" -I"..\..\..\..\Qt\Qt5.0.1\5.0.1\mingw47_32\include\Qt Gui" -I"..\..\..\..\Qt\Qt5.0.1\5.0.1\mingw47_32\include\Qt Core" -I"debug" -I"." -I"." -I"..\..\..\..\Qt\Qt5.0.1\5.0.1\mingw47_32\mkspecs\wi n32-g++" -o debug\main.o ..\untitled2\main.cpp
cc1plus.exe: error: unrecognized command line option "-fno-keep-inline-dllexport"
mingw32-make[1]: *** [debug/main.o] Error 1
mingw32-make[1]: Leaving directory `C:/Users/Adrian/Desktop/untitled2-build-Desktop_Qt_5_0_1_MinGW_32bit-Debug'
mingw32-make: *** [debug] Error 2
17:06:40: The process "C:\Program Files (x86)\CodeBlocks\MinGW\bin\mingw32-make.exe" exited with code 2.
Error while building/deploying project untitled2 (kit: Desktop Qt 5.0.1 MinGW 32bit)
When executing step 'Make'

I suppose the problem must be caused by the second compiler from Code::Blocks. I don't know how to fix it. I'll try to install QT on another computer where no MinGw is installed. I'll see then if any problem occurs.

EDIT:

I checked it, on the another computer everything went well. Can I delete the compiler from Code::Blocks in QT somehow?

wysota
14th March 2013, 20:30
You can remove it from your %PATH%