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: Compilation Errors...... Classpath??



sam aspin wrote:

sam-aspins-mac-mini:~/Jan06/com2 samaspin$ cc -bundle -o libHello.jnilib
-framework JavaVM \
-I/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/ Headers \ .
Hello.c


powerpc-apple-darwin8-gcc-4.0.0:
-I/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/ Headers: No
such file or directory
powerpc-apple-darwin8-gcc-4.0.0: .: No such file or directory
Hello.c:4:17: error: jni.h: No such file or directory
In file included from Hello.c:6:

I think there is something wrong with your command line. If I try to specify a non-existent directory for headers, it is silently ignored:

  cc -I/foo/bar/baz realfile.c

The fact you are seeing a diagnostic suggests that the command line is
not being parsed properly by GCC. Of particular interest is that GCC
is reporting that the name it is looking for begins with "-I", which
pretty much confirms that the command line did not parse right. If it
had parsed the -I directive properly, it would have reported that
"/System/Library/Frameworks/..." did not exist. Since the -I was not
parsed, there is no way it could find jni.h.

The "." on the command line is also suspicious. If you look closely
at the error output, you'll notice that there are TWO spaces between
"powerpc-apple-darwin8-gcc-4.0.0:" and ".", so it is reporting that
the file or directory " ." cannot be found. If it had taken just the
dot, it would have matched the current working directory. I think
that the backslashes you have inserted into the command line are
causing the troubles. If they are being copied from the text, they
were probably only put in in the first place to escape a RETURN.

Could there be an extra space in the "-I..." entry too? The way the
mailer line-wrapped your original text I cannot tell if that is the
case or not. In fooling around with GCC, having an escaped space in
front of the -I is the only way I could get it to give me that same
error message.

_______________________________________________
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


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.