News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Forum or Source of Information for Programming Issues Using Code::Blocks

Started by mathguy, November 18, 2011, 05:04:04 PM

Previous topic - Next topic

mathguy

I understand that this is not a forum for general programming help.  Where can one seek information about programming issues related to Code::Blocks?  I have some code that works in other environments (that I don't like) that I cannot get working in Code::Blocks (which I do like).  I would like to ask some questions in that regard but it is related to specific programming I think and I don't want to violate any standards here.  Where can I ask those questions?

zabzonk

Try http://stackoverflow.com and/or http://www.reddit.com/r/learnprogramming. As I remember you were having problems outside the CB environment too? In which case don't ask about CB, as it will only muddy the waters.

oBFusCATed

Read this: http://wiki.codeblocks.org/index.php?title=FAQ-General#Q:_What_Code::Blocks_is_not.3F
Then search the internet for the appropriate forums/mailing lists/manuals/whatever related to your compiler, linker, library or framework.

Have you ask your questions to your favourite search engine?
These days they are pretty good at answering :)

Edit:

If the question is related to how to setup your project then you can ask it here, but after:
1. you've read the manual
2. you've read the FAQ in the Wiki (searching the wiki could help, too)
3. you've search the forum with the questions you're having
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

mathguy

Thank you.  I will try those resources.  I've got the other issues fixed.  Now I can't seem to get my headers to compile.  They're shaded in the Workspace.

zabzonk

They're supposed to be shaded. They won't get compiled unless you #include them in something that is compiled.

mathguy

I do have them in the compiled files using the #include.  That's what's so perplexing.

oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

mathguy

Thank you.  I will look that over.  At first glance, I'm still confused.  If I have a c source file that has #include "header.h" and the workspace has the source and header files listed, why wouldn't the header files be compiled and recognized?  They are elsewhere.  Pelles C, for example, compiles this same code with no problem (but I don't like the environment as much as CodeBlocks).

zabzonk

It will either be compiled, or you will get an error message along the lines of:

a.c:1:17: fatal error: bad.h: No such file or directory

If you are getting this message, you simply need to add the directory that contains the headers to your project's search path (and of course #include the headers) via Project|Build Options|Search Directories. Simply adding the headers to the project is not sufficient to have them compiled.

mathguy

I'm not getting that error.  I'm getting "undefined reference" errors.

zabzonk

Those are linker errors - nothing directly to do with header files! You get those errors when you have included header files but not linked in the static library or DLL that contains the functions declared in the headers. You need to add the libraries to your project via the Project|Build Options|Linker settings pane.

mathguy

Ok.  Added the filename.dll.a library to the link and still get the errors.

stahta01

Do you ever plan to turn on Full Compiler Logging?
(As I suggested on the other forum you posted in; unless there are two people with the exact same problem and forum user name.)

http://cboard.cprogramming.com/c-programming/143409-header-file-issue-codeblocks.html

The compiler log and a expert on your Compiler should be able to figure out the cause of the link issue.
(Note: They are likely going to need some part of your code to find the problem and the full real error message.)

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]