[Ves] Apple Mach-O Linker Errors when building Kiwiviewer on Xcode 6.1.1
Cameron Lowell Palmer
cameron.palmer at ntnu.no
Tue Mar 3 02:36:02 EST 2015
In general, for iOS, you set Build Active Architecture Only to Yes on Debug, No on Release.
Could you find the VTK library and run
lipo -info <name of your VTK library>.a
This will tell you which architectures are contained within the file. Also the ‘file' command can do the job. You should see armv7 armv7s and i386. I think, there were two folders at one time, iOS-simulator and iOS-device, I rolled them into a fat binary, so you might have to figure out where the files ended up.
Notes: Lack of 64-bit support has the practical implication that you’ll never put this project into the app store.
Have you considered a different framework or is VTK a hard requirement? If I were starting from scratch today, and you want to manipulate objects in a 3D environment without directly interfacing with OpenGL, I would likely invest time in a stable and better supported framework like SceneKit unless I had a specific need for the scientific features of VTK. Final note, VES is no longer being developed and is being moved to VTK, but that support is still unstable.
On 3. mar. 2015, at 02.21, Michael Christie <sujayc at hotmail.com<mailto:sujayc at hotmail.com>> wrote:
I can't run it on my iPad because I haven't yet enrolled in the Apple iOS Developer program ($99 a year). For now, is it possible I can make it work on the simulator instead?
Also, I wanted to mention that if I set "Build Active Architecture Only" to "No" I get 126 errors. All Linker errors. Is that normal?
Thank you very much for your help.
________________________________
From: cameron.palmer at ntnu.no<mailto:cameron.palmer at ntnu.no>
To: sujayc at hotmail.com<mailto:sujayc at hotmail.com>
CC: ves at public.kitware.com<mailto:ves at public.kitware.com>
Subject: Re: [Ves] Apple Mach-O Linker Errors when building Kiwiviewer on Xcode 6.1.1
Date: Sun, 1 Mar 2015 21:04:58 +0000
That is correct, by default Xcode will now insist on compiling for all architectures unless you explicitly prevent it using that variable. Are you trying to run on the device or the simulator? Try running on the iPhone/iPad not in the simulator.
cameron.
On 1. mar. 2015, at 16.34, Michael Christie <sujayc at hotmail.com<mailto:sujayc at hotmail.com>> wrote:
Cameron,
Thank you for the response. I didn't have $(ARCHS_STANDARD_32_BIT) as an option under "Architectures" so I typed it in. Now I get only one error when I build:
No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=i386).
Mike
________________________________
From: cameron.palmer at ntnu.no<mailto:cameron.palmer at ntnu.no>
To: sujayc at hotmail.com<mailto:sujayc at hotmail.com>
CC: ves at public.kitware.com<mailto:ves at public.kitware.com>
Subject: Re: [Ves] Apple Mach-O Linker Errors when building Kiwiviewer on Xcode 6.1.1
Date: Sun, 1 Mar 2015 07:42:02 +0000
Try it without 64-bit.
Architectures $(ARCHS_STANDARD_32_BIT)
Valid architectures armv7 armv7s
On 1. mar. 2015, at 04.15, Michael Christie <sujayc at hotmail.com<mailto:sujayc at hotmail.com>> wrote:
Hello,
I'm a novice programmer who was hoping to build Kiwiviewer on my mac with Yosemite OS 10.10.
I followed the directions posted by Harish on this webpage:
http://public.kitware.com/pipermail/ves/2014-November/002976.html
and from that I was able to do get through the steps described on the /Apps/iOS readme (I was previously having problems doing make -j4).
The problem is when i open up the Xcodeproject of KiwiSimple and KiwiViewer. This was actually my first time opening Xcode and using it. This is Xcode 6.1.1. Anyways, I try to build it and i get 4 errors and 2 warnings, copied below:
ld: warning: ignoring file ../frameworks/vtk.framework/vtk, missing required architecture x86_64 in file ../frameworks/vtk.framework/vtk (3 slices)
ld: warning: ignoring file ../frameworks/kiwi.framework/kiwi, missing required architecture x86_64 in file ../frameworks/kiwi.framework/kiwi (3 slices)
Undefined symbols for architecture x86_64:
"vesKiwiBaseApp::render()", referenced from:
-[MyGLKViewController glkView:drawInRect:] in MyGLKViewController.o
"vesKiwiViewerApp::loadDataset(std::string const&)", referenced from:
-[MyGLKViewController initializeKiwiApp] in MyGLKViewController.o
"vesKiwiViewerApp::vesKiwiViewerApp()", referenced from:
-[MyGLKViewController initializeKiwiApp] in MyGLKViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Under Build Settings of the KiwiSimple target, I have "Architectures" set to "Standard architectures (armv7, arm64) ...."
The "Base SDK" is iOS 8.1, I enabled "Build Active Architecture Only" and my "Valid Architectures" are "armv7 arm64"
To the side under the Frameworks folder, I have libbz2.dylib, libxml2.dylib, libz.dylib, vtk.framework and its headers, kiwi.framework and its headers, OpenGLES.framework, GLKit.framework, UIKit.framework, Foundation.framework, and CoreGraphics.framework. Nothing in these are colored red.
The only thing that is red for me is the Product itself, KiwiSimple.app.
I'll gladly provide any other information. Please tell me what could be going wrong. This is the first time I ever used CMake and Xcode. I could have easily forgotten to do something along the way, especially something that was not in the directions I mentioned above.
Thank you!
Mike
_______________________________________________
Ves mailing list
Ves at public.kitware.com<mailto:Ves at public.kitware.com>
http://public.kitware.com/mailman/listinfo/ves
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ves/attachments/20150303/a2625dc4/attachment-0001.html>
More information about the Ves
mailing list