| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Ken Hawkins wrote:_______________________________________________
| i have a Framework that is in Obj C and i would like to load it into a
| JNI library for calling in java. In XCode i created a JNI target
| application and let it default all the settings. i have:
|
| foo.c now that holds the NON java calls that will be implemented. if i
| include bar.Framework it builds fine. trying to include or import any
| files from my framework however causes a spew of errors with @ tokens
| in files like NSObject.h!!!
|
| ...
|
| In file included from
| /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h: 9,
| from
| /Developer/projects/Rosewoodblues/BroadJam/Software/Frameworks/
| BroadjamCD/build/BroadjamCD.framework/Headers/CDRipper.h:12,
| from MacRipperjnilib.c:10:
| /System/Library/Frameworks/Foundation.framework/Headers/
| NSObjCRuntime.h:56: error: syntax error at '@' token
|
| ...
|
| anyone have a sampling of how you can add existing Frameworks and wrap
| them with JNI calls?
Unsurprisingly, all the standard Cocoa headers (NSWhatever.h) use Objective-C syntax. However, if the compiler thinks it's compiling a vanilla C file, all the Objective-Cisms will cause exactly the problems you're seeing.
Try naming the file "MacRipperjnilib.m" (as opposed to ".c"), to tell the compiler that you're including Objective-C code.
Glen Fisher
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Do not post admin requests to the list. They will be ignored.
| References: | |
| >adding an Existing Framework to a JNI library (From: Ken Hawkins <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
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.