Questions tagged [codeblocks]

This tag is for Code::Blocks, an open-source C++ IDE. Do not use this tag for code blocks which define scope (e.g. curly braces).

Code::Blocks is a free, open-source and cross-platform IDE which supports many languages, see the list of supported compilers.

This tag shall not be used for code blocks that define scope, e.g. variable declarations like

{
    // code block
    int i=0;
}
4116 questions
169
votes
3 answers

"Undefined reference to" template class constructor

I have no idea why this is happenning, since I think I have everything properly declared and defined. I have the following program, designed with templates. It's a simple implementation of a queue, with the member functions "add", "substract" and…
Heathcliff
  • 2,578
  • 4
  • 22
  • 36
95
votes
12 answers

C++ Boost: undefined reference to boost::system::generic_category()

I am trying to include Boost libraries in my project and have been facing issues in the same. I am on Ubuntu 12.10 with Codeblocks IDE and tried installing the libraries manually reading instructions from the site, but was getting error's with…
Cipher
  • 5,404
  • 19
  • 70
  • 111
74
votes
19 answers

Cannot open output file, permission denied

So I keep getting this error when trying to compile C++ code using CodeBlocks. cannot open output file [filename.exe] permission denied It only started today, and it's sporadic and inconsistent. It usually goes away if I shut CodeBlocks down and…
GarrickW
  • 2,021
  • 4
  • 28
  • 37
62
votes
4 answers

How can I add C++11 support to Code::Blocks compiler?

I'm writing some code that requires to have C++11 support for my Code::Blocks 12.11. I am using default GNU GCC Compiler came with MingW. Is there any way I can do this?
Amber Roxanna
  • 1,529
  • 4
  • 21
  • 28
56
votes
1 answer

How to split a C program into multiple files?

I want to write my C functions in 2 separate .c files and use my IDE (Code::Blocks) to compile everything together. How do I set that up in Code::Blocks? How do I call functions in one .c file from within the other file?
amin
  • 675
  • 2
  • 7
  • 7
54
votes
12 answers

ld.exe: cannot open output file ... : Permission denied

I recently installed CodeBlocks with mingw32 on Windows 7 Ultimate 32bit in order to dust off my c skills, but this problem has me somewhat stumped. I decided to fire off a short Fibonacci generator to make sure my setup was working, but I ran into…
gzzzur
  • 725
  • 1
  • 5
  • 16
48
votes
3 answers

"winapifamily.h: No such file or directory" when compiling SDL in Code::Blocks

I am following along with the SDL2.0 tutorials by LazyFoo, using Code::Blocks 13.12. I have had no trouble getting SDL2 linked and running in VS2010 but have changed IDE and come across this error: winapifamily.h: No such file or directory I think…
user3427293
  • 481
  • 1
  • 4
  • 3
48
votes
4 answers

Qt undefined reference to vtable

I am a beginner to Qt programming and use codeblocks for my programming. I created 3 files communicate.h,commmunicate.cpp and main.cpp as follows: communicate.h #ifndef COMMUNICATE_H #define COMMUNICATE_H #include #include…
Jijo
  • 1,024
  • 3
  • 12
  • 20
47
votes
3 answers

Warning: array subscript has type char

When I am running this program I am getting warning "array subscript has type 'char'". Please help me where is it going wrong. I am using code::blocks IDE #include #include #include #include void NoFive() { …
Rasmi Ranjan Nayak
  • 9,936
  • 25
  • 76
  • 114
44
votes
3 answers

fatal error: iostream.h no such file or directory

Possible Duplicate: No such file iostream.h when including Even after naming the source file with .cpp extension. my compiler gives this error, both in command prompt and Codeblocks. How can I fix this issue? #include int…
Assasins
  • 1,483
  • 5
  • 18
  • 21
42
votes
1 answer

glibconfig.h no such file or directory

I just installed glib in Raspbian(Debian version). I want to read a config file using glib. I am trying to write a C application in Codeblocks and I use the header #include But I have an error in gtypes.h fatal error:glibconfig.h No such…
dali1985
  • 2,983
  • 13
  • 44
  • 64
41
votes
6 answers

Getting Clang to work on windows

I have followed the following step by step guide and I've managed, after a bit of fiddling, to get clang to compile using code:blocks and MinGW. Great, so now I could add the Clang module to eclipse (why have one IDE when you can have four) and…
Luther
  • 1,614
  • 2
  • 19
  • 35
40
votes
10 answers

Can't find file executable in your configured search path for gnc gcc compiler

My problem is that code::blocks error message tells me that it can't find file executable in the search path for gnc gcc compiler. Although, I don't know what that means. Also I typed out some code: #include using namespace std; …
swydell
  • 1,802
  • 7
  • 29
  • 43
37
votes
2 answers

making a constant array in c++

Is there any reason why codeblocks is telling me that I can't make an array? I'm simply trying to do: const unsigned int ARRAY[10] = {0,1,2,3,4,5,6,7,8,9}; and it's giving me error: a brace-enclosed initializer is not allowed here before '{'…
hotdiggadydang
  • 371
  • 1
  • 3
  • 3
37
votes
1 answer

Shortcut for moving a block of code over 4 indents in IntelliJ IDEA

Does anyone know the shortcut for shifting a block of code in IntelliJ over by a few indents? (For the CSS editor, Coda, I used to select the block or blocks of code and use the shift and left or right carrot symbols to shift the code right or…
Chapsterj
  • 5,833
  • 18
  • 66
  • 121
1
2 3
99 100