Mailing Lists: Apple Mailing Lists

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

Re: translating a build script for JNI for linux to JNI for OS X



On Aug 25, 2008, at 10:57 AM, Stephyn Butcher wrote:

As I understand the issue, the compiler is complaining that there is no "main" method...but it's a library, there isn't a main method. How do I tell the compiler this? I would have thought "-shared" would have been sufficient.

From gcc(1):

-shared
Produce a shared object which can then be linked with other objects to form an executable. Not all systems support this option. For predictable results, you must also specify
the same set of options that were used to generate code (- fpic, -fPIC, or model suboptions) when you specify this option.[1]


           This option is not supported on Mac OS X.

What you need to use is -dynamiclib.

-Jamie

--
Jamison Hope
The PTR Group
www.theptrgroup.com

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

This email sent to email@hidden
References: 
 >translating a build script for JNI for linux to JNI for OS X (From: Stephyn Butcher <email@hidden>)
 >Re: translating a build script for JNI for linux to JNI for OS X (From: Mikael Hakman <email@hidden>)
 >Re: translating a build script for JNI for linux to JNI for OS X (From: Stephyn Butcher <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.