Bug 56617 - Native linking error: file not found: lib/xxxx.a
Summary: Native linking error: file not found: lib/xxxx.a
Status: RESOLVED NORESPONSE
Alias: None
Product: iOS
Classification: Xamarin
Component: MSBuild ()
Version: XI 10.10 (d15-2)
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-05-18 13:56 UTC by Saravanan
Modified: 2017-06-27 10:16 UTC (History)
7 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NORESPONSE

Description Saravanan 2017-05-18 13:56:54 UTC
Getting Native linking error while deploying Xamarin.iOS application after migrating Xamarin 4.5. we are using native library in our project and added additional mtouch arguments. Same was working in previous Xamarin version. Verified that files and folder are present in same path. 

--gcc_flags "-framework Security" -cxx -gcc_flags "-L$(InfoPath) -lxxx -force_load $(InfoPath) xxx.a -L$(Path) -l yyy -force_load $(Path) yyy.a"

Tried with sample application by adding below mtouch argument. Getting same error.
-gcc_flags "-L${ProjectDir} -lXXX -force_load ${ProjectDir}/lib/libXXX.a"


Error		Native linking failed. Please review the build log. Xamarin45Proj  C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets	747			
Error		Native linking error: file not found: lib/xxxx.a				
Error		Native linking error: warning: directory not found for option '-Llib/'				
Error		Native linking error: warning: directory not found for option '-Llib/'			
Error		Native linking failed. Please review the build log and the user flags provided to gcc: -framework Security -Llib/ -lxxx -force_load lib/xxx.a -Llib/ -lyyy -force_load lib/yyy.a

System Info:
Xamarin   4.5.0.443 (c871575)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   7.3.0.13 (448f54f)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS   10.10.0.30 (30b6e87)
Visual Studio extension to enable development for Xamarin.iOS.

Steps to Reproduce:
Create new Xamarin.iOS project.
Add lib folder in project.
Add C++ native library in lib folder.
Add mtouch additional argument.
Build and run application.

Please update me resolution.
Comment 1 Saravanan 2017-05-23 13:23:13 UTC
Any update on this issue?
Comment 2 Vincent Dondain [MSFT] 2017-05-23 13:44:39 UTC
Hi Saravanan,

Could you please provide a small test case so the team can try to reproduce this with your exact settings. Also please provide your full build log, crash reports (if any) and **all** version informations.

To get full build logs just set the log verbosity to diagnostic at the following locations:
- On Visual Studio for Mac: Preferences > Projects > Build
- On Visual Studio for Windows: Tools > Options > Projects and Solutions > Build and Run

On Visual Studio Windows you also want to add `-v -v -v -v` to the mtouch additional arguments by right-clicking the project in the solution explorer and selecting `Properties`.
Note: this is done automatically on Visual Studio for Mac when the log verbosity is set to diagnostic.

Thanks.
Comment 3 Manuel de la Peña [MSFT] 2017-06-27 10:16:27 UTC
We have not received the requested information. If you are still experiencing this issue please provide all the requested information and re-open the bug report. Thanks!