Author Topic: problems with code::blocks and qt  (Read 8728 times)

JuTs

  • Guest
problems with code::blocks and qt
« on: June 30, 2006, 02:49:42 pm »
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

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: problems with code::blocks and qt
« Reply #1 on: June 30, 2006, 06:47:52 pm »
Hello,

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

Best wishes,
Michael

JuTs

  • Guest
Re: problems with code::blocks and qt
« Reply #2 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.

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 ?
« Last Edit: July 01, 2006, 12:26:35 am by JuTs »

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: problems with code::blocks and qt
« Reply #3 on: July 02, 2006, 11:48:22 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.

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.

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 ?

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

  • Guest
Re: problems with code::blocks and qt
« Reply #4 on: July 03, 2006, 10:01:18 am »
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

Say that CB_IMPLEMENT_PLUGIN take only one argument but two are given

the line 31 is :
Code
CB_IMPLEMENT_PLUGIN(QtWorkbench,"QtWorkbench");


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

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: problems with code::blocks and qt
« Reply #5 on: July 03, 2006, 12:23:23 pm »
Quote
I'm trying to compile an qt example I found on trolltech website.
Hmm... looks like you try to build a Code::Blocks plugin, though?


Quote
Say that CB_IMPLEMENT_PLUGIN take only one argument but two are given
The compiler is right. Always. :)
If you get this message, then you are using SDK headers older than 13 February. Possibly, you have an old copy of outdated SDK headers in your include path, and it's using these.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

JuTs

  • Guest
Re: problems with code::blocks and qt
« Reply #6 on: July 03, 2006, 02:13:53 pm »
At the begin it was a qt project compilation problem.
Now it's a plugin compilation problem. I have downloaded the RC sources and not the svn sources.
I tried a svn checkout but I got this error :
Code
Error: PROPFIND request failed on '/svnroot/repos/codeblocks/trunk'  
Error: PROPFIND of '/svnroot/repos/codeblocks/trunk': could not connect to server (http://svn.berlios.de) 

Can someone send me the svn sources by e-mail ?
Julien.Tschaeppaet _at_ he-arc.ch

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: problems with code::blocks and qt
« Reply #7 on: July 03, 2006, 02:22:46 pm »
Are you being serious about requesting that we e-mail you a 34 MB attachment?

Maybe you want to try svn checkout svn://svn.berlios.de/codeblocks/trunk instead, that will be a lot easier for you :)

But if you insist on this e-mail thing... :lol:
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

JuTs

  • Guest
Re: problems with code::blocks and qt
« Reply #8 on: July 03, 2006, 02:54:53 pm »
with svn://svn.berlios.de/codeblocks/trunk I got
Quote
Error: Can't connect to host 'svn.berlios.de': No connection could be made because the target machine actively refused it.   

ok, try by mail to these two address (not sure that the first can receive big attachments):

Julien.Tschaeppaet _at_ he-arc.ch
contact _at_ streethockeycup.ch


Thank you


Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: problems with code::blocks and qt
« Reply #9 on: July 03, 2006, 03:00:03 pm »
Code::Blocks is open source. Please get the sources through the normal channels. We 're not emailing the source to anyone. We don't want to be considered spammers by mail servers...
Be patient!
This bug will be fixed soon...

JuTs

  • Guest
Re: problems with code::blocks and qt
« Reply #10 on: July 03, 2006, 03:03:24 pm »
I tried through svn but I got error everytime I try

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: problems with code::blocks and qt
« Reply #11 on: July 03, 2006, 03:18:02 pm »
I tried through svn but I got error everytime I try

HTTP access failed here too. Seems some server is currently down.
SVN access to svn://svn.berlios.de/codeblocks/trunk works fine though (just tried).

If it's a server problem, try again later.
If it's your problem (i.e. network connectivity), we can't fix it for you.
Be patient!
This bug will be fixed soon...

JuTs

  • Guest
Re: problems with code::blocks and qt
« Reply #12 on: July 04, 2006, 09:15:02 am »
It's ok now.

I have a question about the project's build options. There are $(#CB) variables, I think that is the directory of the c::b' sources, right ? But where have  I to define the value of $(#CB) ?
And what does mean $(#CB.INCLUDE) ?

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

JuTs

  • Guest
Re: problems with code::blocks and qt
« Reply #14 on: July 04, 2006, 02:50:56 pm »
Ok, Thank you

The compilation of the plugin seems to be ok but when I run the update script I got :

Quote
Creating output directory tree
Compressing core UI resources
Compressing plugins UI resources
Packing core UI bitmaps
Packing plugins UI bitmaps
Copying files
cp: ne peut évaluer `tools/ConsoleRunner/cb_console_runner': Aucun fichier ou répertoire de ce type
cp: ne peut évaluer `tools/ConsoleRunner/cb_console_runner': Aucun fichier ou répertoire de ce type
cp: ne peut évaluer `devel/codeblocks': Aucun fichier ou répertoire de ce type
cp: ne peut évaluer `devel/*.so': Aucun fichier ou répertoire de ce type
Stripping debug info from output tree
Creating launch-scripts

Seems that tools/ConsoleRunner/cb_console_runner is not correct.


Another problem I got when I try to run an application compiled with c::b :
Quote
./helloworld: error while loading shared libraries: libQtCore.so.4: cannot open shared object file: No such file or directory

I think that the application try to load the libraries from the /usr/lib/ directory. What I have to do in c::b to have the libraries linked with the application ?