Author Topic: AVR GCC .... Hot to start C++ project  (Read 6642 times)

mbruck

  • Guest
AVR GCC .... Hot to start C++ project
« on: January 04, 2011, 02:03:39 am »
In eclipse there where option to chose C or C++ project wizard....  How to do that in C::B ?

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: AVR GCC .... Hot to start C++ project
« Reply #1 on: January 05, 2011, 12:38:59 pm »
There is no implemented option as far as I know but u can save ur c++ file with the extension '.cpp' and customize the compiling properties as described here:

http://wiki.codeblocks.org/index.php?title=Adding_support_for_non_C/C%2B%2B_files_to_the_build_system

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11716
    • Travis build status
Re: AVR GCC .... Hot to start C++ project
« Reply #2 on: January 05, 2011, 01:00:34 pm »
scarphin: have you tried it? Your solution looks brutal.

mbruck: the project templates are simple squirrel scripts, you can modify them with right click -> edit script...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: AVR GCC .... Hot to start C++ project
« Reply #3 on: January 05, 2011, 01:27:45 pm »
scarphin: have you tried it? Your solution looks brutal.

Well, no! ;) I haven't because of 2 reasons, 1st I have no experience in C++ and 2nd it is utopia to program the AVR's in C++ without the stdlib++ support (regarding AVRGCC) in my opinion. I proposed this solution because I am not sure if the 'avr-gcc' launches the C++ compiler for '.cpp' extension (as it launches the assembler for the '.S' extension) or if CodeBlocks launches the C++ compiler for '.cpp' extension.

It might be brutal but I guess it's guaranteed to work out. ;) I also would like to know if there is a better way apart from those or if the C++ compiler gets launched in any of the cases above.