Library not found for -lPods #155

Closed
cellularmitosis opened this Issue Mar 9, 2012 · 56 comments

Comments

Projects
None yet
@cellularmitosis
Contributor

cellularmitosis commented Mar 9, 2012

Hey guys,

I'm getting the error "Library not found for -lPods".

This is after following the instructions in the README at https://github.com/CocoaPods/CocoaPods/blob/master/README.md

Additionally, I found https://github.com/CocoaPods/CocoaPods/wiki/Creating-a-project-that-uses-CocoaPods and followed step 4 in the FAQ (which specifically addresses this issue), but I still get the same error.

Versions:
Xcode: 4.2
OS X: 10.6.8

@cellularmitosis

This comment has been minimized.

Show comment Hide comment
@cellularmitosis

cellularmitosis Mar 9, 2012

Contributor

interestingly, I do see a libPods.a file, so I'm not sure why Xcode doesn't see it.

cell@Immortal$ pwd
/Users/cell/Desktop/PodsTest

cell@Immortal$ find . | grep Pods.a
./Pods/build/Debug-iphonesimulator/libPods.a

Contributor

cellularmitosis commented Mar 9, 2012

interestingly, I do see a libPods.a file, so I'm not sure why Xcode doesn't see it.

cell@Immortal$ pwd
/Users/cell/Desktop/PodsTest

cell@Immortal$ find . | grep Pods.a
./Pods/build/Debug-iphonesimulator/libPods.a

@alloy

This comment has been minimized.

Show comment Hide comment
@alloy

alloy Mar 9, 2012

Owner

Hmm, it should not build it in ./Pods/build, but in a shared build directory of the workspace. It should be either in ./DerivedData or the default setting of ~/Library/Developer/Xcode/DerivedData/APP.

Owner

alloy commented Mar 9, 2012

Hmm, it should not build it in ./Pods/build, but in a shared build directory of the workspace. It should be either in ./DerivedData or the default setting of ~/Library/Developer/Xcode/DerivedData/APP.

@cellularmitosis

This comment has been minimized.

Show comment Hide comment
@cellularmitosis

cellularmitosis Mar 9, 2012

Contributor

hmm, this may be due to a setting we use here at work.

in Xcode -> Preferences, under the Locations tab, there is a Derived Data setting. Mine is set to "Default". Then, under the Advanced tab, it is set to "Locations specified by targets".

So perhaps I can change the Pods target to specify a different location for the derived data, to make it compatible with the existing implementation?

Contributor

cellularmitosis commented Mar 9, 2012

hmm, this may be due to a setting we use here at work.

in Xcode -> Preferences, under the Locations tab, there is a Derived Data setting. Mine is set to "Default". Then, under the Advanced tab, it is set to "Locations specified by targets".

So perhaps I can change the Pods target to specify a different location for the derived data, to make it compatible with the existing implementation?

@cellularmitosis

This comment has been minimized.

Show comment Hide comment
@cellularmitosis

cellularmitosis Mar 9, 2012

Contributor

Interesting, there is also File -> Workspace Settings, which also has a derived data location setting. I'll try futzing with that.

Contributor

cellularmitosis commented Mar 9, 2012

Interesting, there is also File -> Workspace Settings, which also has a derived data location setting. I'll try futzing with that.

@cellularmitosis

This comment has been minimized.

Show comment Hide comment
@cellularmitosis

cellularmitosis Mar 9, 2012

Contributor

findings:

File -> Workspace Settings -> Derived Data Location = Default:

cell@Immortal$ pwd
/Users/cell/Desktop/PodsTest
cell@Immortal$ find . | grep 'libPods.a'
./Pods/build/Debug-iphonesimulator/libPods.a

File -> Workspace Settings -> Derived Data Location = Workspace-relative (set to "DerivedData"):

cell@Immortal$ find . | grep 'libPods.a'
./Pods/build/Debug-iphonesimulator/libPods.a

File -> Workspace Settings -> Derived Data Location = Custom (set to "/Users/cell/Library/Developer/Xcode/DerivedData"):

cell@Immortal$ find . | grep 'libPods.a'
./Pods/build/Debug-iphonesimulator/libPods.a

interesting... it appears to be completely ignoring that setting. I even ran a clean, and a 'find' in between each setting to verify the previous .a file had disappeared.

Contributor

cellularmitosis commented Mar 9, 2012

findings:

File -> Workspace Settings -> Derived Data Location = Default:

cell@Immortal$ pwd
/Users/cell/Desktop/PodsTest
cell@Immortal$ find . | grep 'libPods.a'
./Pods/build/Debug-iphonesimulator/libPods.a

File -> Workspace Settings -> Derived Data Location = Workspace-relative (set to "DerivedData"):

cell@Immortal$ find . | grep 'libPods.a'
./Pods/build/Debug-iphonesimulator/libPods.a

File -> Workspace Settings -> Derived Data Location = Custom (set to "/Users/cell/Library/Developer/Xcode/DerivedData"):

cell@Immortal$ find . | grep 'libPods.a'
./Pods/build/Debug-iphonesimulator/libPods.a

interesting... it appears to be completely ignoring that setting. I even ran a clean, and a 'find' in between each setting to verify the previous .a file had disappeared.

@cellularmitosis

This comment has been minimized.

Show comment Hide comment
@cellularmitosis

cellularmitosis Mar 9, 2012

Contributor

all of the above was with Xcode -> Preferences -> Locations -> Locations -> Derived Data = Default, Advanced -> Build Location = Locations specified by targets.

Here I'll try the same, but with Xcode -> Preferences -> Locations -> Locations -> Derived Data = Default, Advanced -> Build Location = Derived Data Locations (recommended), Unique Subfolder.

Ah, it succeeds right away, and the 'find' command doesn't turn up anything.

Argh, this means I'm going to have to toggle that setting every time I switch from work to CocoaPods experimentation...

Contributor

cellularmitosis commented Mar 9, 2012

all of the above was with Xcode -> Preferences -> Locations -> Locations -> Derived Data = Default, Advanced -> Build Location = Locations specified by targets.

Here I'll try the same, but with Xcode -> Preferences -> Locations -> Locations -> Derived Data = Default, Advanced -> Build Location = Derived Data Locations (recommended), Unique Subfolder.

Ah, it succeeds right away, and the 'find' command doesn't turn up anything.

Argh, this means I'm going to have to toggle that setting every time I switch from work to CocoaPods experimentation...

@alloy

This comment has been minimized.

Show comment Hide comment
@alloy

alloy Mar 9, 2012

Owner

Does the project normally not build with this setting? Maybe that can be solved?

Owner

alloy commented Mar 9, 2012

Does the project normally not build with this setting? Maybe that can be solved?

@alloy

This comment has been minimized.

Show comment Hide comment
@alloy

alloy Mar 9, 2012

Owner

For now I will close this. If, however, you find that it is essential that CocoaPods can handle this and you have found a workaround then please re-open it.

Owner

alloy commented Mar 9, 2012

For now I will close this. If, however, you find that it is essential that CocoaPods can handle this and you have found a workaround then please re-open it.

@alloy alloy closed this Mar 9, 2012

@vicpenap

This comment has been minimized.

Show comment Hide comment
@vicpenap

vicpenap Apr 17, 2012

I'm having the same problem... I've also followed the steps on the Readme and on the wiki that @cellularmitosis mentions on his first commit. The thing is that I can perfectly build and run on the simulator, the problem comes when building for a device.

Am I missing something?

I'm having the same problem... I've also followed the steps on the Readme and on the wiki that @cellularmitosis mentions on his first commit. The thing is that I can perfectly build and run on the simulator, the problem comes when building for a device.

Am I missing something?

@vicpenap

This comment has been minimized.

Show comment Hide comment
@vicpenap

vicpenap Apr 17, 2012

OK, I think the problem comes from a xcode configuration error. When compiling for simulator Pods project get compiled ok, but when compiling for device, it doesn't. That's why it can't find libPods.a, because it doesn't exist.

OK, I think the problem comes from a xcode configuration error. When compiling for simulator Pods project get compiled ok, but when compiling for device, it doesn't. That's why it can't find libPods.a, because it doesn't exist.

@vicpenap

This comment has been minimized.

Show comment Hide comment
@vicpenap

vicpenap Apr 17, 2012

Problem found. My app's target is configured for both architectures armv6 and armv7, but Pods project is configured only for armv7.

Hope this helps somebody in the same situation.

Problem found. My app's target is configured for both architectures armv6 and armv7, but Pods project is configured only for armv7.

Hope this helps somebody in the same situation.

@alloy

This comment has been minimized.

Show comment Hide comment
@alloy

alloy Apr 17, 2012

Owner

In that case you should specify the platform in your Podfile like so:

platform :ios, :deployment_target => '4.0'

(Or whichever your target is.)

HTH

On Apr 17, 2012, at 1:03 PM, Victor P. wrote:

Problem found. My app's target is configured for both architectures armv6 and armv7, but Pods project is configured only for armv7.

Hope this helps somebody in the same situation.


Reply to this email directly or view it on GitHub:
#155 (comment)

Owner

alloy commented Apr 17, 2012

In that case you should specify the platform in your Podfile like so:

platform :ios, :deployment_target => '4.0'

(Or whichever your target is.)

HTH

On Apr 17, 2012, at 1:03 PM, Victor P. wrote:

Problem found. My app's target is configured for both architectures armv6 and armv7, but Pods project is configured only for armv7.

Hope this helps somebody in the same situation.


Reply to this email directly or view it on GitHub:
#155 (comment)

@vicpenap

This comment has been minimized.

Show comment Hide comment
@vicpenap

vicpenap Apr 17, 2012

Oh, I didn't know that :)

El 17/04/2012, a las 13:39, "Eloy Durán"
reply@reply.github.com
escribió:

In that case you should specify the platform in your Podfile like so:

platform :ios, :deployment_target => '4.0'

(Or whichever your target is.)

HTH

On Apr 17, 2012, at 1:03 PM, Victor P. wrote:

Problem found. My app's target is configured for both architectures armv6 and armv7, but Pods project is configured only for armv7.

Hope this helps somebody in the same situation.


Reply to this email directly or view it on GitHub:
#155 (comment)


Reply to this email directly or view it on GitHub:
#155 (comment)

Oh, I didn't know that :)

El 17/04/2012, a las 13:39, "Eloy Durán"
reply@reply.github.com
escribió:

In that case you should specify the platform in your Podfile like so:

platform :ios, :deployment_target => '4.0'

(Or whichever your target is.)

HTH

On Apr 17, 2012, at 1:03 PM, Victor P. wrote:

Problem found. My app's target is configured for both architectures armv6 and armv7, but Pods project is configured only for armv7.

Hope this helps somebody in the same situation.


Reply to this email directly or view it on GitHub:
#155 (comment)


Reply to this email directly or view it on GitHub:
#155 (comment)

@nicktmro

This comment has been minimized.

Show comment Hide comment
@nicktmro

nicktmro May 24, 2012

In my environment the issue was that the Pods project did not have a target called ADHOC (as per the main project). I duplicated the Pods release target, called it ADHOC, changed the OS Deployment Target to my requirement (5.0) and then everything worked.

In my environment the issue was that the Pods project did not have a target called ADHOC (as per the main project). I duplicated the Pods release target, called it ADHOC, changed the OS Deployment Target to my requirement (5.0) and then everything worked.

@alloy

This comment has been minimized.

Show comment Hide comment
@alloy

alloy May 24, 2012

Owner

@nicktmro This will be automated in the next release. As a matter of fact, it would be great, if you feel adventurous, if you could give the current HEAD version a spin to see that it actually works in your situation.

Owner

alloy commented May 24, 2012

@nicktmro This will be automated in the next release. As a matter of fact, it would be great, if you feel adventurous, if you could give the current HEAD version a spin to see that it actually works in your situation.

@alloy

This comment has been minimized.

Show comment Hide comment
@alloy

alloy May 24, 2012

Owner

PS: I’ve just added a wiki page with instructions on how to use the HEAD version.

Owner

alloy commented May 24, 2012

PS: I’ve just added a wiki page with instructions on how to use the HEAD version.

@tonyxiao

This comment has been minimized.

Show comment Hide comment
@tonyxiao

tonyxiao Jun 24, 2012

/Same problem here, I tried changing different configurations to no avail. What is the final solution that worked for you guys?

/Same problem here, I tried changing different configurations to no avail. What is the final solution that worked for you guys?

@cellularmitosis

This comment has been minimized.

Show comment Hide comment
@cellularmitosis

cellularmitosis Jun 24, 2012

Contributor

Hi Tony,

I just upgraded to 0.6.0.rc2 on friday, and confirmed that project
configurations (e.g. AdHoc) now get created in the Pods project as well.

-jason

On Sat, Jun 23, 2012 at 11:23 PM, tonyxiao <
reply@reply.github.com

wrote:

/Same problem here, I tried changing different configurations to no avail.
What is the final solution that worked for you guys?


Reply to this email directly or view it on GitHub:
#155 (comment)

Contributor

cellularmitosis commented Jun 24, 2012

Hi Tony,

I just upgraded to 0.6.0.rc2 on friday, and confirmed that project
configurations (e.g. AdHoc) now get created in the Pods project as well.

-jason

On Sat, Jun 23, 2012 at 11:23 PM, tonyxiao <
reply@reply.github.com

wrote:

/Same problem here, I tried changing different configurations to no avail.
What is the final solution that worked for you guys?


Reply to this email directly or view it on GitHub:
#155 (comment)

@ajsharp

This comment has been minimized.

Show comment Hide comment
@ajsharp

ajsharp Oct 28, 2012

I'm still having this problem. My issue is that the libPods.a file is never being generated, in either the DerivedData folder, or locally in the project. Where is "libPods.a" supposed to get created?

ajsharp commented Oct 28, 2012

I'm still having this problem. My issue is that the libPods.a file is never being generated, in either the DerivedData folder, or locally in the project. Where is "libPods.a" supposed to get created?

@mpurland

This comment has been minimized.

Show comment Hide comment
@mpurland

mpurland Nov 6, 2012

I had the same issue, but it was fixed by performing a pod update and reloading the workspace.

mpurland commented Nov 6, 2012

I had the same issue, but it was fixed by performing a pod update and reloading the workspace.

@ajsharp

This comment has been minimized.

Show comment Hide comment
@ajsharp

ajsharp Nov 6, 2012

Cool, thanks.

  • Alex

On Monday, November 5, 2012 at 6:54 PM, Matthew Purland wrote:

I had the same issue, but it was fixed by performing a pod update and reloading the workspace.


Reply to this email directly or view it on GitHub (#155 (comment)).

ajsharp commented Nov 6, 2012

Cool, thanks.

  • Alex

On Monday, November 5, 2012 at 6:54 PM, Matthew Purland wrote:

I had the same issue, but it was fixed by performing a pod update and reloading the workspace.


Reply to this email directly or view it on GitHub (#155 (comment)).

@iainsmith

This comment has been minimized.

Show comment Hide comment
@iainsmith

iainsmith Nov 10, 2012

So I was just having this issue.

My podfile was set to - platform :ios, :deployment_target => "6.0"
changed deployment_target to 5.0
pod install
Fixed

Bizarre. I should note I have two targets in my podfile just in case it's that.

So I was just having this issue.

My podfile was set to - platform :ios, :deployment_target => "6.0"
changed deployment_target to 5.0
pod install
Fixed

Bizarre. I should note I have two targets in my podfile just in case it's that.

@fabiopelosin fabiopelosin reopened this Nov 12, 2012

@iellis

This comment has been minimized.

Show comment Hide comment
@iellis

iellis Dec 18, 2012

After setting up cocoapods, xcode is looking for libPods.a for the Pods Target at the path:

/Users/iellis/Library/Developer/Xcode/DerivedData/theHunt-drrdmhifgdiqepgmbdccedvmdkvv/Build/Products/Debug/libPods.a

and for the App Target, it's looking here:

/Users/iellis/Library/Developer/Xcode/DerivedData/theHunt-drrdmhifgdiqepgmbdccedvmdkvv/Build/Products/Debug-iphoneos/libPods.a

libPods.a is actually being built in ~/Library/Developer/Xcode/DerivedData/theHunt-drrdmhifgdiqepgmbdccedvmdkvv/Build/Products/Debug-iphonesimulator

I'm not getting any warnings or errors and I can use the installed pods, but libPods.a shows up red in the file browser in XCode as if it can't be found. This seems wrong, but I'm not sure what it's affecting or how to clean it up.

Any ideas?

iellis commented Dec 18, 2012

After setting up cocoapods, xcode is looking for libPods.a for the Pods Target at the path:

/Users/iellis/Library/Developer/Xcode/DerivedData/theHunt-drrdmhifgdiqepgmbdccedvmdkvv/Build/Products/Debug/libPods.a

and for the App Target, it's looking here:

/Users/iellis/Library/Developer/Xcode/DerivedData/theHunt-drrdmhifgdiqepgmbdccedvmdkvv/Build/Products/Debug-iphoneos/libPods.a

libPods.a is actually being built in ~/Library/Developer/Xcode/DerivedData/theHunt-drrdmhifgdiqepgmbdccedvmdkvv/Build/Products/Debug-iphonesimulator

I'm not getting any warnings or errors and I can use the installed pods, but libPods.a shows up red in the file browser in XCode as if it can't be found. This seems wrong, but I'm not sure what it's affecting or how to clean it up.

Any ideas?

@fabiopelosin

This comment has been minimized.

Show comment Hide comment
@fabiopelosin

fabiopelosin Dec 21, 2012

Owner

I'm not getting any warnings or errors and I can use the installed pods, but libPods.a shows up red in the file browser in XCode as if it can't be found. This seems wrong, but I'm not sure what it's affecting or how to clean it up.

I would not bother too much about this if you don't have any issue, I think that it is just a minor UI bug of Xcode.

Owner

fabiopelosin commented Dec 21, 2012

I'm not getting any warnings or errors and I can use the installed pods, but libPods.a shows up red in the file browser in XCode as if it can't be found. This seems wrong, but I'm not sure what it's affecting or how to clean it up.

I would not bother too much about this if you don't have any issue, I think that it is just a minor UI bug of Xcode.

@youknowone

This comment has been minimized.

Show comment Hide comment
@youknowone

youknowone Dec 23, 2012

An idea:
Add a 'Run Script' phase to Pods project.
When building libPods.a, it adds $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) to LIBRARY_SEARCH_PATH in Pods.xcconfig

An idea:
Add a 'Run Script' phase to Pods project.
When building libPods.a, it adds $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) to LIBRARY_SEARCH_PATH in Pods.xcconfig

@AlfonsoUceda

This comment has been minimized.

Show comment Hide comment
@AlfonsoUceda

AlfonsoUceda Jan 1, 2013

Hi:

I've solved with the following way:

Xcode > Preferences > Locations > Locations > Advanced and a windows will appear, select Unique.

I had selected Legacy.

When you select Unique, click done and close the preferences. Build the project and the error should dissapear.

Hi:

I've solved with the following way:

Xcode > Preferences > Locations > Locations > Advanced and a windows will appear, select Unique.

I had selected Legacy.

When you select Unique, click done and close the preferences. Build the project and the error should dissapear.

@youknowone

This comment has been minimized.

Show comment Hide comment
@youknowone

youknowone Jan 1, 2013

@AlfonsoUceda I set it legacy always because of some other libraries but it doesn't help this problem.

@AlfonsoUceda I set it legacy always because of some other libraries but it doesn't help this problem.

@forthenature

This comment has been minimized.

Show comment Hide comment
@forthenature

forthenature Feb 2, 2013

update pod, and then everything is ok

update pod, and then everything is ok

@olivergeorge

This comment has been minimized.

Show comment Hide comment
@olivergeorge

olivergeorge Feb 12, 2013

This is the error I got at the start. The solution seemed to be opening up the xcworkspace rather than the xcodeproj (YMMV)

From the GitHub repo README.md:

Remember to always open the Xcode workspace instead of the project file when you're building.
$ open App.xcworkspace

This is the error I got at the start. The solution seemed to be opening up the xcworkspace rather than the xcodeproj (YMMV)

From the GitHub repo README.md:

Remember to always open the Xcode workspace instead of the project file when you're building.
$ open App.xcworkspace

@fabiopelosin

This comment has been minimized.

Show comment Hide comment
@fabiopelosin

fabiopelosin Feb 23, 2013

Owner

Closing as not actionable. If somebody encounters a bug related to this issue please repot the conditions to reproduce it.

Owner

fabiopelosin commented Feb 23, 2013

Closing as not actionable. If somebody encounters a bug related to this issue please repot the conditions to reproduce it.

@mgchris

This comment has been minimized.

Show comment Hide comment
@mgchris

mgchris Apr 12, 2013

I had an issue were I could build for the simulator but not for my iPad. I was getting this error "library not found for -lPods". I tried the suggestion made here and none of them worked.

This is what my PodFile looked liked.

platform :ios, '6.0'

target :integration, :exclusive => true do
  link_with "Autoship Integration Test"
  pod 'KIF'
end

target :test, :exclusive => true do
  link_with "Usana AutoshipTests"
  pod 'Kiwi'
end

Thinking that maybe my default target needed to link to something I changed my PodFile to this.

platform :ios, '6.0'

pod 'MBProgressHUD', '~> 0.6'

target :integration, :exclusive => true do
  link_with "Autoship Integration Test"
  pod 'KIF'
end

target :test, :exclusive => true do
  link_with "Usana AutoshipTests"
  pod 'Kiwi'
end

Everything now works and I can remove MBProgressHUD from my PodFile and it still works.

mgchris commented Apr 12, 2013

I had an issue were I could build for the simulator but not for my iPad. I was getting this error "library not found for -lPods". I tried the suggestion made here and none of them worked.

This is what my PodFile looked liked.

platform :ios, '6.0'

target :integration, :exclusive => true do
  link_with "Autoship Integration Test"
  pod 'KIF'
end

target :test, :exclusive => true do
  link_with "Usana AutoshipTests"
  pod 'Kiwi'
end

Thinking that maybe my default target needed to link to something I changed my PodFile to this.

platform :ios, '6.0'

pod 'MBProgressHUD', '~> 0.6'

target :integration, :exclusive => true do
  link_with "Autoship Integration Test"
  pod 'KIF'
end

target :test, :exclusive => true do
  link_with "Usana AutoshipTests"
  pod 'Kiwi'
end

Everything now works and I can remove MBProgressHUD from my PodFile and it still works.

@antstorm

This comment has been minimized.

Show comment Hide comment
@antstorm

antstorm Apr 25, 2013

Had the same problem with a newly generated project("Empty Application" template, pod setup/install).

Setting "Preferences -> Locations -> Advanced" to "Custom(Relative to Workspace)" fixed the missing libPods.a.

Had the same problem with a newly generated project("Empty Application" template, pod setup/install).

Setting "Preferences -> Locations -> Advanced" to "Custom(Relative to Workspace)" fixed the missing libPods.a.

@yaakovgamliel

This comment has been minimized.

Show comment Hide comment
@yaakovgamliel

yaakovgamliel Apr 26, 2013

antstorm solution workedt fine also for me.
Thanks 👍

antstorm solution workedt fine also for me.
Thanks 👍

zhf referenced this issue in secreek/inspector May 6, 2013

@stationkeeping

This comment has been minimized.

Show comment Hide comment
@stationkeeping

stationkeeping Jun 13, 2013

+1 For antstorm's fix

+1 For antstorm's fix

@youknowone

This comment has been minimized.

Show comment Hide comment
@youknowone

youknowone Jun 13, 2013

Unfortunately, I should use 'Legacy' for scripts at this time. Maybe I should fix scripts...

Unfortunately, I should use 'Legacy' for scripts at this time. Maybe I should fix scripts...

@anuj-rajput

This comment has been minimized.

Show comment Hide comment
@anuj-rajput

anuj-rajput Jul 2, 2013

antstorm's fix worked very well
Thanks

antstorm's fix worked very well
Thanks

@martinstolz

This comment has been minimized.

Show comment Hide comment
@martinstolz

martinstolz Aug 7, 2013

+1 mgchris

+1 mgchris

jzapater pushed a commit to jzapater/CocoaPods that referenced this issue Sep 17, 2013

Merge pull request #155 from yaakaito/master
New Pod: NLTHTTPStubServer
@Nathan0518

This comment has been minimized.

Show comment Hide comment
@Nathan0518

Nathan0518 Oct 14, 2013

So was I having this annoying problem
I updated my cocoapods version and deleted all related files,podfile.lock,pods folder and .xcworkspace
then run pod installed
Problem fixed
Hope it would help

So was I having this annoying problem
I updated my cocoapods version and deleted all related files,podfile.lock,pods folder and .xcworkspace
then run pod installed
Problem fixed
Hope it would help

@cicerocamargo

This comment has been minimized.

Show comment Hide comment
@cicerocamargo

cicerocamargo Oct 29, 2013

Hi Nathan0518!

I was having the same issue and did the same steps as you: problem not fixed...
What worked for me was setting the value of the key "Build Active Architecture Only" to NO in the Build Settings of the Pods project inside my workspace.

Hope this can help other people too :)

Hi Nathan0518!

I was having the same issue and did the same steps as you: problem not fixed...
What worked for me was setting the value of the key "Build Active Architecture Only" to NO in the Build Settings of the Pods project inside my workspace.

Hope this can help other people too :)

@alloy

This comment has been minimized.

Show comment Hide comment
@alloy

alloy Oct 30, 2013

Owner

What worked for me was setting the value of the key "Build Active Architecture Only" to NO in the Build Settings of the Pods project inside my workspace.

@cicerocamargo While that works too, it is actually the opposite of what we suggest you do. Which is to set your project to "Build Active Architecture Only" to YES in the ‘Debug’ configuration.

This is the Xcode 5 default, which makes sense, as you need to compile less in development mode.

Owner

alloy commented Oct 30, 2013

What worked for me was setting the value of the key "Build Active Architecture Only" to NO in the Build Settings of the Pods project inside my workspace.

@cicerocamargo While that works too, it is actually the opposite of what we suggest you do. Which is to set your project to "Build Active Architecture Only" to YES in the ‘Debug’ configuration.

This is the Xcode 5 default, which makes sense, as you need to compile less in development mode.

@vfxdrummer

This comment has been minimized.

Show comment Hide comment
@vfxdrummer

vfxdrummer Feb 21, 2014

I am having this same exact problem. I have tried all of your suggestion and still cannot figure it out. Does anyone have any suggestions? Thanks

I am having this same exact problem. I have tried all of your suggestion and still cannot figure it out. Does anyone have any suggestions? Thanks

@trungtle

This comment has been minimized.

Show comment Hide comment
@trungtle

trungtle Feb 25, 2014

Having a similar problem also and I have tried the solutions above. I had to do redo 'gem install' on cocoapod because of a merge conflict due to libgit2 also

Having a similar problem also and I have tried the solutions above. I had to do redo 'gem install' on cocoapod because of a merge conflict due to libgit2 also

@markdb314

This comment has been minimized.

Show comment Hide comment
@markdb314

markdb314 Mar 12, 2014

Same problem here. libPods.a appears in red even when I create a new empty project and add any cocoapod. Should be easily reproducible.

Same problem here. libPods.a appears in red even when I create a new empty project and add any cocoapod. Should be easily reproducible.

@cz101

This comment has been minimized.

Show comment Hide comment
@cz101

cz101 Apr 4, 2014

it took me a couple hours to get it right . I didn't have any problems when I was testing on simulator, even the libPods.a is still red. When I loaded it on the real device, I got the error "Library not found for -lPods". I double checked the both targets( my app and pod ) build settings. tried a couple of suggested solutions, didn't work. At the end , I had to remove all the files associated with pod and updated pod , rebuild project, this time the error is gone and file libPods.a color turn it into normal color. I hope this can save some time for you. oh debugging, you got love it : )

cz101 commented Apr 4, 2014

it took me a couple hours to get it right . I didn't have any problems when I was testing on simulator, even the libPods.a is still red. When I loaded it on the real device, I got the error "Library not found for -lPods". I double checked the both targets( my app and pod ) build settings. tried a couple of suggested solutions, didn't work. At the end , I had to remove all the files associated with pod and updated pod , rebuild project, this time the error is gone and file libPods.a color turn it into normal color. I hope this can save some time for you. oh debugging, you got love it : )

@billinghamj

This comment has been minimized.

Show comment Hide comment
@billinghamj

billinghamj Apr 21, 2014

I had this problem while these build settings were in place on my Unity project

9gtag6o

Removing them resolved the issue.

I had this problem while these build settings were in place on my Unity project

9gtag6o

Removing them resolved the issue.

@PlayDevelop

This comment has been minimized.

Show comment Hide comment
@PlayDevelop

PlayDevelop Oct 14, 2014

I had this issue aswell, tried everything what already has been told here. Still had the issue. My problem was that I had an old libPods.a in "Link binary with libraries" , removed it and did a pod install again.

Now working.

I had this issue aswell, tried everything what already has been told here. Still had the issue. My problem was that I had an old libPods.a in "Link binary with libraries" , removed it and did a pod install again.

Now working.

fabiopelosin added a commit that referenced this issue Oct 25, 2014

@mfkp

This comment has been minimized.

Show comment Hide comment
@mfkp

mfkp Oct 31, 2014

Thanks @PlayDevelop, that fixed it for me as well.

mfkp commented Oct 31, 2014

Thanks @PlayDevelop, that fixed it for me as well.

@scottyantipa

This comment has been minimized.

Show comment Hide comment
@scottyantipa

scottyantipa Nov 8, 2014

Solution for me was to remove all pod related files (Pods, Podfile.lock), clean project, remove libPods.a from Build Settings, then run pod install again.

Solution for me was to remove all pod related files (Pods, Podfile.lock), clean project, remove libPods.a from Build Settings, then run pod install again.

@Bintong

This comment has been minimized.

Show comment Hide comment
@Bintong

Bintong Nov 13, 2014

I also had this issue as well removed it and pod install again . ok

Bintong commented Nov 13, 2014

I also had this issue as well removed it and pod install again . ok

@denisysdata

This comment has been minimized.

Show comment Hide comment
@denisysdata

denisysdata Jan 12, 2015

Same problem on cocoapods 0.35.0, in my case, after pod update the file project.pbxproj have lost all VALID_ARCHS and set ONLY_ACTIVE_ARCH to YES.

Same problem on cocoapods 0.35.0, in my case, after pod update the file project.pbxproj have lost all VALID_ARCHS and set ONLY_ACTIVE_ARCH to YES.

@Jeswang

This comment has been minimized.

Show comment Hide comment
@Jeswang

Jeswang Jan 15, 2015

@PlayDevelop Thanks, delete the old libPods.a works for me.

Jeswang commented Jan 15, 2015

@PlayDevelop Thanks, delete the old libPods.a works for me.

@CrabDude

This comment has been minimized.

Show comment Hide comment
@CrabDude

CrabDude Feb 16, 2015

@Jeswang @PlayDevelop YES! Remove libPods.a from "Link Binary With Libraries" in "Build Phases" fixed the issue for me which appeared to crop up almost inexplicably.

@Jeswang @PlayDevelop YES! Remove libPods.a from "Link Binary With Libraries" in "Build Phases" fixed the issue for me which appeared to crop up almost inexplicably.

@russmatney

This comment has been minimized.

Show comment Hide comment
@russmatney

russmatney Feb 22, 2015

Burned a few hours on this today, tried #allthethings that were listed here (lots of removing pods and pod installing. even tried a fresh project from scratch but kept hitting the same missing libPods.a issue. The first symptom that led me to this was trying to import Alamofire in a swift file, but xcode could never find that module.

Solution that finally just worked for me was upgrading to the Beta: gem install cocoapods --pre and then pod install, which seems to move away completely from the libPods.a file to an actual Pods.framework. Restarted the workspace, and all is happy again.

For future ref: current Beta at the time of writing is: 0.36.0.beta.2

Burned a few hours on this today, tried #allthethings that were listed here (lots of removing pods and pod installing. even tried a fresh project from scratch but kept hitting the same missing libPods.a issue. The first symptom that led me to this was trying to import Alamofire in a swift file, but xcode could never find that module.

Solution that finally just worked for me was upgrading to the Beta: gem install cocoapods --pre and then pod install, which seems to move away completely from the libPods.a file to an actual Pods.framework. Restarted the workspace, and all is happy again.

For future ref: current Beta at the time of writing is: 0.36.0.beta.2

@nightwolf-chen

This comment has been minimized.

Show comment Hide comment
@nightwolf-chen

nightwolf-chen Jul 7, 2015

I had same problem. My problem was about "Build Active Architectrure Only" , I set that option to "NO" to solve the problem. Hope this could help anyone with the same problem.

I had same problem. My problem was about "Build Active Architectrure Only" , I set that option to "NO" to solve the problem. Hope this could help anyone with the same problem.

@onmyway133 onmyway133 referenced this issue in onmyway133/notes Jul 15, 2015

Open

Library not found for -lPods #27

@ruseel

This comment has been minimized.

Show comment Hide comment
@cjayst

This comment has been minimized.

Show comment Hide comment
@cjayst

cjayst Sep 18, 2016

@PlayDevelop fixed and worked for me, thanks.

cjayst commented Sep 18, 2016

@PlayDevelop fixed and worked for me, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment