- Ошибка «Library Not Found» при запуске приложения на устройстве
- Ошибка во время установки библиотеки на устройство
Ошибка возникает, потому что Xcode не может подписать библиотеки, которые предоставляет SPM. В проекте SPM заведена задача на исправление, но на текущий момент она не решена.
Чтобы решить проблему, выполните последовательность действий:
-
На этапе сборки вашего приложения добавьте шаг с копированием файлов.
-
В пункте Destination выберите значение Frameworks.
-
Добавьте шаг с запуском скрипта.
-
Добавьте скрипт. Скрипт подпишет библиотеки, которые предоставляет SPM.
find "${CODESIGNING_FOLDER_PATH}" -name '*.framework' -print0 | while read -d $'' framework do codesign --force --deep --sign "${EXPANDED_CODE_SIGN_IDENTITY}" --preserve-metadata=identifier,entitlements --timestamp=none "${framework}" done
Во время установки библиотеки может возникнуть ошибка, указанная ниже (пример лога). Чтобы решить проблему, выполните последовательность шагов из раздела Ошибка «Library Not Found» при запуске приложения на устройстве.
Пример лога
Details
Unable to install "Your App"
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620395
--
A valid provisioning profile for this executable was not found.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620395
User Info: {
DVTRadarComponentKey = 487925;
MobileDeviceErrorCode = "(0xE8008015)";
"com.apple.dtdevicekit.stacktrace" = (
0 DTDeviceKitBase 0x00000001212d493f DTDKCreateNSErrorFromAMDErrorCode + 220
1 DTDeviceKitBase 0x0000000121313124 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 155
2 DVTFoundation 0x000000010576db33 DVTInvokeWithStrongOwnership + 71
3 DTDeviceKitBase 0x0000000121312e65 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1440
4 IDEiOSSupportCore 0x0000000121183d28 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.292 + 3513
5 DVTFoundation 0x000000010589c29a __DVT_CALLING_CLIENT_BLOCK__ + 7
6 DVTFoundation 0x000000010589debc __DVTDispatchAsync_block_invoke + 1191
7 libdispatch.dylib 0x00007fff73c476c4 _dispatch_call_block_and_release + 12
8 libdispatch.dylib 0x00007fff73c48658 _dispatch_client_callout + 8
9 libdispatch.dylib 0x00007fff73c4dc44 _dispatch_lane_serial_drain + 597
10 libdispatch.dylib 0x00007fff73c4e5d6 _dispatch_lane_invoke + 363
11 libdispatch.dylib 0x00007fff73c57c09 _dispatch_workloop_worker_thread + 596
12 libsystem_pthread.dylib 0x00007fff73ea2a3d _pthread_wqthread + 290
13 libsystem_pthread.dylib 0x00007fff73ea1b77 start_wqthread + 15
);
}
--
System Information
macOS Version 10.15.7 (Build 19H15)
Xcode 12.1 (17222)
Если вы не нашли ответ на свой вопрос, то вы можете задать его через форму обратной связи. Пожалуйста, опишите возникшую проблему как можно подробнее. Если возможно, приложите скриншот.
I am getting an error after I put my application in an AdMob. The app was working until today. The error is the following:
ld: library not found for -lGoogleAdMobAds
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How can I fix this? Thank you.
hasan
23.7k10 gold badges62 silver badges100 bronze badges
asked Jun 5, 2014 at 1:02
3
I had a similar «library not found» issue. However it was because I accidentally was using the .xcodeproj
file instead of the .xcworkspace
file.
kenorb
154k86 gold badges674 silver badges740 bronze badges
answered Feb 16, 2015 at 18:41
CasperCasper
3,7452 gold badges13 silver badges12 bronze badges
7
Sometimes you just remove the reference of the library and add reference again.
Apart from adding the Google Mobile Ads SDK and other libraries again from scratch, I would recommend you checking the Library Search Paths. There are instances when you copy or duplicate a target, Xcode decides that it needs to escape any double quotes » with a ». Make sure you remove all the ’s — it should look like this —
I was able to duplicate the error, by doing prefixing my path with multiple ».
answered Jun 5, 2014 at 1:22
rauroraraurora
3,6131 gold badge22 silver badges29 bronze badges
5
Select your Target, go to "Build Phases"
in "Link Binary With Libraries"
remove ".a"
file of that library.
Clean and Build.
answered May 2, 2017 at 7:55
Abuzar AminAbuzar Amin
1,9711 gold badge19 silver badges33 bronze badges
2
If error related to Cocoapods as follow:
library not found for -lPod-...
You need to check Other Linker Flags and remove it from there.
Extra Information: If you have an old project that uses cocoapods. And recently you needed to add the use_frameworks! to your podfile.
cocoapods will not add the libraries to your Other Linker Flags
anymore cause its inherited. Therefore, you may need to remove those
manually from the other linker flags which they were added before
using the use_frameworks!
answered Apr 7, 2015 at 17:15
hasanhasan
23.7k10 gold badges62 silver badges100 bronze badges
8
For my case Xcode 7, also worked in Xcode 9.1/9.2
ld: library not found for -ldAfnetworking
clang: error: linker command failed with exit code 1 (use -v to see invocation)
set Build Active architecture Only
to Yes
answered Jan 27, 2016 at 11:53
TedTed
22.5k11 gold badges95 silver badges107 bronze badges
4
If error is like following
ld: library not found for -lpods
I found that a file «libPods.a» which is in red colour(like missing files) was created somehow in the Framework group of the project. I just simply removed that file and everything got fine.
EDIT: Another Solution
Another Solution that I have already answered in the similar question is in this link
answered Aug 24, 2015 at 10:00
0
goto Build Phases -> Link Binary With Libraries and remove library which show errors because that library is not available in project folder
answered Mar 14, 2018 at 7:38
1
Late for the answer but here are the list of things which I tried.So it will be in one place if anyone wants to try to fix the issue.
- Valid architecture = armv7 armv7s
- Build Active Architecture only = NO
- Target -> Build Settings ->Other Linker Flags = $(inherited)
- Target -> Build Settings ->Library Search Path = $(inherited)
- Product Clean
- Pod Update in terminal
answered Jun 20, 2017 at 19:40
reetureetu
3133 silver badges11 bronze badges
ld: library not found for
It is compile time error for a Static Library
that is caused by Static Linker
ld: library not found for -l<Library_name>
1.You can get the error Library not found for
when you have not include a library path to the Library Search Paths(LIBRARY_SEARCH_PATHS)
ld
means Static Linker
which can not find a location of the library. As a developer you should help the linker and point the Library Search Paths
Build Settings -> Search Paths -> Library Search Paths
2.Also you can get this error if you first time open a new project (.xcodeproj
) with Cocoapods support, run pod update
. To fix it just close this project and open created a workspace instead (.xcworkspace
)
[Vocabulary]
answered Dec 6, 2019 at 15:58
yoAlex5yoAlex5
28.3k8 gold badges192 silver badges202 bronze badges
As for me this problem occurs because i installed Material Library for IOS.
to solve this issue
1: Go to Build Settings of your target app.
2: Search for Other linker flags
3: Open the other linker flags and check for the library which is mention in the error.
4: remove that flag.
5: Clean and build.
I hope this fix your issue.
answered Apr 3, 2019 at 8:37
In my case there was a naming issue. My library was called ios-admob-mm-adapter.a
, but Xcode expected, that the name should start with prefix lib. I’ve just renamed my lib to libios-admob-mm-adapter.a
and fixed the issue.
I use Cocoapods, and it links libraries with Other linker flags option in build settings of my target. The flag looks like -l"ios-admob-mm-adapter"
Hope it helps someone else
answered Apr 15, 2016 at 6:39
Simply, GoogleAdMobAds.a
is missing in project target.
For me it was libAdIdAccessLibrary.a
Please check attached screenshot
answered Jan 2, 2018 at 7:34
AshvinAshvin
8,0633 gold badges35 silver badges52 bronze badges
In the case of ld: library not found for -{LIBRARY_NAME}
happened because the library file(s) is not existing.
Check the library path on your application targets’ “Build Phases”
Library Search Paths tab.
The library file(s) path must be according to the real path for example if your file(s) in the root of the project you must set the path like $(PROJECT_DIR)
answered Jun 1, 2019 at 6:22
Reza DehnaviReza Dehnavi
2,2463 gold badges16 silver badges30 bronze badges
1
I know this is a bit old, but I just hit a similar issue and running ‘pod update’ fixed this for me. My library error was with AFNetworking…
Just be careful doing pod update if you don’t use explicit versions in your pod file.
answered Sep 29, 2015 at 15:14
This error is very weird.
I had this error with -ldAfnetworking and I only copy my project in other path and works.
answered Feb 4, 2016 at 19:55
A. TrejoA. Trejo
6318 silver badges16 bronze badges
I tried renaming my build configuration Release
to Production
, but apparently cocoa pods doesn’t like it. I renamed it again to Release
, and everything builds just fine.
DimaSan
12.2k11 gold badges65 silver badges75 bronze badges
answered Oct 28, 2016 at 13:10
1
@raurora’s answer pointed me in the right direction. I was including libraries in my «watchkitapp Extension/lib» path. In this case, the Library Search Path needed to be escaped with a », but the linker didn’t seem to understand this. To fix / work-around the issue, I moved my lib path up one level so it was no longer in a directory that contained a space in the name.
answered Dec 5, 2016 at 15:21
I just update the pod file ‘pod update’ and it start to work for me normally.
answered Jul 23, 2018 at 11:55
ChandniChandni
6921 gold badge10 silver badges25 bronze badges
Running ‘pod update’ in my project fixed my problem with the ‘library not found for -lSTPopup’ error.
Remarking Trevor Panhorst’s answer:
«Just be careful doing pod update if you don’t use explicit versions in your pod file.»
answered Jul 31, 2018 at 10:41
Easy solution. Here’s how I’d fix the issue:
- Go to the directory
platforms/ios
- Then, execute the command
pod install
That’s it. This should install the missing library.
answered Jan 22, 2019 at 2:33
Manoj ShresthaManoj Shrestha
4,1465 gold badges46 silver badges66 bronze badges
- Cleaned Build Folder
- Restarted XCode
Went away…
answered Apr 2, 2020 at 14:49
batthisbatthis
1071 silver badge5 bronze badges
I was getting similar bugs on library not found. Ultimately this is how I was able to resolve it
- Before starting with Xcode Archive, used flutter build iOS
- Changed the IOS Deployment Target to a higher target iOS 11.2 . Earlier I had something like 8.0 which was giving all the above errors.
- Made sure that the IOS deployment targets in Xcode are same in the Project, Target and Pods
answered Jul 8, 2020 at 23:06
I was also facing the same issue and spent more than 24 hours to solve this, I tried everything from the above solutions but what finally works for me is
- Build settings -> Select Target
- Basics
- User-defined
- Change the VALID_ARCHS to arm64
de.
6,7763 gold badges37 silver badges66 bronze badges
answered Jul 2, 2021 at 5:19
Dude you need a reinstallation.
- Delete simply «rm -rf» pods.
- Install Pods «bundle exec pod install»
Works well then.
answered Jun 27, 2022 at 12:56
the same here, but in my case was resolved with answer the kenorb
answered Nov 3, 2022 at 15:35
Хитрости »
1 Май 2011 179331 просмотров
Представим себе ситуацию — вы написали макрос и кому-то выслали. Макрос хороший, нужный, а главное — рабочий. Вы сами проверили и перепроверили. Но тут вам сообщают — Макрос не работает. Выдает ошибку — Can’t find project or library. Вы запускаете файл — нет ошибки. Перепроверяете все еще несколько раз — нет ошибки и все тут. Как ни пытаетесь, даже проделали все в точности как и другой пользователь — а ошибки нет. Однако у другого пользователя при тех же действиях ошибка не исчезает. Переустановили офис, но ошибка так и не исчезла — у вас работает, у них нет.
Или наоборот — Вы открыли чей-то чужой файл и при попытке выполнить код VBA выдает ошибку Can’t find project or library.
Почему появляется ошибка: как и любой программе, VBA нужно иметь свой набор библиотек и компонентов, посредством которых он взаимодействует с Excel(и не только). И в разных версиях Excel эти библиотеки и компоненты могут различаться. И когда вы делаете у себя программу, то VBA(или вы сами) ставит ссылку на какой-либо компонент либо библиотеку, которая может отсутствовать на другом компьютере. Вот тогда и появляется эта ошибка. Что же делать? Все очень просто:
- Открываем редактор VBA
- Идем в Tools —References
- Находим там все пункты, напротив которых красуется MISSING.
Снимаем с них галочки - Жмем Ок
- Сохраняем файл
Эти действия необходимо проделать, когда выполнение кода прервано и ни один код проекта не выполняется. Возможно, придется перезапустить Excel. Что самое печальное: все это надо проделать на том ПК, на котором данная ошибка возникла. Это не всегда удобно. А поэтому лично я рекомендовал бы не использовать сторонние библиотеки и раннее связывание, если это не вызвано необходимостью
Чуть больше узнать когда и как использовать раннее и позднее связывание можно из этой статьи: Как из Excel обратиться к другому приложению.
Всегда проверяйте ссылки в файлах перед отправкой получателю. Оставьте там лишь те ссылки, которые необходимы, либо которые присутствуют на всех версиях. Смело можно оставлять следующие(это касается именно VBA -Excel):
- Visual Basic for application (эту ссылку отключить нельзя)
- Microsoft Excel XX.0 Object Library (место X версия приложения — 12, 11 и т.д.). Эту ссылку нельзя отключить из Microsoft Excel
- Microsoft Forms X.0 Object Library. Эта ссылка подключается как руками, так и автоматом при первом создании любой UserForm в проекте. Однако отключить её после подключения уже не получится
- OLE Automation. Хотя она далеко не всегда нужна — не будет лишним, если оставить её подключенной. Т.к. она подключается автоматически при создании каждого файла, то некоторые «макрописцы» используют методы из этой библиотеки, даже не подозревая об этом, а потом не могут понять, почему код внезапно отказывается работать(причем ошибка может быть уже другой — вроде «Не найден объект либо метод»)
Может я перечислил не все — но эти точно имеют полную совместимость между разными версиями Excel.
Если все же по какой-то причине есть основания полагать, что в библиотеках могут появиться «битые» ссылки MISSING, можно автоматически найти «битые» ссылки на такие библиотеки и отключить их нехитрым макросом:
Sub Remove_MISSING() Dim oReferences As Object, oRef As Object Set oReferences = ThisWorkbook.VBProject.References For Each oRef In oReferences 'проверяем, является ли эта библиотека сломанной - MISSING If (oRef.IsBroken) Then 'если сломана - отключаем во избежание ошибок oReferences.Remove Reference:=oRef End If Next End Sub
Но для работы этого макроса необходимо:
- проставить доверие к проекту VBA:
Excel 2010-2019 — Файл -Параметры -Центр управления безопасностью-Параметры макросов-поставить галочку «Доверять доступ к объектной модели проектов VBA»
Excel 2007 — Кнопка Офис-Параметры Excel-Центр управления безопасностью-Параметры макросов-поставить галочку «Доверять доступ к объектной модели проектов VBA»
Excel 2003— Сервис — Параметры-вкладка Безопасность-Параметры макросов-Доверять доступ к Visual Basic Project - проект VBA не должен быть защищен
И главное — всегда помните, что ошибка Can’t find project or library может появиться до запуска кода по их отключению(Remove_MISSING). Все зависит от того, что и как применяется в коде и в какой момент идет проверка на «битые» ссылки.
Так же Can’t find project or library возникает не только когда есть «битая» библиотека, но и если какая-либо библиотека, которая используется в коде, не подключена. Тогда не будет MISSING. И в таком случае будет необходимо определить в какую библиотеку входит константа, объект или свойство, которое выделяет редактор при выдаче ошибки, и подключить эту библиотеку.
Например, есть такой кусок кода:
Sub CreateWordDoc() Dim oWordApp As Word.Application Set oWordApp = New Word.Application oWordApp.Documents.Add
если библиотека Microsoft Excel XX.0 Object Library(вместо XX версия приложения — 11, 12, 16 и т.д.) не подключена, то будет подсвечена строка oWordApp As Word.Application. И конечно, надо будет подключить соответствующую библиотеку.
Если используются какие-либо методы из библиотеки и есть вероятность, что библиотека будет отключена — можно попробовать проверить её наличие кодом и либо выдать сообщение, либо подключить библиотеку(для этого надо будет либо знать её GUIDE, либо полный путь к ней на конечном ПК).
На примере стандартной библиотеки OLE Automation(файл библиотеки называется stdole2) приведу коды, которые помогут проверить наличие её среди подключенных и либо показать сообщение либо сразу подключить.
Выдать сообщение — нужно в случаях, если не уверены, что можно вносить подобные изменения в VBAProject(например, если он защищен паролем):
Sub CheckReference() Dim oReferences As Object, oRef As Object, bInst As Boolean Set oReferences = ThisWorkbook.VBProject.References 'проверяем - подключена ли наша библиотека или нет For Each oRef In oReferences If LCase(oRef.Name) = "stdole" Then bInst = True Next 'если не подключена - выводим сообщение If Not bInst Then MsgBox "Не установлена библиотека OLE Automation", vbCritical, "Error" End If End Sub
Если уверены, что можно вносить изменения в VBAProject — то удобнее будет проверить наличие подключенной библиотеки «OLE Automation» и сразу подключить её, используя полный путь к ней(на большинстве ПК этот путь будет совпадать с тем, что в коде):
Sub CheckReferenceAndAdd() Dim oReferences As Object, oRef As Object, bInst As Boolean Set oReferences = ThisWorkbook.VBProject.References 'проверяем - подключена ли наша библиотека или нет For Each oRef In oReferences Debug.Print oRef.Name If LCase(oRef.Name) = "stdole" Then bInst = True Next 'если не подключена - подключаем, указав полный путь и имя библиотеки на ПК If Not bInst Then ThisWorkbook.VBProject.References.AddFromFile "C:WindowsSystem32stdole2.tlb" End If End Sub
Сразу подкину ложку дегтя(предугадывая возможные вопросы): определить автоматически кодом какая именно библиотека не подключена невозможно. Ведь чтобы понять из какой библиотеки метод или свойство — надо откуда-то эту информацию взять. А она внутри той самой библиотеки…Замкнутый круг
Так же см.:
Что необходимо для внесения изменений в проект VBA(макросы) программно
Как защитить проект VBA паролем
Как программно снять пароль с VBA проекта?
Статья помогла? Поделись ссылкой с друзьями!
Видеоуроки
Поиск по меткам
Access
apple watch
Multex
Power Query и Power BI
VBA управление кодами
Бесплатные надстройки
Дата и время
Записки
ИП
Надстройки
Печать
Политика Конфиденциальности
Почта
Программы
Работа с приложениями
Разработка приложений
Росстат
Тренинги и вебинары
Финансовые
Форматирование
Функции Excel
акции MulTEx
ссылки
статистика
This error means that the library you are trying to call is not available in parallel workers.
Although, you have added required files to the parallel pool using ‘AttachedFiles’, the reason why this error is thrown is that those libraries are not loaded in parallel workers.
In order to have libraries available in those workers, please load libraries in each worker.
So, to fix this issue, please use loadlibrary to load libraries in each worker.
clear all;
addpath(fullfile(matlabroot,‘extern’,‘examples’,‘shrlib’))
struct.p1 = 4; struct.p2 = 7.3; struct.p3 = -290;
parpool(‘AttachedFiles’,{‘shrlibsample.mexw64’,‘shrlibsample.h’,‘shrlibsample.c’, ‘shrhelp.h’});
parfor i=1:4
if ~libisloaded(‘shrlibsample’)
loadlibrary(‘shrlibsample’)
end
[res,st] = calllib(‘shrlibsample’,‘addStructByRef’,struct);
end
unloadlibrary shrlibsample
Closed (works as designed)
I keep getting this issue when trying to install on Drupal, I have re-downloaded the package and it appears to install ok but does not enable, when I try I just get the following error message:
elFinder library was not found. Please download it from http://sourceforge.net/projects/elfinder/files/ and install to . (Currently using elFinder Not found)
any ideas?
Comments
I have downloaded another pack from source forge which has a slightly different directory structure so not 100% sure which to go with, I assume the one downloaded from the drupal site would be set up specifically for drupal?
Any other simple file uploader would do, just need to upload docs via the wysiwyg.
- Log in or register to post comments
Component: | Miscellaneous | » Code |
Priority: | Normal | » Major |
- Log in or register to post comments
Have you installed the module and also the library? The library needs to be unpacked into /sites/all/libraries if I’m remembering correctly. And the library version you needs depends on which version of elFinder you have installed. There’s a chart on they elFinder project page. If you’re using the 0.8 version of elFinder, it should be this library http://sourceforge.net/projects/elfinder/files/elfinder-1.2.zip/download
- Log in or register to post comments
I had the same problem. Solved by downloading the library version 1.2 from http://sourceforge.net/projects/elfinder/files , unpacking it in sites/all/libraries, and then changing the name of the folder from elfinder-1.2 to elfinder .
The error message given is not descriptive though.
- Log in or register to post comments
Comment #5
NWOM CreditAttribution: NWOM commented 1 March 2017 at 14:00
Version: | 7.x-0.7 | » 7.x-2.x-dev |
Category: | Bug report | » Support request |
Priority: | Major | » Normal |
Issue summary: | View changes | |
Status: | Active | » Closed (works as designed) |
- Log in or register to post comments