Open GoogleCodeExporter opened 9 years ago
I have the same issue... did you ever find a resolution?
Original comment by dougholu...@gmail.com
on 11 May 2011 at 3:33
Looks like the answer lies in the book... Appendix E says you have to build the
Common project first. This works on XCode 4 and OS 10.6.6. The project
references libCommon.a file
Original comment by dougholu...@gmail.com
on 11 May 2011 at 3:57
Hmm, I couldn't link the libCommon.a to my project for some reason (maybe just
an unfamiliarity with how to link a static lib properly in XCode4?). I ended up
just copying the files from the Common project into the test projects. This
works, but is not very efficient. Is there anything wonky about linking to a
static library in XCode4?
Original comment by angus.fo...@gmail.com
on 11 May 2011 at 5:23
One need to link the library libCommon.a. Steps to link the library varies
from one version of xcode to the other. I currently use XCode 4.0.2. In this
version of xCode, upon highlighting the application, click "Build Phases" tab.
You should see reference to the "Link Binary With Libraries". Expanding the
same, you should get the option of add the additional libraries. Hope this
helps.
Thanks
Original comment by parthasu...@gmail.com
on 11 May 2011 at 9:54
Yeah, that's what I'm trying to do now... and getting this error (after
building Common project and linking via the Build Phases tab):
ld: warning: ignoring file
/Users/angus/XcodeProjects/opengles-book-samples-read-only/iPhone/Common/libComm
on.a, missing required architecture i386 in file.
I'm on 4.0.1, maybe I'll update and see if this is a bug they fixed...
Original comment by angus.fo...@gmail.com
on 13 May 2011 at 8:32
This should work if you build the "Common" project before building the
individual chapter sample.
Original comment by zyang.po...@gmail.com
on 10 Jun 2011 at 10:54
I'm having the same problem reported in comment 5. I build the Common project
first and manually copy the libCommon.a to the library search path of the
Hello_Triangle project. Now the linker reported missing required architecture
i386 in file. I'm using xcode 4.0.2, I saw -arch i386 is specified in the
linker command, but I don't know how to remove it in the project settings and
build phase.
Original comment by angbo...@gmail.com
on 15 Jun 2011 at 8:28
[deleted comment]
I'm able to build the static Common library and linked it with the sample code
by changing the Base SDK of the Common project to iphonesimulator.
Original comment by angbo...@gmail.com
on 18 Jun 2011 at 3:43
I add the common folder to the sample code and it helps for chapter 2 and 8 but
for the rest of the code is not working. Has anybody found a solution?
Original comment by istrateh...@gmail.com
on 22 Jun 2011 at 2:36
I added the libCommon.a to the frameworks via the Build Phase by deleting the
existing file and dragging & dropping the file from the Common project and
everything works fine now.
Original comment by istrateh...@gmail.com
on 22 Jun 2011 at 3:02
To build using XCode 4;
1. create a new workspace (File -> New -> New Workspace)
2. drag and drop the xcode project files into the workspace (e.g.
Hello_Triangle.xcodeproj, Common.xcodeproj etc..) but be careful not to add a
project as a subproject of another project.
3. Compile and run
Hope this helps.
Original comment by 20028...@mail.wit.ie
on 10 Oct 2011 at 9:30
The last post doesn't help (why should it? The hardcoded path is still there).
And after creating the linked path manually, I still have the problem described
in comment 5.
Original comment by ivanschu...@gmail.com
on 3 Sep 2012 at 11:05
Interesting is that you can't find the linked path even running $ grep -r
"iphonesimulator" . from the example's root directory. Probably it's binary!?
In a moment of despair I created a new project and copied all the source files,
also the source files from common and that builds, at least. But I get a black
screen on the simulator. Will check it tomorrow...
Original comment by ivanschu...@gmail.com
on 3 Sep 2012 at 11:59
The problem seems to be that that the sample code depends on the libCommon.a
library being built in the project folder. Recent versions of Xcode hide the
build products deep inside your ~/Library folder by default, and the other
projects can't find the library there.
The fix is to tell Xcode to put the build products for the "Common" project in
the old "legacy" location.
I've tested this with Xcode 4.5.2, and all the sample projects seem to build
fine now.
Here are detailed instructions:
1. Open the "Common" Xcode project.
2. In the Project Navigator pane on the left side of the window, click on the
"Common" project icon.
3. Choose "Project Settings..." from the File menu.
4. Click the "Advanced..." button.
5. Select the "Legacy" build location radio button.
6. Click "Done" and "Done" again to close the dialogs.
7. Choose "Build" from the "Product" menu.
8. Select "iPhone 6.0 Simulator" on the right side of the "Scheme" popup.
7. Choose "Build" from the "Product" menu again. (This builds the simulator
version of the library.)
8. You're done. All projects should build fine now, for device or simulator.
Original comment by jbre...@jera.com
on 19 Jan 2013 at 11:51
Thank you so much.
Original comment by attal.be...@gmail.com
on 20 Jan 2013 at 8:59
Original issue reported on code.google.com by
angus.fo...@gmail.com
on 19 Apr 2011 at 3:34