# Help with gcc and dylib



## uaimp (Feb 23, 2003)

Hello 

I am trying to create a dynamic library function which creates a JavaVM and makes calls to an API written in Java. I am trying to compile the C program for this and a test harness written in C. 
I get the following errors: 

gcc -bundle -o libcdll.dylib *.c -framework JavaVM -I/System/Library/Frameworks/JavaVM.framework/Headers 

gcc -o TestHarn Testharn.c -L. -lcdll -framework JavaVM 

I get the following error: 

ld: libcdll.dylib is input for dynamic link editor, is not relocatable by the static link editor. 

I am new to MacOS and using version 10.2. Can anyone out there help me.


----------

