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 BUG: Can't compile due to duplicated arguments for linker command (Read 785 times)
Tomek Gorski
Newbies
*
Offline


Posts: 7
Joined: Aug 1st, 2013
BUG: Can't compile due to duplicated arguments for linker command
Mar 26th, 2020 at 9:04am
Print Post  
Hi
I attached simple project replicating the issue.

Code added in "Shared Items Project" (VS built in, I did't check the Visual Micro one) results in "multiple definition of xxx" error. This happens because linker command has duplicated arguments for "xxx.cpp.o" file.

example command from attached project:
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o " "SharedBug.cpp.o" "OkClass.cpp.o" "OkClass.cpp.o" "VM_DBG\VM_DBG.cpp.o" "VM_DBG\VM_mem_check_sam.cpp.o" "C:\Users\User\AppData\Local\Temp\VMBuilds\SharedBug\uno\Debug/core.a" "-LC:\Users\User\AppData\Local\Temp\VMBuilds\SharedBug\uno\Debug" -lm

As you can see the "OkClass.cpp.o" argument is duplicated. Issuing command without duplication works correctly.

software:
Microsoft Visual Studio Community 2019 Version 16.5.1
Visual Micro Version 2020.321.2 (and some earlier)


« Last Edit: Mar 26th, 2020 at 9:05am by Tomek Gorski »  

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: BUG: Can't compile due to duplicated arguments for linker command
Reply #1 - Mar 26th, 2020 at 1:32pm
Print Post  
Thanks very much for the report. This is now resolved in 20.03.21.4. Available from this forum now or from the gallery later today/

https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES
  
Back to top
WWW  
IP Logged
 
Tomek Gorski
Newbies
*
Offline


Posts: 7
Joined: Aug 1st, 2013
Re: BUG: Can't compile due to duplicated arguments for linker command
Reply #2 - Mar 27th, 2020 at 5:10am
Print Post  
WOW. that's a quick response. I Just downloaded new version and it's working fine Smiley. Thanks. 
p.s.
actual version is 2020.321.3
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint