VS Arduino
Visual Micro >> Project Guidance >> Writing in C and not C++.
https://www.visualmicro.com/forums/YaBB.pl?num=1391438487

Message started by zain ul-abidin on Feb 3rd, 2014 at 2:41pm

Title: Writing in C and not C++.
Post by zain ul-abidin on Feb 3rd, 2014 at 2:41pm
Hi Guys
I have only just started using visual micro with atmel studio. I am beginner in C as well. When I create a new "Sketch project" it only creates a C++ template. I have tried to create a new c template through project> add new sketch item> C template but its not building properly.Please advise how can I write my code in C. Thank you!

Title: Re: Writing in C and not C++.
Post by Visual Micro on Feb 3rd, 2014 at 5:21pm
Hi,

The Arduino projects we create in Visual Studio (or Atmel) have the same rules and structure as the sketch projects created in the Arduino Ide.

We hope that users will first use the Arduino Ide so that they understand the Arduino rules and the way it works.

The Arduino.cc web site and arduino.cc/forums are also a great resource for standard development questions. This web site is to support the Visual Micro plugin and features but really the best and cleverest developers can be found on the arduino.cc web site  :)

I don't know if this answers your question but Arduino is a C++ system, you can add .c files as long as they are added to the same folder (not sub folder) of the sketch. You will need to manually #include the .c source from a Cpp or .ino source.

A base Arduino project is simply a single .ino and folder of the same name. You can add more .ino, .cpp, .c, .h sources to meet your needs a long as they follow the Arduino rules.

For reasons of support, Visual Micro does not allow the Arduino rules to be broken but you don't have to use Visual Micro. As an advanced developer, which you obviously are, you will find that you can use Atmel Studio and .bat files to write your own version of an Arduino compiler/builder.

I hope this helps.

VS Arduino » Powered by YaBB 2.6.12!
YaBB Forum Software © 2000-2024. All Rights Reserved.