Compiling error using llvm clang in iOS (on device,jailbreaken) - ios

how can I fix this error?:
http://i.stack.imgur.com/zmZea.jpg
I got this error when compiling a simple c++ file but I don't know why
When I compile this file with iOS 6.1 sdk it works but I want it to work in iOS sdk 8.1
My iPad:ipad 3 wifi
My iOS version:8.4

It shouldn't be problem with the architecture. As far as I know Apple hasn't changed Armv7. From what I see, its a linker error, probably caused by libraries not being linked in correctly. Pretty clear when it says: ignoring nonexistent library. This type of error could occur if you import a header and fail to link it against the correct library OR if you just straight up include a header for the wrong architecture -_-.
So thats the diagnosis. I guess the rest of the hacking is up to you since no one here has any clue what you have done to the poor iPad.

Related

How to upgrade application for 64 bit support for ZBarSDK

I have developed an application using ZBarSDK for Barcode. It is working fine with 32 bit support, but while I am going to upgrade it to 64 bit, it is giving linker error. Is there any tutorial or way to find out the solution ? Below are the warnings, with linker error.
duplicate symbol in:
projectpath/arm64/main.o
projectpath/arm64/AppDelegate.o
duplicate symbol in:
projectpath/arm64/main.o
projectpath/arm64/ViewController.o
etc...
This kind of warnings and linker error is there for every controller. I konw, this kind of warning comes when there are similar named class are twice or more time in source code, but if I remove 64 bit it is working fine. How to get rid of this kind of linker error.
I'm not sure about the command to merge two or more libraries, I have tried for simulator and device library. After failure, my Sr. helped me and created this attached library.
This SDK I have used before 2 years to support 64bit in my application and was working fine. Not sure about any new changes made by ZBARSDK Team
I have uploaded my SDK at https://www.dropbox.com/sh/zhbqsa0heuputlk/AAC1kDkJBxgybtwi7lnmZ9lra?dl=0
You can try this sdk.
Thanks

Xamarain iOS - Binding a library that only has ARMv7 architecture - what will be my issues?

I'm creating a binding for a library that I do not have access to the source for. It was built only for ARMv7.
First issue:
It will not work in the simulator - this is obvious, but the problem is that if I compile and run to the simulator Xamarin will break at that code and stop the simulator. Plus it crashes. Did I do something wrong with the binding or is this the way it is and I have to put in a conditional to ignore the commands? We're trying to turn the library into a binding for general use. So it would be nice if somehow I could put this condition in the binding DLL.
Second issue:
I'm concerned this library will not work on 64-bit architecture via Xamarin since it is only compiled with ARMv7. Can anyone confirm or refute this? The library works with 64-bit builds as we have used it before with other app engines.
Thanks so much for your time!
Someone correct me if I'm wrong but I think that Apple will no longer let you submit an app if it doesn't support 64 bit. I've always included 64bit binaries when submitting so I can't be certain.

Sudden Warning on XCode 5.1

I suddenly started getting this error after upgrading my Xcode 5.0.2 to Xcode 5.1
warning: ignoring debug info with an invalid version (0)
There are like 22 of these warnings coming up when compiling my code...
I haven't encountered anything like this beforeā€¦ Please can anyone help.. thanks in advance..
In XCode target BuildSettings, search DEAD_CODE_STRIPPING and set Value to NO.
This is a bug with LTO and -dead_strip. The workaround is to stop using one of them.
way Link Time Optimization (LTO) works is that the compiler stops half way through and emits the .o file as "bit code" (the internal clang IR) instead of compiling down to mach-o. This is drive by the -flto compiler option. When the linker encounters bit-code .o files, it loads up the back end of clang (libLTO.dylib) and merges/compiles all the bit-code files into mach-o then completes the link.
The Link
Check files that are related to warnings. If will be probably a third party library. Try to recompile that lib with new Xcode.

NEON assembly fail to build for iOS in Xcode 4.3.2

I have a code base which compiles fine in all other NEON compilers, ndk-build, RVDS, etc, but under Xcode I get the error "bad instruction" for every NEON instruction I call. It basically seems like NEON is not detected.
I am attempting to build a static library, I went to New Project, selected Cocoa Touch Static Library, then added my existing files.
Everything I'm reading indicates that NEON should be already enabled. I removed all references to armv6, and am targeting iOS 5.1
Also the code in question is all contained as routines defined in ".s" files -- pure assembly. I am not using the intrinsics method calls.
It seems like the compiler is barfing on the whole file...
Unknown pseudo-op: .cpu
It lists all of the other settings, like .fpu, etc
Here are my current settings:
(source: wasteonline.net)
(source: wasteonline.net)
(source: wasteonline.net)
After the as tool I mentioned in my last answer turned out to be choking on my syntax as well, I realized there must be something else going on.
I followed the guidelines on the bottom of this post http://www.shervinemami.info/armAssembly.html#template
The changes I needed to make were:
converted my instructions to all lower case
use the naming directives to be compatible with mach-o (solved linker problems)
Try to use GCC4.2. I solved a very similar problem switching to the old, good GCC.
In Build Settings -> Compiler for C/C++/Objective-C, select GCC
Actually, if you check the LLVM ARM status page, you'll see that it cannot yet parse .S files.

Flex ANE, iOS and ARC

Good day
I have created a static library with Xcode. Then I compiled my ANE using adobe's ADT tool. Thereafter I've included the ANE in my FlashBuilder project. However, when attempting to package my project, I get the following error:
"Error occurred while packaging the application:
Undefined Symbols: "_obj_storeStrong", referenced from ...
.
"_obj_release", referenced from ...
.
"
My guess is that ARC is probably not supported for ANE's. I'm guessing that this is probably due to the fact that FlashBuilder is recompiling the entire AIR + the native libs into one iOS application, probably using their own compiler or something (which is why Air apps for iOS can be compiled on windows platforms as well), and this compiler is probably not 4.3 ready yet?
I have attempted adding the flag -fobjc-arc to my ios-platformoptions.xml as well (where this file is the parameter to the -platformoptions flag of adt), but still no joy. It results once again in an error when packaging. Perhaps any other flag I can try to use here?
Any corrections, suggestions, alternative ideas or comments will be most welcome. I am very new to Xcode, Objective C and ANE, so please excuse any incorrect statements or assumptions, and please correct me on these.
I would be glad if somebody can please confirm weather I am correct with my assumption that I cannot use ARC at this stage on ANE's.
Thanks
Christo
START EDIT:
Very late update, sorry.
You might be able to use ARC after all. There is a library called arc lite that I forgot to mention and it works. I created an ANE for MapKit on iOS targeting the 5.0.x SDK. When I tried to move to a device that only had 4.3.x ( could have been 4.3.3 or 4.3.5 ) the app crashed or would not compile. I found information on the arc lite library that is included in the newer sdks, followed the instructions on how to include this library and pow! A working ANE on a 4.3.x device without rewriting my code!
Hope all of this helps and half of my original comment :)
Markus
END EDIT
I don't think ARC is supported just yet. There isn't much to go on in terms of settings or examples of what the settings should be in Xcode. Take a look at any of the Xcode ANE projects you can get your hands on. You will see that most or all of the projects have:
Object-C Automatice Reference counting = NO
Objective-C++ Automatic Reference counting = NO
Take a look at the following:
Vibration ANE - On Adobe Devnet site
Liquid Photo - http://www.liquid-photo.com/2011/10/30/common-native-extension-issues/
Liquid Photo - http://www.liquid-photo.com/2011/10/28/native-extension-for-adobe-air-and-ios-101/
There are a lot of examples in Github but you have to find them via Google. Pull down the Xcode ANE projects and compare the settings.
Hope this helps!!!
Markus

Resources