error generate in SonarFramework.h #include "extensions/cocos-ext.h" file not found - iphone

I using the cocos2dx c++ for game devlepoment.Now I want implement sharing in game.I add the sonarcocoshelpercpp folder in class folder and social.framework in framework folder then gnerate the error on sonarFremework.h file that is "extensions/cocos-ext.h" file not found.Any solution for this issue??

You will need to check the Header Search Paths under Build Settings for the build target that is emitting this error, and ensure that the headers list includes all the relevant cocos folders.
If you installed your project using the Cocos Launcher then the first (and for that #include critical) entry should be
/Applications/Cocos/frameworks/cocos2d-x-3.7
(Assuming, from the tags, that this is a XCode on Mac project)

Related

How to include custom library files in Unity build

When I run my Unity app in the editor, it is able to read my .dlls and other custom files the .dlls need and it works fine. However, when I make a build, it only includes the .dll files in the Plugins folder of the build and not the other custom files. Is there a way to force Unity to include the other files as well? I have tried putting them both in the Plugins and Resources folder before building and in both cases it only keeps the .dlls.
The custom files are .obf, but I don't think that's relevant
It is extremely relevant. Unity does not support all type of libraries.
Here are the supported library extensions:
For Windows, you can use .dll.
For Linux, .so is supported.
For Android, you can only use .aar, rar and .so.
For iOS, .a is used but you can also use the non compiled code such as ,.m,.mm,.c and .cpp.
There is no support for .obf. If you want to add it to your project so that you can load and execute it then you are out of luck.
If you just want to make Unity include it to your final project build so that you can read it then you can. This doesn't mean you can load and execute it.
First, rename the extension from ".obf" to ".bytes". Place it in the Resources folder and read it as TextAsset with the Resources.Load function. You can the access the data with TextAsset.bytes.
TextAsset dataAsset = (TextAsset)Resources.Load("YourObfName", typeof(TextAsset));
byte[] data = dataAsset.bytes;
Not sure how helpful just reading it is but this is here to show you how to include it to the build and read it but you can't execute it unless there is a C# API to do so and I don't think that any API of such kind exist.

Why does Unity 5.4 include the contents of Plugins/Android to iOS Project?

I have been working on building a standalone custom unitypackage comprising of combined libraries for both iOS and Android platforms. The folder structure after importing the package in a test project contains two folders inside Assets named IosLibrary and Plugins->Android. The folder IosLibrary contains all the resources and libraries required for iOS build and the content of Android folder consists of resources and libraries used for Android build.
I have tested the integration of our package with Unity 4.7 where everything worked fine; when I build the project for iOS platform, the Xcode project for iOS contains resources/headers/libraries required for iOS build. When I tried creating a test project with same package on 5.4, the Xcode project created by Unity started to include resources in Plugins/Android that results in bunch of build errors as shown below.
Has anyone come across this before ? I would appreciate if someone can point out if there is something I am missing or have done incorrectly.
CopyPNGFile /Users/mithleshkumarjha/Library/Developer/Xcode/DerivedData/Unity-iPhone-bftkjvxwavdurpcavvsvajdqxqcc/Build/Products/Debug-iphoneos/demo.app/hs___star_hollow.png Libraries/Plugins/Android/nester/res/drawable-xxhdpi-v4/hs___star_hollow.png
cd /Users/mithleshkumarjha/Projects/Unity/Unity-Test8/UnityTest8
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer![alt text][1]/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/usr/bin/copypng -compress /Users/mithleshkumarjha/Projects/Unity/Unity-Test8/UnityTest8/Libraries/Plugins/Android/nester/res/drawable-xxhdpi-v4/hs___star_hollow.png /Users/mithleshkumarjha/Library/Developer/Xcode/DerivedData/Unity-iPhone-bftkjvxwavdurpcavvsvajdqxqcc/Build/Products/Debug-iphoneos/demo.app/hs___star_hollow.png
While reading /Users/mithleshkumarjha/Projects/Unity/Unity-Test8/UnityTest8/Libraries/Plugins/Android/nester/res/drawable-xxhdpi-v4/hs___star_hollow.png pngcrush caught libpng error:
[00][00][0\310"\362\277\327`\351\217T\276\353\217
Command /Applications/Xcode.app/Contents/Developer/usr/bin/copypng emitted errors but did not return a nonzero exit code to indicate failure
you may check here: and make sure that all files in Plugins/Android are set to Android here

Cannot include boost libraries in Ogre iPhone SDK version

I installed the Ogre3D iPhone SDK and tried to compile the sample project in XCode4. I ran into "lexical or preprocessor issue" which many people have been experiencing in XCode4. In my case, XCode was not able to fine "OgreCamera.h".
I managed to solve this problem by creating an "Indexing" group folder in my project and dragging the header files into it as suggested in this thread:
Compile, Build or Archive problems with Xcode 4 (and dependencies)
However, I ran into the same issue again in a different form. There are no more errors about "OgreCamera.h", but now I'm getting "'boost/thread/tss.hpp' file not found". I've dragged the boost folder and the individual boost header files into the Indexing group, to no effect.
All my include paths are configured correctly, XCode should be able to find these files based on my build settings.
I don't know what to do. I've searched for solutions to this and failed to find any. My best guess is that the contents of the Indexing group need to be a flat hierarchy with no sub folders, but Ogre references the boost headers files using a file path: "boost/thread/tss.hpp", and this causes problems for some reason. But I don't know how to go about fixing it.
Does anyone have any suggestions?
Thank you.
I had the same problem. I was copying boost into the root of the OgreSDK and then adding the following to my header search paths
$(SRCROOT)/boost
You'll notice the file being included is "boost/thread/tss.hpp". So using the above header search path it would be looking for $(SRCROOT)/boost/boost/thread/tss.hpp.
Assuming you have $SRCROOT/include in your header search paths - the solution is just to move the boost folder to your include directory.
PS... if you don't have a boost folder you'll need to download boost and copy it in there.

How to run phone gap with xcode4?

Since moving to XCode4, I have been getting errors like:
/VERSION: No such file or directory
cp: /javascripts/phonegap..js: No such file or directory
cp: /javascripts/phonegap..min.js: No such file or directory
error: /VERSION: No such file or directory
for projects that were working under XCode3.
Open XCodes Preferences, and navigate to Source Trees. If there is no PhoneGapLib entry there, try adding a new setting with the following values:
Setting Name: PHONEGAPLIB
Display Name: Phone Gap Lib
Path: /Users//Documents/PhoneGapLib
Note that the path should be to the location of your PhoneGapLib folder, and that it may not be in your documents folder, depending on how you installed PhoneGap.
I just learned about a great web service recently made available by Nitobi (makes of PG), which will automatically generate the necessary PhoneGap files you need for use in Xcode 4.
Just enter your project name, hit a button and they'll generate a zip file for you to download. This lets you set up a new project without messing with the command line.
You could set up a new project, then migrate your older project files over.
Did you search Google for this error?
I'm a bit of a noob with PhoneGap and Xcode still, but I know there have been recent issues with PG and Xcode 4. Perhaps you're experiencing the same issues as the commenters to this post: PhoneGap + XCode4 (and more specifically, here).

Xcode can't find my static library!

Here is the linker error:
i686-apple-darwin10-gcc-4.2.1: /Users/william/Documents/SettingsLibrary/build/Debug-iphonesimulator/libSettingsLibrary.a: No such file or directory
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
A couple of weird things, which may be clues to what is going on:
1) In my "library search paths", I have included the recursive path to the library project:
../SettingsLibrary/**
However, SettingsLibrary builds itself to SettingsLibrary/build/Debug/iphoneos/libSettingsLibrary.a
Meanwhile, based on the error message, the linker appears to be looking in:
SettingsLibrary/build/Debug-iphonesimulator/libSettingsLibrary.a
2) I have included the library project in my main project. When I right click under groups and files, there is an option to include the libSettingsLibrary.a file in my target or not. In at least one other library-using project I have looked at, that checkbox is not there for the .a file.
It's difficult to say what the problem is with your project. Can you check the following in the Groups & File view of the main project:
Does the static library project (SettingsLibrary.xcodeproj) appear as a node below your app (the very first node)?
Does the library file (libSettingsLibrary.a) appear just below?
Does the static library (SettingsLibrary (from SettingsLibrary.xcodeproj) ) appear as a node below the main target (at Targets / YourApp)?
Does the library file (libSettingsLibrary.a) appear just below the node Link Binary With Libraries (in the targets section)?
If not, what's missing?
Furthermore, my Library Search Path is empty. If I look at the command line for the linker, it explicitly contains the full path to the static library (SettingsLibrary/build/Debug/iphoneos/libSettingsLibrary.a in your case).
And the checkbox you mention (right-clicking on the static library project within Groups & Files): I have it as well, but it's not checked.