Visual Micro
https://www.visualmicro.com/forums/YaBB.pl
Visual Micro >> Visual Studio 2017, 2019, 2022 >> Linking a binary libary Issue
https://www.visualmicro.com/forums/YaBB.pl?num=1599742230

Message started by JamesFarmer on Sep 10th, 2020 at 1:50pm

Title: Linking a binary libary Issue
Post by JamesFarmer on Sep 10th, 2020 at 1:50pm
I had this issue a while back was sent an update that fixed it.  I updated the software for the BSEC library now its back the below linker flag is not working in Visual micro but is working in the Arduino ide directly

this line is missing in Visual Micro

"-LC:\\Users\\Home\\Documents\\Arduino\\libraries\\BSEC-Arduino-library-master\\src\\esp32" -lalgobsec -Wl,

I have attached debug logs and sample progam
https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=debuglogs.zip (23 KB | 8 )
https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=BME680with_2sensors.zip (2 KB | 6 )

Title: Re: Linking a binary libary Issue
Post by Visual Micro on Sep 10th, 2020 at 10:16pm
Thanks for the report. This should be resolved in the next release over the next day or so.

The arduino standard for ldflags changed and now expects the tool chain to use a property called {compiler.libraries.ldflags}. I can see that property is defined in the core you are using but it is not defined in any of the ESp32 release cores as far as I can see.

How did you install your esp32 toolchain?

Title: Re: Linking a binary libary Issue
Post by JamesFarmer on Sep 11th, 2020 at 12:08am
By direction on there GIT but this was back in march is last time i updated how come it was working and then broke with library update

Title: Re: Linking a binary libary Issue
Post by JamesFarmer on Sep 15th, 2020 at 10:56pm
When will this be fixed?

Title: Re: Linking a binary libary Issue
Post by Visual Micro on Sep 15th, 2020 at 11:02pm
Sorry we forgot to update this thread. It was fixed a short time after the report.

https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES

It's worth clicking the Notifications option at the top of the forum board, then you should get emails when minor releases are made to the forum. The latest release is also due for Gallery release today so you would have got an ide notification too.

Thanks for the report, I think tha GIT toolchain version is the only one that uses the new property which is why it was missed before.

Title: Re: Linking a binary libary Issue
Post by JamesFarmer on Sep 15th, 2020 at 11:12pm
There are no update showing in VS to update VM when i go to VM in extension manager says updates will appear in update tab

Title: Re: Linking a binary libary Issue
Post by Visual Micro on Sep 15th, 2020 at 11:27pm
Interim releases are made in the forum with the link I gave you in my last message. Did you click it?

I also said that the latest release is due to be published to the Gallery later today. Only when that happens will you see a Microsoft notification about the update. The notifications button in the link I gave you gives you emails from the interim updates system.

Title: Re: Linking a binary libary Issue
Post by JamesFarmer on Sep 15th, 2020 at 11:30pm
when i click the link in the thread i get this when tring to install

9/15/2020 6:29:10 PM - Microsoft VSIX Installer
9/15/2020 6:29:10 PM - -------------------------------------------
9/15/2020 6:29:11 PM - Initializing Install...
9/15/2020 6:29:11 PM - Extension Details...
9/15/2020 6:29:11 PM -      Identifier         : c2b94433-1774-4242-8062-987a4484f1ed
9/15/2020 6:29:11 PM -      Name               : Arduino IDE for Visual Studio (Visual Micro)
9/15/2020 6:29:11 PM -      Author             : Visual Micro
9/15/2020 6:29:11 PM -      Version            : 2020.910.1
9/15/2020 6:29:11 PM -      Description        : A fully compatible Arduino edit, build , deploy and debug tool. Cross platform Board and Library manager. All Arduino IDE versions are supported. Multiple serial monitors. Shared code projects, custom libraries, unit tests, GIT, CLI. GDB hardware and WiFi debugging. Unique software debugger with live performance reporting and plotting.
9/15/2020 6:29:11 PM -      Locale             : en-US
9/15/2020 6:29:11 PM -      MoreInfoURL        : https://www.visualmicro.com/
9/15/2020 6:29:11 PM -      InstalledByMSI     : False
9/15/2020 6:29:11 PM -      SupportedFrameworkVersionRange : [0.0,2147483647.2147483647]
9/15/2020 6:29:11 PM -
9/15/2020 6:29:11 PM -      SignatureState     : Unsigned
9/15/2020 6:29:11 PM -      Supported Products :
9/15/2020 6:29:11 PM -            Microsoft.VisualStudio.Pro
9/15/2020 6:29:11 PM -                  Version : [15.0.27220,16.99)
9/15/2020 6:29:11 PM -            Microsoft.VisualStudio.Community
9/15/2020 6:29:11 PM -                  Version : [15.0.27220,16.99)
9/15/2020 6:29:11 PM -            Microsoft.VisualStudio.Enterprise
9/15/2020 6:29:11 PM -                  Version : [15.0.27220,16.99)
9/15/2020 6:29:11 PM -
9/15/2020 6:29:11 PM -      References         :
9/15/2020 6:29:11 PM - Signature Details...
9/15/2020 6:29:11 PM -      Extension is not signed.
9/15/2020 6:29:11 PM -
9/15/2020 6:29:11 PM - Searching for applicable products...
9/15/2020 6:29:11 PM - Found installed product - Microsoft Visual Studio Community 2015
9/15/2020 6:29:11 PM - Found installed product - Microsoft Visual Studio 2015 Shell (Integrated)
9/15/2020 6:29:11 PM - Found installed product - Global Location
9/15/2020 6:29:11 PM - Found installed product - ssms
9/15/2020 6:29:11 PM - Found installed product - AtmelStudio
9/15/2020 6:29:11 PM - VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products.
   at VSIXInstaller.App.InitializeInstall(Boolean isRepairSupported)
   at VSIXInstaller.App.InitializeInstall()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()

Title: Re: Linking a binary libary Issue
Post by JamesFarmer on Sep 15th, 2020 at 11:32pm
I see in there it is trying to install to VS 2015 But i have VS 2019 on this machine only the 2015 shell is on there from another program I use

Title: Re: Linking a binary libary Issue
Post by Visual Micro on Sep 15th, 2020 at 11:40pm
That happens because you have atmel studio or an older ide installed, Microsoft try to run an older installer. I reported it but they ignored the request.

You need to right click the downloaded vsix and select "Open With > Visual Studio Version Selector"

the same release is also now in the Gallery therefore available via Extension Manager > Updates

Title: Re: Linking a binary libary Issue
Post by JamesFarmer on Sep 16th, 2020 at 12:09am
That fixed everything thanbk you

Title: Re: Linking a binary libary Issue
Post by MaxT on Dec 4th, 2020 at 2:36pm
Hi,
I have a similar problem with bsec.
Arduino IDE compiles ok.
VM no with this error
Build failed for project 'basic'
ld.exe: cannot find -lalgobsec

I've added this compiler.libraries.ldflags= flag in platform.txt

Any idea?
tks
Massimo

Title: Re: Linking a binary libary Issue
Post by Simon@Visual Micro on Dec 4th, 2020 at 5:20pm
Thanks, can you please set the settings shown at the top of the page, and clean the Solution. Then build and attach the entire output from the Output Window > Micro Build.

Title: Re: Linking a binary libary Issue
Post by MaxT on Dec 7th, 2020 at 3:40pm
If you refer for
-LC:\\Users\\Home\\Documents\\Arduino\\libraries\\BSEC-Arduino-library-master\\
src\\esp32" -lalgobsec -Wl,

it is not clear to me where?

In attach out of VM and arduino
Max
https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=Out.zip (17 KB | 1 )

Title: Re: Linking a binary libary Issue
Post by Simon@Visual Micro on Dec 8th, 2020 at 8:01pm
Thanks for the report and detail.

The latest version (20.09.10.21) resolves this, and is available at the board below:
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES

Just to confirm the edits to the esp32\platform.txt:
1) Add below property to file (ensures Arduino IDE still compiles as expected)

Code (]compiler.libraries.ldflags=[/code):
2) Alter the below recipe to contain the {compiler.libraries.ldflags}, after the {compiler.c.elf.libs}, in the recipe.c.combine.pattern, to merge the ldflags and path to the archive in
[code]recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} -Wl,--start-group {object_files} "{archive_file_path}" "" {compiler.c.elf.libs} {compiler.libraries.ldflags} -Wl,--end-group -Wl,-EL -o "{build.path}/{build.project_name}.elf"

Title: Re: Linking a binary libary Issue
Post by MaxT on Dec 9th, 2020 at 6:35pm
Hi,
the new version run  :)

thanks a lot

Max

Visual Micro » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2022. All Rights Reserved.