Author Topic: Forum or Source of Information for Programming Issues Using Code::Blocks  (Read 6699 times)

Offline mathguy

  • Multiple posting newcomer
  • *
  • Posts: 12
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

  • Guest
Re: Forum or Source of Information for Programming Issues Using Code::Blocks
« Reply #1 on: November 18, 2011, 05:08:26 pm »
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.
« Last Edit: November 18, 2011, 05:10:44 pm by Neil Butterworth »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Forum or Source of Information for Programming Issues Using Code::Blocks
« Reply #2 on: November 18, 2011, 05:10:49 pm »
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
« Last Edit: November 18, 2011, 05:14:36 pm by 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!]

Offline mathguy

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Forum or Source of Information for Programming Issues Using Code::Blocks
« Reply #3 on: November 18, 2011, 05:22:58 pm »
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

  • Guest
Re: Forum or Source of Information for Programming Issues Using Code::Blocks
« Reply #4 on: November 18, 2011, 05:37:12 pm »
They're supposed to be shaded. They won't get compiled unless you #include them in something that is compiled.

Offline mathguy

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Forum or Source of Information for Programming Issues Using Code::Blocks
« Reply #5 on: November 18, 2011, 05:49:47 pm »
I do have them in the compiled files using the #include.  That's what's so perplexing.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Forum or Source of Information for Programming Issues Using Code::Blocks
« Reply #6 on: November 18, 2011, 06:33:59 pm »
Have you read this: http://en.wikipedia.org/wiki/Header_file ?
I guess you come from java/.net background :)
(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!]

Offline mathguy

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Forum or Source of Information for Programming Issues Using Code::Blocks
« Reply #7 on: November 18, 2011, 06:54:45 pm »
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

  • Guest
Re: Forum or Source of Information for Programming Issues Using Code::Blocks
« Reply #8 on: November 18, 2011, 06:57:06 pm »
It will either be compiled, or you will get an error message along the lines of:

Code
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.
« Last Edit: November 18, 2011, 06:59:55 pm by Neil Butterworth »

Offline mathguy

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Forum or Source of Information for Programming Issues Using Code::Blocks
« Reply #9 on: November 18, 2011, 07:04:13 pm »
I'm not getting that error.  I'm getting "undefined reference" errors.

zabzonk

  • Guest
Re: Forum or Source of Information for Programming Issues Using Code::Blocks
« Reply #10 on: November 18, 2011, 07:07:23 pm »
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.

Offline mathguy

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Forum or Source of Information for Programming Issues Using Code::Blocks
« Reply #11 on: November 18, 2011, 09:54:26 pm »
Ok.  Added the filename.dll.a library to the link and still get the errors.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Forum or Source of Information for Programming Issues Using Code::Blocks
« Reply #12 on: November 19, 2011, 04:46:27 am »
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.
« Last Edit: November 19, 2011, 04:49:03 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org