Author Topic: Header files not found in QT (similar to a recent previous post)  (Read 4636 times)

Brian

  • Guest
I just got the newest nightly build (tonight's actually), installed QT 4.1.2 opensource, and installed MinGW (separately from Code::Blocks).  Like the QT manual said, through the command prompt, ran configure -platform in the appropriate directory and got it to run pure commands for about a minute.  When I tried to make a generic QT app in Code::Blocks, it says it can't find any of the defaulted QT header files.

From the build options, I see that my project itself has none of the properties filled in, but the default underneath my project has all of the properties filled.  This may or may not be relevant.

I've searched the forums all night and have found no solutions to my dilemma.

Thanks in advance, Brian.

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Header files not found in QT (similar to a recent previous post)
« Reply #1 on: April 08, 2006, 09:12:59 pm »
Hello,

did you set correctly the include files and libraries pathes? The best way would be to define a global variable. I defined a global variable called Qt and then in the "Build options" under directory:

Compiler: $(#Qt.include)
Linker: $(#Qt.lib)
Resource compiler: $(#Qt.include) and $(#Qt.bin)

When you asked for put the path where qt is installed, e.g, for me: C:\Programme\cvs-1-12-9\qt-3.

Best wishes,
Michael

Brian

  • Guest
Re: Header files not found in QT (similar to a recent previous post)
« Reply #2 on: April 09, 2006, 02:27:52 am »
I have a global variable defined already called QTDIR specified to C:\Qt\4.1.2

My build properties have:

Compiler -> $QTDIR\include; $QTDIR\include\QT; $QTDIR\include\QT\... (about 10 other folders that follow that convention) etc;

Linker -> $QTDIR\lib

and Resource compiler was previously blank, so I added:

Resource Compiler -> $QTDIR\include; $QTDIR\bin

It still has yet to work.  I'll try some different things from here, but do you have any ideas?

briahn06

  • Guest
Re: Header files not found in QT (similar to a recent previous post)
« Reply #3 on: April 09, 2006, 04:05:40 am »
I actually figured out my problem.  My definitions worked off of Windows user global variables, which apparently didn't work.  I changed them to a Code::Block globally defined variable, but it didn't work initially, and I realized that's because you quoted using Qt3 which I assume has all the libraries in \include, but Qt4 has them in all the subfolders.  So I had to manually add each subfolder in \include and it now seems to be working... Problem solved, thanks Michael.
« Last Edit: April 09, 2006, 08:31:16 am by briahn06 »

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Header files not found in QT (similar to a recent previous post)
« Reply #4 on: April 09, 2006, 09:54:31 pm »
I actually figured out my problem.  My definitions worked off of Windows user global variables, which apparently didn't work.  I changed them to a Code::Block globally defined variable, but it didn't work initially, and I realized that's because you quoted using Qt3 which I assume has all the libraries in \include, but Qt4 has them in all the subfolders.  So I had to manually add each subfolder in \include and it now seems to be working... Problem solved, thanks Michael.

I am happy that it works :).

To first time I have used Qt wiht C::B, I have looked how VS .NET 2003 included libraries and header files and done the "same" with C::B. Practically, I just have had to remove VS global variables and use C::B ones instead.

Yes, in Qt3 I have all the libraries and include files in one repository (and not as e.g., in Qt 4.0.1 where the include files are distributed into sub-folders).

Best wishes,
Michael