Go Down

Topic: CodeBlocks Arduino IDE - real C++ IDE for Arduino development (rev.20130827) (Read 69246 times) previous topic - next topic


Any info on when DUE might be supported? I really, really (I mean really) would prefer CodeBlocks over the original dev environment....


Literally tried everything to include library. Project --> add file, Project --> Add file recursively, Project--> Build options--> Search directories etc... but still the library are not compiling. Fatal error. anyone can help?

Was there any reply to this?
How on Earth do you find a thread on this forum???


I am kind of lost. I am working in Windows, and I downloaded the ArduinoBuilder as it says in Codeblocks Arduino IDe webpage, but I can't see a clue about where to finde codeblocks there or how to configure my current codeblocks to use this (I thought it was not a plugin, but I don't find in the files any reference to codeblocks core).

Please, let me know how to configure it for windows.


This is a longshot, as it's a rather open ended question but I've taken a stab at building a simple sketch using the C::B IDE.  It's so much nicer user-wise than the standard Arduino IDE.

My dilemma is that I cannot build anything that utilizes a library.  Or, at least, one that uses the nRF2401 library from Maniac Bug.

My simple sketch, which I could build, upload and run to blink the LED on an Uno (plus some lines I added afterwards):

Code: [Select]

#include <arduino.h>
#include <RF24.h>
#include <nRF24L01.h>
#include <RF24_config.h>

 Turns on an LED on for one second, then off for one second, repeatedly.
const int t = 2;

RF24 radio(9,10);

void setup()

// initialize the digital pin as an output.
// Pin 13 has an LED connected on most Arduino boards:
pinMode(13, OUTPUT);

//    radio.begin();

void loop()
Serial.println("Hello world!");

delay(1000);              // wait for a second
digitalWrite(13, HIGH);   // set the LED on
delay(1000);              // wait for a second
digitalWrite(13, LOW);    // set the LED off

I chose the "GNU AVR GCC Compiler"
You will notice I added the nRF2401 stuff.  Now it complains:
undefined reference to `RF24::RF24(unsigned char, unsigned char)'

Which I infer is because it cannot resolve uint8_t as an integer.  I assume it fails gracefully and assumes a char data type.

Can someone please look at the attached verbose output of the compilation and perhaps glean a clue what is possibly being overlooked?  Surely I just have the library search paths wrong bit sheesh there are dozens of places to set them and I can't isolate where it's wrong.  If, that is it is the problem at all.

I would also add that if I change the compiler to be "GNU GCC Compiler" The undefined reference goes away, presumably the definition of uint8_t is getting resolved.  But of course, that's not suitable for uploading into an Arduino (doesn't even create the .hex file)

Lastly, the RF24 libraries are there and I have build sketches many times through the Arduino IDE without trouble.  I just hate the damn primitive user interface and much rather would use C::B if I could sort this out.


@JohnHoward : I have the same issue. The only way I found to use custom library is to add their files to my project tree.

Does not work :

Works :

I though that when we add a library folder with .cpp & .h to the <codeblockfolder>/arduino/libraries would be enough to use them with <> without having to add files to our project. Maybe I'm wrong.


By fiddling with the search paths, in various places inside C::B, I am able to change the error messages from 'include file not found' to the problem I currently have which is uint8_t apparently being an unknown datatype.  So the path-searching seems to work.  I just can't figure what path may still be missing (or *wrong* thus including the wrong files).  That problem continues to exist even when I directly include library files into the project.

Hallo i have a problem
I use codeblocks for programming with a arduino 2560 board.
When my program is over 140000bytes it and i burn it to the board it doesn't work!
When i am under 140000bytes it works fine what can i do?
Please help me


So... I thought I'd wander over to the CodeBlocks own forum and ask for some insight.  The response?  Go ask in a programming forum.  Others had asked in the past and were blown off with 'we don't support forks like that one'.  Open software, closed society.

So it's back to the 20th century Arduino IDE I guess.  Too bad, CB was such a pleasant improvement.  But, a car without forward gears is of little use when you need to get to work.


That problem continues to exist even when I directly include library files into the project.

It works for me with your code and your libraries.


That problem continues to exist even when I directly include library files into the project.

It works for me with your code and your libraries.

Please compile with -v (verbose) and post the build log for that.  I must have something out of whack in the search paths.  I'd like to compare mine to yours to see what's different.


I seem to be making sense out of this, to an extent.  Thanks to Swpolo providing me a build log to compare, and after realizing it worked for him because he directly added the file RF24.cpp to his project - I figure out the real problem.

The GCC compiler doesn't 'run down' all the .h files to figure out whether the .corresponding cpp needs to be compiled.  Neither does the linker seem to figure out the .o file should be present (but isn't) and added to the linking process.  It never even gets referenced by the linker.

Evidently this makes perfect sense to the Code:Blocks folks and we humans are supposed to deal with such minutia instead of the tools doing it for us.  I say that because the recommended approach is to build a 2nd project to create a static library of the needed library files.

I don't understand the rationale behind this.  Of course, one shouldn't be needlessly recompiling library files everytime your project is rebuilt.  That's the point of 'header' files -- to be a dictionary of sorts for the compiler to tell it what's in the .c/.cpp/.o file.   But why the stupid thing doesn't go get the pieces it needs to build the project, and compile any it finds haven't been compiled -- without me doing the legwork for the compiler and linker -- well, it's a mystery to me.


Why is doxyblock plugin not included into the package ? It took me so much time to find out how to install it on that version of code::blocks.
For those who also wants to have doxygen directly into this version of code::blocks, here's a method.

1 - Download and install the 12.11 version of code:blocks : Available here
     Download and Install Doxygen with doxywizard : Available here

2 - Go to the folder where it has been installed (C:\ProgramFiles\CodeBlocks, most of the time)

3 - Copy following files/folder from the original Codeblocks to the Arduino-Modified-Codeblocks provided by Stanley Huang
=>  DoxyBlocks.zip File      from <Codeblocks path>\share\CodeBlocks
=> DoxyBlocks.dll   File      from <CodeBlocks path>\share\CodeBlocks\plugins
=> DoxyBlocks        Folder from <CodeBlocks path>\share\CodeBlocks\images

It should works (at least, it works for me). Do whatever you want with the original CodeBlocks software. You can uninstall it if you want.

Also, is there a way to get rid of those "double error messages"  we get with Arduino Builder when we haven't launched it with internet at least once?
like that


I missed one step; you must have doxygen and doxywizard installed on your computer. links here

I added it on the previous message.

Also, I found how to remove the pie chart that provokes error when you've never launched Arduino builder while connected to the Internet.

Go to : <Your codeblocks Path>\CodeBlocks\htdocs
Open file : report_en.html
Remove line 10 : <script src="js/highcharts.js"></script>
Remove line 12 to line 16 included (Original file : line 13 to line 17 included) : <div style="margin:0 auto; width:600px; height: 255px;"> to </div>
Remove line 14 to line 77 included (Original file : line 20 to line 83 included) : <script language="javascript"> to </script>


Hello guys i'm a long time user of C::b ide for arduino in Windows. But Recently i  started to use Linux mint, that has become a pleasant O.S. But I'm having difficulties on configuring C::b for arduino in it.
Here a forward you some info about what's happening.

C::b version 13.12.
Linux mint 17
Needed folders created, project wizard created.

Errors found:
When starting the wizard there is an error page window.
When compiling gives an error over the hardware serial and another library.

I'll forward the photos in a minute.


Hello Stanley i follow the  steps you say on this article


And i'm getting those errors when compiling the blink demo code.

Could you help me solve this?

I'm a regular user of the windows platform and i want to use it in linux as well.

If you can help please give me a clue about what to do to solve this.

Best regards,

||=== Build: Simulator - Debug in new_cb_arduino_test (compiler: GNU GCC Compiler) ===|
/home/vcancio/.codeblocks/ardusim/include/util/delay.h|90|warning: #warning "Compiler optimizations disabled; functions from <util/delay.h> won't work as designed" [-Wcpp]|
/usr/include/x86_64-linux-gnu/sys/types.h|197|error: conflicting declaration 'typedef long int int64_t'|
/home/vcancio/.codeblocks/ardusim/arduino/cores/stdint.h|33|error: 'int64_t' has a previous declaration as 'typedef long long int int64_t'|
/usr/include/unistd.h|267|error: conflicting declaration 'typedef __intptr_t intptr_t'|
/home/vcancio/.codeblocks/ardusim/arduino/cores/stdint.h|66|error: 'intptr_t' has a previous declaration as 'typedef int intptr_t'|
/home/vcancio/.codeblocks/ardusim/arduino/cores/stdint.h|33|error: conflicting declaration 'typedef long long int int64_t'|
/usr/include/x86_64-linux-gnu/sys/types.h|197|error: 'int64_t' has a previous declaration as 'typedef long int int64_t'|
/usr/include/unistd.h|267|error: conflicting declaration 'typedef __intptr_t intptr_t'|
/home/vcancio/.codeblocks/ardusim/arduino/cores/stdint.h|66|error: 'intptr_t' has a previous declaration as 'typedef int intptr_t'|
/home/vcancio/.codeblocks/ardusim/include/avr/interrupt.h|152|warning: 'signal' attribute directive ignored [-Wattributes]|
/home/vcancio/.codeblocks/ardusim/arduino/cores/HardwareSerial.cpp|100|note: in expansion of macro 'SIGNAL'|
/home/vcancio/.codeblocks/ardusim/include/avr/interrupt.h|125|warning: 'signal' attribute directive ignored [-Wattributes]|
/home/vcancio/.codeblocks/ardusim/arduino/cores/HardwareSerial.cpp|192|note: in expansion of macro 'ISR'|
||=== Build failed: 8 error(s), 3 warning(s) (0 minute(s), 3 second(s)) ===|

Victor Cancio.

Go Up