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 Multiple definitions of - compile/link error using shared libraries (Read 1235 times)
Hedde
Newbies
*
Offline


Posts: 5
Joined: Feb 3rd, 2016
Multiple definitions of - compile/link error using shared libraries
Jul 14th, 2020 at 9:06am
Print Post  
Since the last update my shared libraries are compiled twice and linked twice giving the error - multiple definitions of ... - during link process.
I created a new project, a new shared library with just one function and can reproduce the error (after adding additional libraries and removing them - weird)
Non of my projects even in different solutions work.
The build log shows the problem in line 725 where "shared1.o" is linked twice.
Anybody has thoughts about this?
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2177
Joined: Feb 13th, 2019
Re: Multiple definitions of - compile/link error using shared libraries
Reply #1 - Jul 14th, 2020 at 10:33am
Print Post  
Thanks for the clear report and logs.

We have replicated this and will update as soon as there is a workaround / fix available.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2177
Joined: Feb 13th, 2019
Re: Multiple definitions of - compile/link error using shared libraries
Reply #2 - Jul 14th, 2020 at 10:43am
Print Post  
To work around this while we work on the release, please follow the below steps:-

1) Add Local board.txt to Project (Right Click main Arduino project in Solution Explorer > Add > Local Board.txt)
2) Add the below line to the file, and save
Code
Select All
vm.build.path-8dot3=false 


3) Run Build > Clean Solution
4) Run Build as normal, it should now link as expected

We will update later on when the release is available in the forum.
  
Back to top
 
IP Logged
 
Hedde
Newbies
*
Offline


Posts: 5
Joined: Feb 3rd, 2016
Re: Multiple definitions of - compile/link error using shared libraries
Reply #3 - Jul 14th, 2020 at 12:11pm
Print Post  
Hi Simon,
Thanks, works perfect.
(Cost me some time to realise "add local board.txt" is actual a menu option under project/add).
Regards,
Hedde
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2177
Joined: Feb 13th, 2019
Re: Multiple definitions of - compile/link error using shared libraries
Reply #4 - Jul 14th, 2020 at 1:20pm
Print Post  
There is an updated release of Visual Micro (20.07.08.2) with the fix for this implemented, so the work around is no longer required once installed (delete board.txt, or comment out line with #).

This can be downloaded from the top of the below board:-
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES

There is also further information below about how to install these versions in advance of them being released to the Gallery:
Video Guide
Installation Documentation
  
Back to top
 
IP Logged
 
Hedde
Newbies
*
Offline


Posts: 5
Joined: Feb 3rd, 2016
Re: Multiple definitions of - compile/link error using shared libraries
Reply #5 - Jul 14th, 2020 at 2:43pm
Print Post  
Thanks, works perfect!
Regards,
Hedde
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint