Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

XCode fails to build generic JNI project



I'm using XCode 2.5 and trying to figure out how to call Java methods from a Cocoa app.

I thought step 1 would be to build a trivial JNI project that does the more common opposite
thing, calling C functions from Java, so I fired up XCode, did a New Project, and specified 
a "Java JNI Application".  When the files were created, I tried to build it, and it failed.  The 
complaint is

    /Users/jmc/src/JiniTrivial/build/JiniTrivial.build/Release/JNILib.build/Objects-normal/i386/JiniTrivialjnilib.o reference to undefined _printf

This is the do-nothing, empty app created by XCode.  It looks as though the linker is looking
for a system library that is missing, or is improperly specified, or is in a place the path to which
hasn't been supplied.  

Is this an XCode bug that I can work around, or did something not get installed?  If I write a
trivial C program using a makefile, printf() works fine.

Naturally, I'd rather have trouble doing something that *should* be hard.... 

John Chandler



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.