SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2012-03-02 21:14:46

sqlpython
#! Die Hard
From: New England
Registered: 2011-11-28
Posts: 931

Code::Blocks IDE and QT config

Just throwing out a help line here as I play with CodeBlocks IDE..
I have been scouring CodeBlocks and QT Googles, threads and forums but have not yet nailed it down....
I consider this bunch a savvy group of users and believe that someone here may have a lead in.
I could just work in QTCreator but trying to switch to CodeBlocks IDE
  So, any one dealing with CodeBlocks or QT or just want to throw out a suggestion thanks...

Problem:
When opening a New Project with CodeBlocks I choose a QT4 project as the choice of template.
I have already set an Environmental variables to  /usr/share/qt4; /usr/share/qt4/include and have had to creator a hard link of /usr/share/qt4/include >> /usr/share/qt4/lib  as the CodeBlocks Project template looks for  a QT lib dir although all libs seem to be in /usr/share/qt4/include...
Then CodeBlocks claims it doesn't see the QTCore lib which is in the /usr/share/qt4/include Really Strange..
So, Directly typing in  the dir..creating an Env Variable in CodeBlocks Plus a Hard link...recursively...
Is this program stupid?
  All other templates seem to work well except QT... What's Up?

  Any pointers/leads/soulutions  (no *pun intended) 

Thanks...
Solve this and the prize is  Stuffed Lentils..

Last edited by sqlpython (2012-03-02 21:16:05)


OHCG #!, Jessie,, Siduction-13.1Slackware 14Bridge,, Sabayon 13.4,

Offline

Help fund CrunchBang, donate to the project!

#2 2012-03-03 17:37:34

sqlpython
#! Die Hard
From: New England
Registered: 2011-11-28
Posts: 931

Re: Code::Blocks IDE and QT config

Follow up..for those interested.
I have discovered that when Creating the Global Variable "qt4" (Which directs the Project Wizard to dirs)
.that the New Qt4 Project will now Create...If I place Dir Path references inside of "  " (quotes)
However......................... while the Wizard will not present me with a New Qt Project template to work with the paths are ineffective. So, when the project is run the Library Headers for QT4 (listed as #include) at the top of the Main function can not  find the libraries....
Go Fish!!


OHCG #!, Jessie,, Siduction-13.1Slackware 14Bridge,, Sabayon 13.4,

Offline

#3 2012-03-05 03:25:39

sqlpython
#! Die Hard
From: New England
Registered: 2011-11-28
Posts: 931

Re: Code::Blocks IDE and QT config

Check out Codeblocks Forum and left a post but no reply yet...
Traced the problem back to 2006 and questions about how to Set up QT in Codeblocks every year since...
Most were not even answered. Real WxWidget guys.. big_smile

Anyway my solution turned out to be to start CodeBlocks and go to Menus
Settings -> Compiler Debugger Settings -> Global Compiler Settings -> [Search Dir] Tab ->  [Compiler] subTab
.......And ADD the following dir to search
although the last 18 are sub dir of the 1st the must each be listed manually for this to work

/usr/share/qt4/include/Qt  
/usr/share/qt4/include/Qt/Qt3Support
/usr/share/qt4/include/Qt/QtAssistant

.....and so on for 18 Qt subdirectories

Lastly, You must start CodeBlocks as sudo / su user

gksudo codeblocks 

AND Voila! The Qt4 apps compile....
Just I don't like running apps as sudo...
Example, some clueless user writes an app with an rm command in it that runs without needing a sudo..
Hmmmmm....


OHCG #!, Jessie,, Siduction-13.1Slackware 14Bridge,, Sabayon 13.4,

Offline

#4 2012-03-05 03:27:32

sqlpython
#! Die Hard
From: New England
Registered: 2011-11-28
Posts: 931

Re: Code::Blocks IDE and QT config

The Stuffed lentils are mine..All mine..I tell you!  Bwa ha ha ha ha ha ha ... lol


OHCG #!, Jessie,, Siduction-13.1Slackware 14Bridge,, Sabayon 13.4,

Offline

#5 2012-03-06 04:47:25

sqlpython
#! Die Hard
From: New England
Registered: 2011-11-28
Posts: 931

Re: Code::Blocks IDE and QT config

Ahem... UPDATE
  ....:lol:  I realize that this is a hot topic..So, let us not delay, read on..

We FINALLY have automated the solution Globally..... for USER launch of CODE::BLOCKS...(Not just for  root launches)

This is the Global automated solution add to Compiler Search Global All QT dirs and /usr/share/qt4/include.....
Anyway the solution turned out to be to start CodeBlocks and go to Menus
Settings -> Compiler Debugger Settings -> Global Compiler Settings -> [Search Dir] Tab ->  [Compiler] subTab
.......And ADD the following dir to search
although the last 18 are sub dir of the 1st they must each be listed manually for this to work as well as /usr/share/qt4/include...

Also recommend that you modify the Global Variable as follow
I just had to find the correct combination of dirs referenced by variable qt4

In the Code::Blocks Settings -> Globalvariables
Choosing to effect in the pop up window the variable qt4
I list the dirs this way...which compiles and works
the dirs are added this way including quotes " "
  Remember all that read this my qt4 deb installed to   /usr/share/qt4/

base  "/usr"

include "/usr/share/qt4/include"

lib "/usr/lib"

obj "/usr/bin"

Last edited by sqlpython (2012-03-06 04:48:20)


OHCG #!, Jessie,, Siduction-13.1Slackware 14Bridge,, Sabayon 13.4,

Offline

#6 2012-05-27 14:21:02

Rogues
Member
From: Hyderbad, India
Registered: 2011-07-21
Posts: 42
Website

Re: Code::Blocks IDE and QT config

This was of great help, thanks! smile

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo