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;
}
4312 questions
1
vote
1 answer

Unexpected error:"Dereferencing pointer to incomplete type" with code::blocks, c language

I'm doing this exercise for my base c programming exam and I get this error: "Dereferencing pointer to incomplete type", using code::blocks. Here is my code: struct listPlot{ char name[25]; char surname[25]; int age; struct listplot *next; struct…
1
vote
0 answers

How can I use C++11 in GNU GCC compiler in CodeBlocks?

I'm trying to use the function stoi() in a program which is a C++11 function but I can't configure my compiler to use C++11. I added the (-std=c++11) compiler flag but it didn't work. I also tried the (-std=c++0x) and it also didn't work. I also…
user3417785
  • 81
  • 1
  • 6
1
vote
1 answer

Socket programming C++ error undefined reference

#pragma comment(lib,"Ws2_32.lib") #include #include #include #include #include #include #define SCK_VERSION2 0x0202 using namespace std; int main() { long SUCCESSFUL; WSAData…
unixia
  • 4,102
  • 1
  • 19
  • 23
1
vote
1 answer

Running MPI programs with multiple processes with Code::Blocks

I am new to MPI and trying to run 'hello world' program. Here is my program #include #include using namespace std; int main(int argc, char ** argv) { int mynode, totalnodes; MPI_Init(&argc,&argv); …
user3705273
  • 325
  • 6
  • 14
1
vote
2 answers

How to fix the Code::Blocks wizard to look for GTK+ 3.0 and not 2.0?

I have been using Code::Blocks since I started programming in C, after trying every C compiler in existence under windows I found Code::Blocks the most easiest to work with because I wouldn't have to spend an entire year learning how to use the…
John Conner
  • 233
  • 1
  • 4
  • 18
1
vote
1 answer

wrong values on "watches" debugging tool

I'm struggling with some errors when I write programs using real values (float and double types). When declaring "real" as double, in watches debugging tool the value relative to this variable isn't showed in a comprehensible way. Also, the program…
user3757339
  • 7
  • 1
  • 4
1
vote
6 answers

Codeblocks c++ undefined reference error, class is defined

Hey guys I asked a question the other day about some c++ code that I couldn't get to work. I took everyones advice as to how to create objects in c++ but now I get undefined reference errors. I am using the latest code blocks version and using that…
Michael Miner
  • 964
  • 2
  • 17
  • 39
1
vote
2 answers

Compiler still builds and runs the first created file (main.cpp), doesn't run current file

I have built a project in CodeBlocks compiler. I have created a file named main.cpp and a simple main() function in it. I have run it and it works all OK! it prints "Hello World!". Then I did create a new file named "test.cpp" and in it I put a…
Mostafa Talebi
  • 8,825
  • 16
  • 61
  • 105
1
vote
1 answer

Codeblocks' Cygwin compiler isn't working

Using the default setup for Cygwin with codeblocks, I get the following error. "NameScanner - Debug" uses an invalid compiler. Probably the toolchain path within the compiler options is not setup correctly?! Skipping... Nothing to be done. I tried…
rootmeanclaire
  • 808
  • 3
  • 13
  • 37
1
vote
1 answer

Possible GCC Bug: Long arguments shortened when linking a library to project. C\C++

I'm not sure if this is a bug or I'm just missing something. I've tried this with MinGW's gcc version 4.8.1 (tdm-2) from both Code::Blocks and CodeLite, and with another library, (SFML). Whenever I link a library to my program, the arguments are…
Blerg
  • 163
  • 9
1
vote
2 answers

Code Blocks - mixing c and c++ files

So far I've been working with g++ (on Windows), but for some reasons I want to use Code:Blocks to use sfml library (quite easy configuration, contrary to clean g++). I use bison to create file.tab.c and file.tab.h (from file.y), I use flex for…
user2443194
  • 67
  • 3
  • 11
1
vote
1 answer

Bash Returning Permission Denied for Simple C Program

I'm writing my first-ever program and I've hit an immediate roadblock. I'm just trying to get some simple lines of text on the screen, but when I compile and run the program I get: /Users/myname/Desktop/program -bash:…
1
vote
0 answers

C++ setfill() Crash

I'm sorry if this has been addressed before, but after hours of searching I came up with nothing. I am new enough at C++ that perhaps I just wasn't searching for the right phrases. Essentially, here's a rundown of my problem. I'm working my way…
1
vote
1 answer

_beginthreadex leaking memory

The code below is my entire test program. Each time I press ENTER, the RAM that the process is using is increasing with 4k (it will keep increasing, without stopping; I am seeing it with task manager). What is wrong? The same things happens with…
1
vote
1 answer

what is meant by Permission denied

I downloaded CodeBlocks and cut and pasted and program I had written earlier which I stored in the Codeblocks folder The program is simple enough. #include using namespace std; int main(){ cout << "Hello. Watch…
1 2 3
99
100