User forums > Help

CB/MinGW compiler doesn't include .h files although they're there

<< < (2/3) > >>

NameZero912:
Thanks for that hint. However, I'm getting another error now:

--- Quote ----------------- Build: Debug in Aufgabe 2.8 ---------------
mingw32-g++.exe -Wall -fexceptions -g  -ID:\Programme\MinGW\include  -c "D:\Daten\FH\Info2 Practices Codeblock Projects\Aufgabe 2.8\printbits.cpp" -o obj\Debug\printbits.o
mingw32-g++.exe -Wall -fexceptions -g  -ID:\Programme\MinGW\include  -c "D:\Daten\FH\Info2 Practices Codeblock Projects\Aufgabe 2.8\main.cpp" -o obj\Debug\main.o
mingw32-g++.exe -L"D:\Daten\FH\Info2 Practices Codeblock Projects\Aufgabe 2.8\" -LD:\Programme\MinGW\lib  -o "bin\Debug\Aufgabe 2.8.exe" obj\Debug\printbits.o printbits.h.gch obj\Debug\main.o   
mingw32-g++.exe: 2.8.exe obj\Debug\printbits.o printbits.h.gch obj\Debug\main.o: No such file or directory
mingw32-g++.exe: no input files
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
--- End quote ---

What can I do about this ? the PCH setting is the default one. I tried adding some paths to the projects Debug/Release settings but it didn't help either.
And btw, is it normal that the printbits.h file appears in a grey color (compared to the cpp sources that appear in black color) ?

TDragon:

--- Quote from: NameZero912 on April 20, 2007, 07:39:23 am ---And btw, is it normal that the printbits.h file appears in a grey color (compared to the cpp sources that appear in black color) ?

--- End quote ---
No. It appears you have printbits.h set to be linked in its file properties, which will never be correct for header files. Right click the file, select Properties, find the Compile file and Link file options, and make sure both are unchecked.

NameZero912:
Ok. I unchecked the "Link" checkbox at the place you mentioned. When compiling the project the error is different now. However, the header files does STILL BE GREY, just fyi. So it's either a C::B bug or something different.

The error that is coming now ... well ... is an error that claims that it cannot find files which DO BE there in the right directories:

--- Quote ----------------- Build: Debug in Aufgabe 2.8 ---------------
mingw32-g++.exe -Wall -fexceptions -g  -ID:\Programme\MinGW\include  -c "D:\Daten\FH\Info2 Practices Codeblock Projects\Aufgabe 2.8\printbits.cpp" -o obj\Debug\printbits.o
mingw32-g++.exe -Wall -fexceptions -g  -ID:\Programme\MinGW\include  -c "D:\Daten\FH\Info2 Practices Codeblock Projects\Aufgabe 2.8\main.cpp" -o obj\Debug\main.o
mingw32-g++.exe -L"D:\Daten\FH\Info2 Practices Codeblock Projects\Aufgabe 2.8\" -LD:\Programme\MinGW\lib  -o "bin\Debug\Aufgabe 2.8.exe" obj\Debug\printbits.o obj\Debug\main.o   
mingw32-g++.exe: 2.8.exe obj\Debug\printbits.o obj\Debug\main.o: No such file or directory
mingw32-g++.exe: no input files
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
--- End quote ---
When looking into "D:\Daten\FH\Info2 Practices Codeblock Projects\Aufgabe 2.8\obj\Debug\" I can see main.o and printbits.o, obviously the compiler claims, not to be able to find the files he just compiled (which I think, is funny :D)

When I had a closer look I found out that this line

--- Quote ---mingw32-g++.exe: 2.8.exe obj\Debug\printbits.o obj\Debug\main.o: No such file or directory
--- End quote ---
discovered that the "Aufgabe " was just cut off

--> I created a new project called "Aufgabe2.8" (previous project name was "Aufgabe 2.8", note the blank between 'Aufgabe' and '2.8'). After that, it worked!
So does this generally mean projects may not have spaces in its name when the built binary would then have spaces too ? And how can I change the name of the binary ?

TDragon:

--- Quote from: NameZero912 on April 20, 2007, 03:54:58 pm ---However, the header files does STILL BE GREY, just fyi. So it's either a C::B bug or something different.

--- End quote ---
A very small C::B bug; reload the project and it will be gone.


--- Quote ---So does this generally mean projects may not have spaces in its name when the built binary would then have spaces too ? And how can I change the name of the binary ?

--- End quote ---
It should be fine for the project name and file to have spaces in them. You can change the name of the output executable in the build target properties.

NameZero912:

--- Quote from: TDragon on April 20, 2007, 07:09:56 pm ---A very small C::B bug; reload the project and it will be gone.
--- End quote ---
Thats odd, because in the meanwhile I restarted Codeblocks a couple of times (and thus reopened the same project as well) and the header file remains grey (when it is not clicked).


--- Quote from: TDragon ---It should be fine for the project name and file to have spaces in them. You can change the name of the output executable in the build target properties.

--- End quote ---
Thanks for that info.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version