Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Writing in C and not C++. (Read 3537 times)
zain ul-abidin
Newbies
*
Offline


Posts: 1
Joined: Feb 2nd, 2014
Writing in C and not C++.
Feb 3rd, 2014 at 2:41pm
Print Post  
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!
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Writing in C and not C++.
Reply #1 - Feb 3rd, 2014 at 5:21pm
Print Post  
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  Smiley

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.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint