Adding Chartboost in cocos2dx - ios

I am adding chartboost in cocos2dx project i have downloaded a chartboost wrapper for cocos2dx and when i am adding libraries like QuartzCore, SystemConfiguration, and CoreGraphics frameworks, and weak-link (set as Optional) the AdSupport and StoreKit.
I am getting this error.
ld: library not found for -lcurl clang: error: linker command failed
with exit code 1 (use -v to see invocation)
I havnt done anything just adding libraries and getting this error.
EDIT :
This wrapper i am using
https://github.com/wenbin1989/Chartboost-x

Its not Chartboost problem. Add library search path for libCurl.
Drag this folder to your library search path in Xcode.
cocos2dx/platform/third_party/ios/libraries

which Xcode Vesrion you are using ?
you don't need to add QuartzCore and CoreGraphics , they are by default added.The problem you are getting might not be by adding these frameworks , but by adding Chartboost files in the project.Any ways do one thing
Before adding the frameworks and chartboost files. Note down the contents of Header search path and Link Library search path in a notepad and after adding them again check these paths and see if the already existing paths are changed. Most probably now you will be seeing these paths with in \" \", back slash is escape character here. so either replace these modified paths with the actual one you noted or just remove \" from path. It should work
EDIT: Please let me know which wrapper you are using

Related

How to integrate AdMob with Unity iOS project?

I have faced a problem where my game works fine but when I am trying to make it work with AdMob, it gives me error in Xcode.
The error is
ld: framework not found GoogleMobileAds
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
But my point is that I have imported the GoogleMobileAds framework and all the other frameworks what google developer site said, but it still doesn't work.
and this:
In Xcode select your Target, go to Build Settings, search for Search Paths.
It should give you 3 lists of directories - Header Search Paths, Framework Search Paths and Libary Search paths. In Framework Search Paths Make sure non of the directories have quotation marks "like this" and make sure the directory of your GoogleMobileAds.framework is listed. If not than add it.
If there is no GoogleMobileAds.framework file in your entire project than try to look with Finder (it may still be in the project repository but not linked to the project). If you can't find it than just copy it from Unity project Assets/Plugins/iOS/GoogleStuffDirectoryOrSomething/GoogleMobileAds.framework and paste it in Xcode project using Finder, then from Finder manually drag and drop it in Xcode so that project gets the reference to that file.
Build.
1.You have to drag and drop "GoogleMobileAds.jar" in your Xcode.
2.Then you have to add 2 frameworks(AdSupport,Storekit), and also have to add "GoogleMobileAds" plugin to Build Phase.
For more discriptive steps for integrate AdMob with iOS and Android both, follow the belove link.http://www.theappguruz.com/blog/ads-implementation-in-unity-using-admob

Xcode project/app name with spaces issue - framework not found

Is it possible that Xcode 6.1 doesn't finds my previously imported frameworks because of my 3 word app name? I'm using Parse and never ever had any problems with it. But actually when I open my project in Xcode I got an error that the framework doesn't found, which is absurd because it worked well earlier and I don't removed it. However if I delete the frameworks and add them again everything is fine. Am I doing something wrong or is it an Xcode bug?
ld: warning: directory not found for option '-F/Users/donip/Documents/Fl Travel Guide/Fl'
ld: warning: directory not found for option '-FTravel'
ld: warning: directory not found for option '-FGuide'
ld: framework not found ParseFacebookUtils
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Simply enclose your framework path in double quotes(""). For example:
"$(SRCROOT)/my framework/path"
"directory not found for option '-F/..."
Here '-F/..' shows it's a Framework Error. There could be 2 reasons for this.
Missing escape "\" character.
It seems search paths are broken up on several lines in the Framework Search Path or Library Search Paths. Or having spaces in path. Add the escape "\" character to fix it.
Click on your project (targets)->
Click on Build Settings->
Under Frameworks Search Paths, delete the paths.
I'm sure this is Xcode bug. Since a lot of other developers have problems with
frameworks paths, such as Absolute path issues
I'm sure You will find other issues too in SO.
I have encountered this issues myself too.
Best solution for me just commit working project files, and then
reset/revert new/wrong changes which done by Xcode.
For me, I had to delete (using Terminal):
/Users/xxxxxxx/Library/Developer/Xcode/DerivedData/PROJECT_NAME
Using:
rm -r PROJECT_NAME-xxxxxxxx
If you have multiple projects with the same name in the /DerivedData folder, first try deleting all but the most recent one. If that does not work, try deleting all projects including the most recent.
Just update your library location to such a path which doesn't have any spaces inbetween. For example, instead of :
'-F/Users/donip/Documents/Fl Travel Guide/Fl'
use
'-F/Users/donip/Documents/FlTravelGuide/Fl'
Just change the folder name, available in that path, then make the same change in project settings in Library Search Paths and Header Search Paths, wherever its been referred.
Hope this will resolve your query.

ld: library not found for -lPayPalMobile ios

i am working with xcode 6.1 on paypal integration.
i am getting following error each time when i open the project.
ld: library not found for -lPayPalMobile
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
every time i have to remove library search paths value and remove reference of paypal folder and again import it to project.
what is the problem i don't know please tell me what to do?
Edited
one thing more that if project name is "This is test" then what will be difference?
because i can see in library search paths that in first row "This" is coming in second row only "is" is there and in last (i.e. 3rd row) "test" is there.
Thank you.
Follow Below steps,
(1) Add Static library in Your project bundle.
(2) Add it in "link binary with libraries"
You need to go to your Target -> Build phase -> link binary with libraries.
as attached in below image.
(3) Give proper header search path for your linked library.
i.e. ($PROJECT_DIR)/Your path.
You can also read the steps that given in GitHub link of PayPal,
which give you proper direction.
Feel free to ask if you need more help regarding this.
As #Anuj mentioned this can be a problem related with Library Search Paths. Cocoa Pods sometimes gets a mess when updating it, or installing it again if you have it or not under Source Control.
I solved this problem right now by adding this flag under Library Search Paths:
$(inherited)
Hope it helps you
This is usually Header or Library Search Paths. It's better to use CocoaPods to manage your project dependancies. CocoaPods is the dependency manager for Objective-C projects. It has thousands of libraries and can help you scale your projects elegantly. You can import any static library using simple Podfile and command line.
Once you start using CocoaPods, you won't have to worry about header or library search paths. PayPal also has a spec in the CocoaPods Spec repository.

Linker error compiling PDFKit

I am trying to integrate PSPDFKit for iOS in my project and I have not been yet able to success. After downloading the Demo version, adding the framework to my project, adding all the required libraries and placing
#import <PSPDFKit/PSPDFKit.h>
on the 'prefix' file, I get an linker error:
ld: section __objc_const (address=0x00613EA8, size=4651232504) would make the output executable exceed available address range for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
NOTE: My project uses PSTCollectionView and I have successfully compiled PSPDFKit on a test project (created only for that effect).
I would really appreciate any help. Thanks in advance.
Apparently, you have too many included files in your PCH file.
Try removing some of them, and include those files only where you need them, not globally.
As far as I understand it, this is a bug in Apple's compiler/linker chain. Please file a radar at radar.apple.com with your failing project. A workaround is to use the source code as a subproject instead of the precompiled binary.
As soon as I can get my hands on such a project, I can experiment with the settings to see if there's any workaround. Seems to only happen under very specific combinations with other 3rd party code.

Ho can I use adMob library for iOS without using -all_load linker flag

I'm adding adMob provide by google to my iOS app and I'm stuck on this part of the installation:
Add -all_load under Other Linker Flags in the project build info
If I add that flag, then another third party library breaks giving me the error message:
ld: duplicate symbol _vw_chartype_table_p in /Users/josh/ Projects/app/libs/libvt_universal.a(vw_ctype-3279EF26D0C25F3A.o) and / Users/josh/Projects/app/libs/ libvt_universal.a(vw_ctype-34AB9EC0B46D954C.o) for architecture i386
Is there any way to use the adMob library without using -all_load? For example, I've tried -force_load $(SOURCE_ROOT)/adMob/libGoogleAdMobAds.a
but
ld: file not found: /Users/USERNAME/Desktop/latest/bbbb/APPNAME/adMob/libGoogleAdMobAds.a
The reason Google suggests using -all_load is that they are using categories in their code, and Objective-C libraries with categories are not properly loaded by the llvm linker (well that was the case in 4.3 xcode, not sure about 4.4 with the newer clang).
So, I guess if you are brave you can try to just remove the all_load flag. It should build fine. If the bug is NOT fixed, what will happen is when you run your code, it will crash, since none of the categories the library uses will have been loaded. This might be a good thing to do in any case, as your project should build, and if it does not you can fix those problems first.
What I do suggest you do is use -force_load, which has llvm load the categories in the adMob library (among other things). To use it you MUST have a fully qualified path (ie starts at '/') to the library. Obviously if you use Terminal and run:
ls -l /Users/USERNAME/Desktop/latest/bbbb/APPNAME/adMob/libGoogleAdMobAds.a
its going to fail. So enter the proper path - hard coded - for now to just see if you can get the project to first build, then run. If it does you can later figure out what is the appropriate $(VAR) to use to find it inside your project.

Resources