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
Hot Topic (More than 8 Replies) problems linking .ELF after upgrading to AS7 and VM beta (Read 3848 times)
AdrianV
Newbies
*
Offline


Posts: 7
Joined: Oct 22nd, 2015
problems linking .ELF after upgrading to AS7 and VM beta
Oct 22nd, 2015 at 11:25am
Print Post  
Hi, 

I'm not sure which forum to post in, so please correct me or move this post to where it needs to be.

I have just upgraded from AS6.2 to AS7, and also upgraded to the latest VisualMicro for Arduino beta (a couple of hours ago).

I can't link my project successfully any more, please can someone advise me of things to try?

My steps so far:
1) before I started, I had AS6.1 and AS6.2 installed, and was using AS6.2 for my Microduino project (using Arduino 1.6.3) - no problems.

2) I downloaded and installed AS 7 this morning.
3) I then downloaded and installed VM4A from http://www.visualmicro.com/page/Arduino-Visual-Studio-Downloads.aspx.  I did experience the "Manifest" problem, but followed the guide to work around it (using my V2014 vsixinstaller)

Now, I get hundreds of errors during creation of the .ELF, indicating duplicate symbols, and it appears for every single source file (.CPP) in the project.

Here are the first few lines:
new.cpp.o:In function `__cxa_pure_virtual'
Adafruit_GPS.cpp.o:In function `Adafruit_GPS::common_init()'
Adafruit_GPS.cpp:common_init()'
Adafruit_GPS.cpp.o:(.bss.recvdflag+0x0): multiple definition of `recvdflag'
Adafruit_GPS.cpp.o:(.bss.recvdflag+0x0): first defined here
Adafruit_GPS.cpp.o:(.bss.lineidx+0x0): multiple definition of `lineidx'
Adafruit_GPS.cpp.o:(.bss.lineidx+0x0): first defined here
Adafruit_GPS.cpp.o:(.bss.line1+0x0): multiple definition of `line1'
Adafruit_GPS.cpp.o:(.bss.line1+0x0): first defined here

Can anyone help me to understand/fix this?

I was able to compile and debug normally before I did the upgrades.

Many thanks
Adrian

  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: problems linking .ELF after upgrading to AS7 and VM beta
Reply #1 - Oct 22nd, 2015 at 12:48pm
Print Post  
Hi,

Thanks for the info. Yes we use the VSIX installer that was released with Vs2012. I suspect that some users who install a vs2010 product after 2012-2015 find the installer is associated to the older version. There is a note about this for AS7 on the downloads page.

For the errors please confirm which version of the arduino ide you are using and which app name you have configured its location against in visual micro.

The other way to understand errors is to switch on "Visual Micro >Verbose", then click Build>Clean then build and email or post the output to info[at]visualmicro.com

Thanks
  
Back to top
IP Logged
 
AdrianV
Newbies
*
Offline


Posts: 7
Joined: Oct 22nd, 2015
Re: problems linking .ELF after upgrading to AS7 and VM beta
Reply #2 - Oct 22nd, 2015 at 12:56pm
Print Post  
Thank you Tim,

I have posted the output as suggested to info[at]visualmicro.com, would you mind having a look at it?

Thanks in advance
Adrian
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: problems linking .ELF after upgrading to AS7 and VM beta
Reply #3 - Oct 22nd, 2015 at 1:23pm
Print Post  
Thanks

Please try switching the toolbar from Debug to Release

Then Build>clean and try a build

Thanks
  
Back to top
IP Logged
 
AdrianV
Newbies
*
Offline


Posts: 7
Joined: Oct 22nd, 2015
Re: problems linking .ELF after upgrading to AS7 and VM beta
Reply #4 - Oct 22nd, 2015 at 1:32pm
Print Post  
Ok Tim, I have done that.  The result seems to be identical, still the hundreds of duplicates.   

Is there something else I can try? Perhaps folders to check?

Regards
Adrian
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: problems linking .ELF after upgrading to AS7 and VM beta
Reply #5 - Oct 22nd, 2015 at 1:36pm
Print Post  
Please zip and email your sketch folder with project and sources.

Thanks
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: problems linking .ELF after upgrading to AS7 and VM beta
Reply #6 - Oct 22nd, 2015 at 1:41pm
Print Post  
I think this is actually a bug in the Microduino Ide

I see some reports about this and can see they have updated from the arduino 1.6.3 version to 1.6.5-r2 which is more stable

https://github.com/wasdpkj/Microduino-IDE-win

Please try it
« Last Edit: Oct 22nd, 2015 at 1:42pm by Tim@Visual Micro »  
Back to top
IP Logged
 
AdrianV
Newbies
*
Offline


Posts: 7
Joined: Oct 22nd, 2015
Re: problems linking .ELF after upgrading to AS7 and VM beta
Reply #7 - Oct 22nd, 2015 at 1:48pm
Print Post  
Thanks Tim, stand by, I will give it a go and let you know.
  
Back to top
 
IP Logged
 
AdrianV
Newbies
*
Offline


Posts: 7
Joined: Oct 22nd, 2015
Re: problems linking .ELF after upgrading to AS7 and VM beta
Reply #8 - Oct 23rd, 2015 at 8:39am
Print Post  
Tim, I got it sorted out by creating a new Arduino project IN AS7.  Thank you for the help!

Best regards
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: problems linking .ELF after upgrading to AS7 and VM beta
Reply #9 - Oct 23rd, 2015 at 11:37am
Print Post  
Thanks for the note. 

I suspect that your older project had the arduino core or other sources bound into it. In older version of visual micro these would be ignored during compilation but in recent versions Visual Micro supports code in sub folders and in link source files.

Therefore creating a clean project would fix the issue however I would like to see the older project if you still have it?

Thanks
  
Back to top
IP Logged
 
AdrianV
Newbies
*
Offline


Posts: 7
Joined: Oct 22nd, 2015
Re: problems linking .ELF after upgrading to AS7 and VM beta
Reply #10 - Oct 23rd, 2015 at 11:53am
Print Post  
I did send it you yesterday, did it not arrive?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: problems linking .ELF after upgrading to AS7 and VM beta
Reply #11 - Oct 23rd, 2015 at 11:54am
Print Post  
Oh sorry, had a few emails yesterday. I will look again I am sure I can find it.

Thanks
  
Back to top
IP Logged
 
AdrianV
Newbies
*
Offline


Posts: 7
Joined: Oct 22nd, 2015
Re: problems linking .ELF after upgrading to AS7 and VM beta
Reply #12 - Oct 23rd, 2015 at 11:57am
Print Post  
You are correct in surmising that the project had some of the sources bound into it. I loaded it into a text editor in an effort to understand why it was trying load sources from my previous version of the arduino (microduino) IDE, even after it had been uninstalled, and I had carefully removed all links in the project options via the UI dialogs.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: problems linking .ELF after upgrading to AS7 and VM beta
Reply #13 - Oct 23rd, 2015 at 12:14pm
Print Post  
Yes I can see what you had done. You had included all the libraries and other files from the microduino ide. In earlier versions you could do that without breaking things.

However in all previous versions and the current version you can include the files you are working on, for reference purposes, by clicking the menu "Project>Show sketch core and library sources". This will show you how to include read-only files that should be ignored by the compiler.

For information: With the old project you can open it in atmel studio and remove all the references other than the real sketch/project source code. Then it will work and the compiler won't attempt to compile every library that is installed with the ide.



  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: problems linking .ELF after upgrading to AS7 and VM beta
Reply #14 - Oct 23rd, 2015 at 6:40pm
Print Post  
and I forgot to say that you can switch off these new features by changing the compatibly settings in tools>options>visual micro.

Switch off "Compile Files in Project" which falls back to compiling the sources found in the physical sketch folder regardless of the Visual Studio project structure. This of course is how the Arduino Ide works but can be quite limiting for larger projects.

However, as stated earlier, using the Visual Micro command to see all underlying sources "project>show all core and library sources" is a way to see all the underlying code in the project without confusing the compiler.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint