Common problems and solutions

From Code::Blocks
Revision as of 03:01, 5 September 2011 by Alpha (talk | contribs) (Created page with "This page contains many of the common problems Code::Blocks users may run into and their solutions. ==I cannot use the debugger== ===Problem=== All the options in the debug men...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This page contains many of the common problems Code::Blocks users may run into and their solutions.

I cannot use the debugger

Problem

All the options in the debug menu are grayed out.

Solution

Code::Blocks can only use integrated debugging on an active project. Start a new project and add the file to it.

Note: Code:Blocks only supports the GNU GDB and MSVC CDB debuggers.

Multi-targets library and executable ignore interdependence

Problem

My project contains a two targets: static/dynamic library and an executable that links to it. Code::Blocks does not

  • build the library first.
  • force relink if the library is changed.

Solution

Open Project->Properties...->Build targets (tab) and select the executable. Click Dependencies... and add the name of the library (including its relative path) to External dependency files.

Example: output\myLibrary\libdostuff.a

I want to report compile problem abc

Problem

Every time I build my project xyz, compile problem abc happens, and I want to report it on the forums as a Code::Blocks bug.

Solution

Try building the project from command line. If the same error comes up, it is a problem with either the source file, the compiler, or the compiler setup. If this is the case, you are unlikely to receive support for it on the Code::Blocks forums, however, How do I troubleshoot an compiler problem? may help.

If it works fine building from command line, it is either a problem with your project or Code::Blocks' setup, or possibly an actual bug. When posting this problem, include the name of your compiler, operating system, Code::Blocks version, compiler log (go to Settings->Compiler and debugger...->Build options (tab) and check Save build log and Always output the full command line), and, if it caused Code::Blocks to crash, the codeblocks.RPT file (located in the Code::Blocks installation directory).

Template: Paste the following template into your post, editing the relevant sections.

OS = MyOperatingSystem
CB Version = Code::BlocksVersionNumber
Compiler = CompilerName CompilerVersionNumber

Description of relevant events.

Build log:
[code]
Paste build log here
[/code]

Crash report:
[code]
If Code::Blocks crashed, paste the contents of codeblocks.RPT here.
[/code]