User forums > Using Code::Blocks

problems with code::blocks and qt

(1/3) > >>

JuTs:
Hi

I'm trying to compile an qt example I found on trolltech website. The compilation is Ok but not the link, I got this error :


--- Quote ----------------- Build: default in t14 ---------------
Linking executable: t14
/usr/bin/ld: ne peut trouver -lQt3Support4
collect2:
ld a retourné 1 code d'état d'exécution
Process terminated with status 1 (0 minutes, 15 seconds)
0 errors, 0 warnings

--- End quote ---

Michael:
Hello,

Because you have forgotten to add the required library to the linker. Add it and try again.

Best wishes,
Michael

JuTs:
Thank you

You were almost right, the required library where defined but in relative path. I changed them in absolute path and it's ok now.

But I have another problem. with the makefile this time.

All is ok with the Qt template provided by Code::Blocks (the Hello World example).
But with with more elaborated example (the trolltech's tutorial) the Makefile is not generated. If I generate it myself (in a console with qmake -project and then qmake) and check the box "This is a custom Makefile" it's ok. But what I have to do if I want that Code::Blocks generate it itself ?

Michael:

--- Quote from: JuTs on June 30, 2006, 11:21:41 pm ---Thank you

You were almost right, the required library where defined but in relative path. I changed them in absolute path and it's ok now.

--- End quote ---

Hello,

Even if an absolute path works fine, you should try a relative one. If not you will probably be able to compile only on your computer. IMHO, the relative path you were using was not set correctly.


--- Quote from: JuTs on June 30, 2006, 11:21:41 pm ---But I have another problem. with the makefile this time.

All is ok with the Qt template provided by Code::Blocks (the Hello World example).
But with with more elaborated example (the trolltech's tutorial) the Makefile is not generated. If I generate it myself (in a console with qmake -project and then qmake) and check the box "This is a custom Makefile" it's ok. But what I have to do if I want that Code::Blocks generate it itself ?

--- End quote ---

C::B does not generate automatically makefiles. If you are interested in Qt, you might would like to have a look at yop's plugin :). Try a search in the forum and you will found it.

Best wishes,
Michael

JuTs:
Ok.

I tried to compile it and I got this error :


--- Quote ---src/qtworkbench.cpp:31: erreur: la macro « CB_IMPLEMENT_PLUGIN » a reçu 2 arguments, mais elle n'en prend que 1

--- End quote ---

Say that CB_IMPLEMENT_PLUGIN take only one argument but two are given

the line 31 is :

--- Code: ---CB_IMPLEMENT_PLUGIN(QtWorkbench,"QtWorkbench");
--- End code ---


I tried to remove one argument end then the other but didn't work.

Navigation

[0] Message Index

[#] Next page

Go to full version