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
2 answers

Where do you type in console input in codeblocks?

Apologies in advance for the simple question, but where on earth do you type in input into codeblocks? I've searched through google, but I can't find anything. For example, in eclispe, input can typed in via window->show view-> console. How do I…
Everyone_Else
  • 3,206
  • 4
  • 32
  • 55
1
vote
3 answers

CodeBlocks error in graphics library

I executed the following code in codeblocks IDE- #include #include using namespace std; int main() { int gd = DETECT, gm; initgraph(&gd, &gm, "C:\TC\BGI"); line(100, 200, 150, 250); cout << "Hello world!" <<…
Akash21795
  • 61
  • 1
  • 12
1
vote
1 answer

How to link 2 static libraries to one Code::Blocks project

I have 3 code "chunks" for my project: 2 static libraries: LibraryA and LibraryB, and a console application: Client. The client calls LibraryA and LibraryA calls LibraryB. The client does NOT use LibraryB at all. Right now, I have Library A…
ang mcg
  • 73
  • 5
1
vote
2 answers

Why my code runs faster if I build it in codeblocks?

I have created a small library (around 600 lines) in C++ in Codeblocks and I'm using OMP and O3 optimization to build it. When I try to build the same code through the terminal with a Makefile with exactly the same options (-fopenmp -O3) it runs…
pap-x
  • 564
  • 1
  • 8
  • 15
1
vote
1 answer

c++ and boost program_options error: 'desc' does not name a type

I'm trying to follow this tutorial on boost program_options, but I'm getting this error: error: 'desc' does not name a type. Here is the source code I have: #include using namespace std; namespace po =…
msknapp
  • 1,595
  • 7
  • 22
  • 39
1
vote
1 answer

Code::Blocks correctly finds but fails to open standard includes

I'm using Code::Blocks 13.12 IDE on Xubuntu 14.04 for writing C and C++ code, and in spite of correctly finding header files by the compiler, the IDE is not capable to automatically open included outside of the project tree files with "Open include…
bobeff
  • 3,543
  • 3
  • 34
  • 62
1
vote
1 answer

C - inputting correct code but receiving no output

When I run the following code and input a sentence I am not given any output. The cursor just goes to a new line. I copied this straight off the book and double checked it for mistakes (1st edition C programming language by kernighan & ritchie)…
1
vote
2 answers

How to build the program, so that DLLs won't be required at the location of EXE ( CodeBlocks )

I have, after some effort, successfully built a little piece of example code and make it run. I am using C++ in CodeBlocks 13.12 on a Win 7 x64 machine. The program makes use of wxWidgets and OpenGL libraries. The problem is, that in order to make…
James C
  • 901
  • 1
  • 18
  • 38
1
vote
2 answers

How to display/append a file's path (or any text) into an edit box? (C++ Win32 API)

In one of the programs I am working on (using only Win32 API), I am trying to use an open file dialog to select a file whose path will then appear in an edit box or a list box in the program. I have the open file dialog working (using OpenFileName),…
sg185
  • 13
  • 4
1
vote
1 answer

Undefined refrence to class constructor, when it is properly defined?

I have a class defined in a header and properly implemented(I think), and that is properly included(I think) wherever I try to use it. I think I am missing something in regards to some basic syntax surrounding class definition. I have read pretty…
balrog
  • 56
  • 8
1
vote
1 answer

Compile OpenCV 2.0 in MinGW and Codeblocks (win)

it's a long time since I try to compile OpenCV2.0 in Windows successfully but this has never happened.. (I can compile successfully in Linux) First I installed MinGW with g++, GDB and Code::Blocks.. than I installed CMake and OpenCV2.0 (editing a…
frx08
  • 4,222
  • 8
  • 37
  • 45
1
vote
1 answer

opencv undfined something wrong with my library?

I have installed opencv using the following commands: git clone https://github.com/jayrambhia/Install-OpenCV.git cd Install-OpenCV/ ./dependencies.sh ./opencv_latest.sh this gave me the following message: Package ffmpeg is not available, but is…
Thijser
  • 2,625
  • 1
  • 36
  • 71
1
vote
1 answer

Error using GNU scientific library with Code::Blocks

I am having an extraordinary problem with my current Code::Blocks (GNU GCC compiler) setup. The compiler seems to selectively run some GSL functions, but seems for some reason to have great problems when commanded to execute other GSL functions.…
TBradley
  • 31
  • 1
  • 6
1
vote
1 answer

evenUnexpected behaviour from Code Blocks (mingw32-g++ )

I was writing some function to convert base of an integer, I am using Ideone this code on ideone While it works fine on Ideone , on C::B it gives the output 484. I am using -std=c++11 ,even without it (or using -std=c++0x ) , the output is still…
zapper
  • 73
  • 5
1
vote
1 answer

c++ preprocessor location code::blocks?

I have imported a project from windows to linux in code::blocks using the import function Now I have a problem with the following code #ifdef WIN32 # ifdef A_EXPORTS # define A_SPEC __declspec(dllexport) # else # define A_SPEC…
Mike
  • 3,775
  • 8
  • 39
  • 79