Re: integrate c code in cocoa(compile problem)
Re: integrate c code in cocoa(compile problem)
- Subject: Re: integrate c code in cocoa(compile problem)
- From: Manfred Bergmann <email@hidden>
- Date: Tue, 25 Oct 2005 11:50:02 +1000
Am 25.10.2005 um 11:27 schrieb honglei:
hi there:
I am trying to figure our how to run PDFLIB in my cocoa
application. Since cocoa is compatible with c code, I put some
PDFLIB sample code into my cocoa app.
When I am compile and execute my application, I got the message
"exited due to signal 6".
I am not quite familiar with cc compiler, I compile my hello.c file
with command
"cc -I./include -L./lib hello.c -lpdf -lm -framework Carbon -o
hello"
Do you have a Carbon or a Cocoa project. You are linking against the
Carbon Framework, don't you?
I guess the include and library path (-I and -L) are set wrong.
Standard Include and Library paths are /usr/include and /usr/lib.
If the pdflib is somewhere else, not in the standard path, add that
path with -L<pathToPDFLib>.
"-lpdf" and "-lm" means link against libpdf.a (or libpdf.dylib) and
against libm.a (or liba.dylib).
dylib is normaly used on Darwin Systems. So you do not spell out the
complete library name, the linker add the "lib" and the extension for
you.
He searches in all driectories specified with -L.
so long,
Manfred
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden