1

I am trying to create a static library in Xcode using C++ ( All my files are .h or .cpp ).

I tried deleting main.cpp and then adding a target to my project to build a "Static" library. Since I'm not using Cocoa, I assumed that I needed to add a BSD Static Library, but I have tried other static library options with no apparent results. It doesn't build ( doesn't show any errors though, but it's like nothing happened).

In the following picture "Untitled" is my static library.

( as you can see libUntitled.a is red, even after I built the project. )

alt text http://grab.by/2LWZ

2
  • That menu shows only i386 and ppc—no ARM. Perhaps you used the target template from the Mac SDK, not from the iPhone SDK? Commented Mar 2, 2010 at 12:57
  • I first want to build for OSX, then I will try to build for iPhone. Commented Mar 2, 2010 at 13:17

1 Answer 1

2

Are your source files checked against the new target?

Otherwise, open the Build window, unfold the messages pane so you can see what the compiler is actually doing and where it places the .a file (if at all). That might help you to track down what's going on.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.