Author Topic: Problem configuring QT with Code::Blocks  (Read 4315 times)

Offline raphaelpaiva

  • Single posting newcomer
  • *
  • Posts: 2
Problem configuring QT with Code::Blocks
« on: March 15, 2010, 07:32:55 pm »
Hello guys!

I have a project in C++ and OpenGL, and now I need to do a graphic interface to it and have to use QT.
But I cannot link QT with C::B. I already searched in the forum but no answear fit to me.

I had downloaded QT 4.6.2-Mingw and installed it. At C::B I marked the checkbox "This is a custom makefile" and changed the "execution working dir" at Projects -> Properties -> Build targets to the qt Bin directory.

I configured two tools, first like this:
Name: QMAKE
Executable: C:\Qt\4.6.2\bin\qmake.exe
Parameters: -project

And the other one like this:
Name: QMAKEFILE
Executable: C:\Qt\4.6.2\bin\qmake.exe
Parameters: -makefile

He creates the file .pro normally, but when I build it gives this error:
"Execution of 'make.exe -f Makefile Debug' in 'C:\Documents and Settings\Raphael\Desktop\testador' failed.
Nothing to be done."

Please I really need help with this !

Ty !!

Raphael

waiting4you

  • Guest
Re: Problem configuring QT with Code::Blocks
« Reply #1 on: March 21, 2010, 07:49:31 am »
Do not put project in this path such contains blank space.
fyi, I use a custom makefile in codeblocks for QT project, and it seems work fine.
Code
proj.pro:
qmake -project -o proj.pro

Makefile: proj.pro
qmake -makefile proj.pro

debug: Makefile .force
$(MAKE) -f Makefile debug

release: Makefile .force
$(MAKE) -f Makefile release

debug-clean: Makefile .force
$(MAKE) -f Makefile debug-clean

release-clean: Makefile .force
$(MAKE) -f Makefile release-clean

clean: debug-clean release-clean

.force:

Finally, sorry for my pool Chinese - English.

Offline raphaelpaiva

  • Single posting newcomer
  • *
  • Posts: 2
Re: Problem configuring QT with Code::Blocks
« Reply #2 on: March 22, 2010, 07:31:10 pm »
Ty for helping !

But I have to create a file Makefile only with this code ???
Isn't it incomplete?
« Last Edit: March 22, 2010, 10:42:35 pm by raphaelpaiva »