Questions tagged [codeblocks]

1

votes
0

answer
328

Views

Set up C++ with Code::Blocks in Linux Mint

Im new to C++ developing and can't get Code::Blocks to compile correctly. It exits with Process terminated with status -1 The program is a very basic 'Hello World' program. #include using namespace std; int main() { cout
NobodyIsPerfect
1

votes
0

answer
302

Views

Mac OSX CodeBlocks specify a debugger error

I am utilizing OSX and CodeBlocks to complete a C++ course. I have no problem with compiling code. I have command line tools and xcode both installed on my device. I have also tried correcting the error as specified the message. However when I try to debug a program I get the following error: ERR...
Chace Mcguyer
1

votes
0

answer
323

Views

Why am I getting these linker errors with cinder and CodeBlocks?

I'm having a bit of trouble compiling a project of mine using Code::Blocks and llvm-clang on Windows 10. Here's some of the error msg as its waay too long to fit in fully, but all of what should be needed is in there. clang++.exe -LC:\Qub3d\cinder_master\lib -o bin\Debug\Qub3d.exe obj\Debug\src\main...
TMcSquared
1

votes
0

answer
319

Views

how to create and setup Qt project in codeblocks?

I am new to programming and I have created a few projects in Allegro and SDL but I have problem in creating Qt projects, whenever I download Qt version and intall it in bin folder it doesn't work. Please help me! Tell me the steps to download and setup Qt in Code blocks.
1

votes
2

answer
136

Views

Program hangs and does not loop

I am a beginner in c++. I wrote a program to separate the digits in an integer entered and display them and their sum. However, when the loop repeats, the program hangs even though it compiled perfectly. I tried a '... while' loop and a while loop but the problem persists. What should I do to have i...
Hamza Kamran
1

votes
0

answer
425

Views

Configuring MinGW-w64 with Code::Blocks

I have installed MinGW-w64 on my Windows 8 machine using the c++ compiler within Code::Blocks 12.11. I tried to compile a program using one of the conversion functions and got the following error message: main.cpp|22|error: 'stoi' is not a member of 'std'| I have setup the directories in the Comp...
NoName
1

votes
0

answer
93

Views

I am getting issues, when compiling my code in codeblocks C++

I am trying to do my assignment for data structures class. The question is 1) Compile with UNIT_TEST defined and then run with -d yes to see the time it takes in seconds. Report that time in submission box along with the time you found when testing Selection Sort. Which is faster? i am having tro...
harsh_s
1

votes
1

answer
44

Views

Object returned without return keyword

I was trying something out, and I made this code: http://cpp.sh/4x435 (Shown here below too) #include using namespace std; class Thing{ public: int height; Thing(int h): height(h) {}; Thing(): height(10) {}; ~Thing(){}; int display(){ return this->height; } }; Thing* get(){ Thing* x = new Thing(33)...
Jack Of Blades
1

votes
0

answer
31

Views

Image manipulation is visible only in some part of the image

I am using OpenCV in codeblocks to manipulate image pixel's value. The code must make the image completely black but it is doing something as shown for(int i=0; i
Shrey Tiwari
0

votes
1

answer
128

Views

Dont kown how to fetch database?

I'm complete beginner with sqlite and gtk. I'm making my 1st project in code::blocks. I have a problem in fetching the database my code is: #include #include #include #include 'sqlite3.c' #include static int callback(void *data, int argc, char **argv, char **azColName){ int i; fprintf(stderr, '%...
Supu
1

votes
0

answer
408

Views

Getting LLVM 6.0.0 lld-link to work with Code::Blocks

I'm trying to get LLVM/CLang 6.0.0 (on Windows x64) to work on Code::Blocks 17.2 The project I'm workign with is called Spectrum_Tester, and is a basic Windows project with a WinMain (and no wxWidgets). I've got clang/clang++ compiling into .obj files, but lld-link.exe spits out a bunch of errors as...
user1167758
0

votes
1

answer
30

Views

Activation of c++11

I have codeblocks 17.12, mingw setup, from the official website, yet it still says ,,Have g++ follow the COMING c++11''. I had an older codeblocks before, could this be the problem? If maybe not everything was deleted from the old one. I have repeatedly downloaded the latest version and no progress....
1

votes
1

answer
55

Views

Replacing single word in a string with another word [duplicate]

This question already has an answer here: How can I implement an efficient whole-word string replacement in C++ without regular expressions? 2 answers Struggling to find a way to replace the word 'he' with 'he or she', 'his with 'his or hers', without replacing 'the' with 'the or she' like my code...
1

votes
0

answer
228

Views

How to install GNU ARM toolchain (gcc-arm-none-eabi-7-2018-q2-update-win32) for codeblocks?

i started to develop arm project on codeblocks and after selection of GNU Compiler for ARM,the message of No compiler available on the selected path appears. I have mingw32,wxwidgets already installed on my windows 10. The purpose of the project is to develop a GUI on a TFT with stm32f429,IDE: codeb...
Aashish Gogna
1

votes
1

answer
47

Views

Including Extra Debuging Info in Source File for debugging using gdb in Code::Blocks

When debugging C++ source in Code::Blocks, points passed a function parameter or a members of data structures are just displayed as their address. After some research I found I can enter the a custom watch as @ to get it to display as an array, however I can't edit the default display on the structu...
Glen Fletcher
1

votes
0

answer
37

Views

Error from code::blocks 17.12 with MiGw installer in it gcc

#include #include using namespace boost::filesystem; int main(int argc, char* argv[]) { if (argc < 2) { std::cout
sriram
1

votes
0

answer
135

Views

Providing command line arguments in code blocks file(not a project)

I have seen question regarding the issue of taking comand line arguments in code blocks environment but the problem is that when I try to do Project-> Set program arguments in a file (not project based) then nothing happens my question is how can we provide command line arguments in a file which is...
RSSB
1

votes
2

answer
134

Views

Assertion 'value' failed on Code Blocks with linux

I am sorry my bad english. I work with Raspberry pi 3's sample code. I try run sample code on Code Blocks and I work for learn. I configured debug setting based on Makefile of sample code. I configure linker setting. When I build the code on Code Blocks, it doesn't show error. But when I run code. I...
F.Kılavuz
1

votes
2

answer
1.2k

Views

Code::Blocks C++ compiling with MacOS Mojave : fatal error: sys/cdefs.h: No such file or directory

(This is my first question ever on StackOverflow) I have to use a Mac at work, and I'm coding in C++ with Code::Blocks (because I am used to this IDE). 2 days ago I upgraded from MacOS High Sierra to MacOS Mojave and I can fairly say that... it was a bad decision. Now, when trying to #include I get...
Kos Miktipott
1

votes
1

answer
51

Views

Counting Twins-primes with AKS primality test in C++ What am I doing wrong?

Good night, I'm not a C++ especialist. I need to count the quantity of twin-primes inside 3 and the limit. My output is always giving 1. What am I doing wrong? Here's my algorithm with AKS working as well! #include using namespace std; long long c[100]; void coef(int n) { c[0] = 1; for (int i = 0;...
ResearcherDaily
1

votes
1

answer
53

Views

C - CodeBlocks - set program's arguments

My question is pretty simple, I made a program (oil.exe) in C that applies an oil filter to an image. To make it run, I just type in the command line: C:\...\oil.exe lena.ppm 5 25 Where the first argument is the image to edit, that is located in the same folder than oil.exe, the two last arguments a...
Kyraz
1

votes
2

answer
43

Views

C++Running until keypressed

I want to make snake in c++ but i don't know how to make the snake go in one direction until i change it , any ideas? I don't want something like Press escape to exit , i already made the whole code , i just want to know how to make it run and just change the direction and not to change the directio...
Mihai Nejneriu
1

votes
0

answer
34

Views

Changing Class Variable Capitalization in Code::Blocks

SO I've been using Code::Blocks for awhile now, and I've experienced this annoying thing for quite awhile now. When you're creating a new class, it has the following setup page: In the 'Add new' section, we can, of course, add new variables and include 'Getter' and 'Setter' methods. So we add a few...
Little Boy Blue
1

votes
1

answer
36

Views

Code Blocks - Calling a function from a different project [closed]

Suppose I have two projects p1 and p2 under the same workspace and there is one file in p1 which contains the function which I want to call from a file which is there in the p2 project. Although I know it is possible to call this function from another file if both the files are in the same project,...
Jaspreet Singh
1

votes
1

answer
50

Views

Function behaves differently when run on Windows or Linux

I have a simple function that prints lines of text to the console, centered, with empty space filled in with an '=' sign. When I run this function with my program on Linux I see the text displayed properly at the top of the console window followed by the menu prompt from my program, but on Windows i...
Alexander Meyers
1

votes
1

answer
29

Views

How to give auto custom header on codeblocks?

Every time when I open a new file in codeblocks, it is an empty file. But I want my files to have this headers (shown on the image file) which will be there, whenever i will create a new cpp file. But i didn't find any option to create this. Googled but didn't find where is this option in codeblocks...
Romona MK
1

votes
1

answer
86

Views

Confusing error, out of memory and undefined reference with SDL_ShowSimpleMessageBox in Code Blocks

So I am starting with Code Blocks and was following a tutorial online, I made an empty project that had one file. #include #include //Screen dimension constants const int SCREEN_WIDTH = 640; const int SCREEN_HEIGHT = 480; int main( int argc, char* args[] ) { //The window we'll be rendering to SDL_...
Eric Bromstead
1

votes
0

answer
32

Views

openssl - can not compute hash of many files

I code a function to find all of files in my system then put their path into hash function ( a small function). My program works corrently for many first files (~4000 files). After that, the hash function which I code can not compute hash from files. I code in Code::block 17.12. Using SHA from opens...
Cons
1

votes
1

answer
292

Views

Does Boost::Jam (bjam) have a “question mode”?

I use Code::Blocks with Boost::Jam. A recent update to C::B added some new 'custom makefile' commands, one of which is 'ask if rebuild is needed'. According to this message, it's meant to call make in a 'question mode': -q, --question ‘‘Question mode’’. Do not run any commands, or print any...
Head Geek
1

votes
2

answer
1.3k

Views

Debugging with Code Blocks and a custom make (Boost.Build)

I've been using Code::Blocks with MinGW on a WinXP box for a while now. But since I started using Boost.Build as 'custom build tool' I'm having trouble setting break points from Code::Blocks. When I start a debugging session Code::Blocks tries to send all break points to GDB but GDB doesn't seem to...
sellibitze
1

votes
2

answer
445

Views

^M at end of lines when editing in CodeBlocks (I think)

I'm on Ubuntu Linux 10.04. I use vim for most of my development and CodeBlocks for debugging. When I first moved from Windows to Linux, I noticed that vim was showing ^Ms for newlines, and found out that this was a Microsoft thing. However, even after removing them I notice that they sometimes reapp...
random
1

votes
1

answer
984

Views

Using RakNet source with Code::Blocks on Ubuntu

Hey Forum, So i'm trying to find out how to use the source files from RakNet with Code::Blocks, in Ubuntu. All the tutorials on the internet are for windows, or use windows '.lib files'. I need to find a way to get this working but I'm getting very discouraged since this is my third day in a row th...
TopGunCoder
1

votes
1

answer
6.2k

Views

How to save “current perspective” in code::blocks?

Example: i'd like to always see 'CPU Registers' and never see 'Scripting Console'. Using Code::Blocks, how can i do this, regardless of the project i use?
JAM
0

votes
0

answer
8

Views

Undefined reference to LibConfuse internal functions on Code::Blocks

I am testing LibConfuse on Code::Blocks trying to build the simplest first example on the tutorial: #include #include int main(void) { cfg_opt_t opts[] = { CFG_STR('target', 'World', CFGF_NONE), CFG_END() }; cfg_t *cfg; cfg = cfg_init(opts, CFGF_NONE); if(cfg_parse(cfg, 'hello.conf') == CFG_PARSE_...
1

votes
1

answer
5.1k

Views

How can I compile and run programs using graphics.h in code::blocks?

I am new to code::blocks, so I was wondering how could I compile and run my computer graphics animation programs (those that use graphics.h) in Code::Blocks. Is this possible with the default installation? Any kind of help would be appreciated.
jackuars
1

votes
1

answer
1k

Views

When I have two .cpp files from the same set of source files in Code::Blocks, how can I run one of them?

I have two different .cpp files (linked lists) under the same set of source of one project. I tried running one of the linked list files called 'customer', but it's only running the other one called 'video'. How can I run the 'customer' linked list file? My customer.cpp file is active but it's still...
Surya
2

votes
1

answer
35

Views

How exactly do you pass arrays through the parameters of a function?

I have a project for my class that basically reads 3 students info (each student has 3 courses, and 5 tests, along with info like their name, ssn, phone number, etc.) from an input file, stores the input in arrays, then outputs the information into an output file. The project must be split into 6 fu...
The Petrichor
1

votes
2

answer
1.9k

Views

makefile OR code blocks TO eclipse on ubuntu

hi i have a c++ opengl/opencv codeblocks project http://www.openframeworks.cc/setup/linux-codeblocks with all makefiles. even if codeblocks seems to be grat tool i'm addicted to eclipse (using it with python and java). is there a way to import it in eclipse without melting brain? is there some autom...
nkint
1

votes
2

answer
8.3k

Views

how do I solve `ld cannot find -something`

When I try running openFrameworks example audioOutputExample in CodeBlocks, I get the following errors: in Debug: ld cannot find -openframeworksDebug in Release: ld cannot find -openframeworks How do I solve this? UPDATES Here is why I've tried up to now: make cd apps/examples/audioOutputExample/ m...
Shawn
1

votes
1

answer
168

Views

LuaSockets and Code::Blocks

I have Lua incorporated on code:blocks IDE and I want to do some TCP programming with a Lua library called LuaSockets. The problem is I cant install it and have no idea how to do it (I already searched everywhere for a long time, god knows how much) Is there anyone that has already done this?
abriosi

View additional questions