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 compilation error with text "...: first defined here" (Read 3324 times)
garrison
Junior Member
**
Offline


Posts: 28
Joined: Mar 27th, 2015
compilation error with text "...: first defined here"
Jan 2nd, 2016 at 8:56pm
Print Post  
Hello.
I've got a compilation error with text "...: first defined here".

The problem occurs when I add source files to "Header Files" and "Source Files" sections in Solution Explorer tab in VS. It seems like VS tries to compile theese files twice and, thus, founds dublicates. When I remove files from that sections, compilation goes fine. I remember that in previous versions of VM I didn't have this problem. I used "Header Files" and "Source Files" sections in Solution Explorer tab to get quick access to my custom source files that are used in project.

I use VS 2013.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: compilation error with text "...: first defined here"
Reply #1 - Jan 2nd, 2016 at 10:06pm
Print Post  
Hi,

There is some new functionality which you can switch off but I think that once you understand it you will find it to work the way you want.

Here are a few bits of info

1) If you want to view arduino library or core sources. Then click on the project in the solution explorer and use the "Show arduino core and library sources" command to toggle the sources in/out of the project. Visual Micro will create the shortcuts to all source code in a place within the project that will be ignored by the compiler.

2) If you want to include add-hoc code for reference purposes then right click the Solution in the solution explorer and click "Add Solution Folder". You can create as many folders in the SOLUTION and not the PROJECT as you want. Then add and organize your reference code into the solution folders. 

Your project should end up quite clean whilst also giving the ability to organize the project code into sub folders and to include/exclude code into the project to control what gets compiled and what is backup/test code.

The new system has also allowed Arduino libraries to be edited, developed and debugged locally within the project.

I hope this makes sense. Please say if there is a feature you feel you have lost and can't see the point of this additional flexibility and I will point you to the "Compatibility" (arduino) section of "Tools>Options>Visual Micro" where you can switch back to the simpler system.
  
Back to top
IP Logged
 
garrison
Junior Member
**
Offline


Posts: 28
Joined: Mar 27th, 2015
Re: compilation error with text "...: first defined here"
Reply #2 - Jan 3rd, 2016 at 5:21am
Print Post  
Yes, that is really helpful information!
Thank you a lot. The support is great  Smiley
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: compilation error with text "...: first defined here"
Reply #3 - Jan 3rd, 2016 at 7:29pm
Print Post  
Off-Topic replies have been moved to this Topic.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint