User forums > Using Code::Blocks

Code::Blocks fails to find header file?

(1/2) > >>

dominover:
The link below refers to a common problem with code::blocks where code::blocks can't see the header file if the .cpp file also contains an include to that header file.

I'm experiencing this kind of problem right now but the below solution won't correct it?  Any clues as to what the below instructions are missing?




http://www.jusuchyne.com/codingchyne/2011/03/codeblocks-failed-to-find-the-header-file/

Jenna:
Setting the compiler and linker search directory is one thing you have to do in any IDE, if you do not use standard header laocation like /usr/include .

The so called workaround proposed by the link you have posted is total bullshit.
Never, never, never use absolute paths to header files or compilation will break sooner or later.
Source code will not be portable or usable by others without changing the code itself.

And if the search path is configured properly it will for sure work.
But note: backslashes in include paths (e.g. #include <wx\window.h>) are not allowed and make sure you use the correct case for paths and names.
Backslashes work on windows (mostly) and case doesn't matter there. But for portable code and on linux/mac it's not allowed !!

MortenMacFly:
Sorry, but the thread you are pointing to is (excuse my french) but bullshit.

Its missing the basic steps of how to setup a project. If you have compilation unit that include header files, you need to setup a project and setup the compiler include paths accordingly.

If you look at the full compiler log (which is not provided in the other thread) you'll see such mistakes easily. If you experience such an issue, post the full compiler log here and I tell you what you did wrong.

The author of the other thread should read the Code::Blocks manual and try to understand the basics of how a compiler / linker works. This you can do best w/o IDE at the command line - thats what I did before I used IDE's at all. And it keeps me safe from such simple mistakes for the rest of my life.

dominover:
So we've confirmed that it's .... b_ _ ..sh__t .  How about some constructive input if you really want to help.  Maybe I will use just the command line one day but at this stage I'm not even going to consider it.


--- Quote ---ts missing the basic steps of how to setup a project
--- End quote ---

What does this have to do with it?  The link has nothing to do with setting up code::blocks.. It's aimed at solving a particular problem.



--- Quote ---The author of the other thread should read the Code::Blocks manual and try to understand the basics of how a compiler / linker works.
--- End quote ---

What other thread?   Are we still on the same topic?


--- Quote ---And if the search path is configured properly it will for sure work.
--- End quote ---

Not in this case.  I know of to configure the search path. 

Jenna:

--- Quote from: dominover on November 22, 2012, 04:57:52 am ---So we've confirmed that it's .... b_ _ ..sh__t .  How about some constructive input if you really want to help.  Maybe I will use just the command line one day but at this stage I'm not even going to consider it.

--- End quote ---
That means you don't want to know what's going on behind the scenes.
But that's needed (in many cases) to see what's going wrong.


--- Quote from: dominover on November 22, 2012, 04:57:52 am ---
--- Quote ---ts missing the basic steps of how to setup a project
--- End quote ---

What does this have to do with it?  The link has nothing to do with setting up code::blocks.. It's aimed at solving a particular problem.

--- End quote ---
It's not about setting up Code::Blocks, but a project inside C::B, which is (obviously) not the same.
And without setting up the project correctly, there will no reliable solution !


--- Quote from: dominover on November 22, 2012, 04:57:52 am ---


--- Quote ---The author of the other thread should read the Code::Blocks manual and try to understand the basics of how a compiler / linker works.
--- End quote ---

What other thread?   Are we still on the same topic?


--- End quote ---
I guess he meant the thread in the link you posted, a thread is not necessary a thread in our forum.


--- Quote from: dominover on November 22, 2012, 04:57:52 am ---
--- Quote ---And if the search path is configured properly it will for sure work.
--- End quote ---

Not in this case.  I know of to configure the search path. 

--- End quote ---
So why don't you come up with the information mentionened by MortenMacFly:

--- Quote from: MortenMacFly on November 21, 2012, 08:22:23 pm ---If you look at the full compiler log (which is not provided in the other thread) you'll see such mistakes easily. If you experience such an issue, post the full compiler log here and I tell you what you did wrong.

--- End quote ---

You want steps to slove your problem, but you seem not to be willing (or able?) to give the necessary information.

By the way, you even miss the basic informations like C::B version, OS, probably compiler and version, etc..

Navigation

[0] Message Index

[#] Next page

Go to full version