Desperate for Xcode Help
Desperate for Xcode Help
- Subject: Desperate for Xcode Help
- From: "William C. McCain" <email@hidden>
- Date: Fri, 13 Jan 2006 16:09:04 -0800
I am an experience software developer (more than 30 years as a software
engineer for major companies in Silicon Valley). But I have never used
an "IDE" -- I do all my development from the "Terminal" command line, as
God intended :-).
Now, however, as the sole proprietor of a one-person software
enterprise, I am faced with building a dynamic library (a Java JNI
library to be exact) with Xcode so that I can then build a universal
binary (for the new Intel-based Macs). So, to begin with, I am trying
to use Xcode to re-build my existing PPC-only library (using Xcode 1.5
under Panther). Then I plan to use Xcode 2.2 under Tiger to build the
universal version.
My "project" is EXTREMELY simple. It has two source files, serial.c and
serial.h. My command-line build consists of a compile:
cc -c -I/System/Library/Frameworks/JavaVM.framework/Headers serial.c
... followed by a link:
cc -dynamiclib -o libserial.jnilib serial.o -framework JavaVM -framework
CoreFoundation -framework IOKit
And that's all there is to it! It produces an object file, serial.o,
and a dynamic library, libserial.jnilib.
After a monumental struggle, I have managed to produce an Xcode project
that compiles the correct object file, serial.o. (I started with a "BSD
Dynamic Library" template, as that seemed closest to what I was trying
to do.)
But no matter what I try, the link always fails with the error:
Undefined symbols: _CFDictionarySetValue _CFRelease
_CFStringCreateWithCString _CFStringGetCString _IOIteratorNext
_IOMasterPort _IORegistryEntryCreateCFProperty
_IOServiceGetMatchingServices _IOServiceMatching
___CFStringMakeConstantString _kCFAllocatorDefault
Clearly, it's not finding the system libraries that it needs to resolve
these symbols. This probably involves the three frameworks specified in
my command-line link: JavaVM, CoreFoundation, IOKit.
Xcode will not accept these framework names in the "Build Options"
unless I expand them into full paths (e.g.
/System/Library/Frameworks/JavaVM.framework). But even so, I still get
the "Undefined symbols" error message. I've tried putting these paths
in the "Library Search Paths" build option and in the "Frameworks Paths"
build option (and also in BOTH options). Nothing works. I am "tearing
my hair out"!
Can somebody PLEASE tell me what I am doing wrong?
Bill
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden