C language in obj-c

2009-04-29 Thread fawad shafi
Dear All, may be this question is odd, but i wana use .obj file created in c language, in objective-c. is it possible?? thanks in advance. Regards, Fawad Shafi _ Rediscover Hotmail®: Now available on your iPhone or BlackBerry

Re: C language in obj-c

2009-04-29 Thread Alastair Houghton
On 29 Apr 2009, at 11:04, fawad shafi wrote: may be this question is odd, but i wana use .obj file created in c language, in objective-c. is it possible?? It depends what you mean. If you're asking if it's possible to use C code in a program that uses ObjC, of course. Usually you'd

Re: C language in obj-c

2009-04-29 Thread Alastair Houghton
On 29 Apr 2009, at 11:25, Alastair Houghton wrote: Kind regards, Alastair. p.s. This type of question is better addressed to xcode-dev. Of course I meant xcode-users :-D Kind regards, Alastair. -- http://alastairs-place.net ___ Cocoa-dev

Re: C language in obj-c

2009-04-29 Thread Jean-Daniel Dupas
Le 29 avr. 09 à 12:04, fawad shafi a écrit : Dear All, may be this question is odd, but i wana use .obj file created in c language, in objective-c. is it possible?? thanks in advance. Obj-C is a superset of C and can access any C code just like you can from any other C file

Re: C language in obj-c

2009-04-29 Thread Alastair Houghton
On 29 Apr 2009, at 11:29, fawad shafi wrote: for example i write one program in c language and then compile it, the compiler will create the one .obj file for us. if i wana use that obj file in xcode or obj-c, is it possible?? The system compiler on Mac OS X doesn't make files with the

RE: C language in obj-c

2009-04-29 Thread fawad shafi
thanks for this useful info. is it possible? existing code that (possibly written in C) that we can easily port over to obj-c with minimum effort. Regards, Fawad Shafi CC: cocoa-dev@lists.apple.com From: alast...@alastairs-place.net To: fawadpaki_...@hotmail.com Subject: Re: C language

Re: C language in obj-c

2009-04-29 Thread Alastair Houghton
On 29 Apr 2009, at 11:35, Jean-Daniel Dupas wrote: Le 29 avr. 09 à 12:25, Alastair Houghton a écrit : Just for the record, with gcc-llvm, you can no longer assume that .o files are Mach-O object files. When you use Link-Time-Optimization (or -O4) with llvm-gcc (or clang), it produces llvm

Re: C language in obj-c

2009-04-29 Thread Jean-Daniel Dupas
Le 29 avr. 09 à 12:25, Alastair Houghton a écrit : On 29 Apr 2009, at 11:04, fawad shafi wrote: may be this question is odd, but i wana use .obj file created in c language, in objective-c. is it possible?? It depends what you mean. If you're asking if it's possible to use C code

Re: C language in obj-c

2009-04-29 Thread Jean-Daniel Dupas
Le 29 avr. 09 à 12:39, Alastair Houghton a écrit : On 29 Apr 2009, at 11:35, Jean-Daniel Dupas wrote: Le 29 avr. 09 à 12:25, Alastair Houghton a écrit : Just for the record, with gcc-llvm, you can no longer assume that .o files are Mach-O object files. When you use Link-Time-Optimization

RE: C language in obj-c

2009-04-29 Thread jmunson
@lists.apple.com From: alast...@alastairs-place.net To: fawadpaki_...@hotmail.com Subject: Re: C language in obj-c Date: Wed, 29 Apr 2009 11:33:54 +0100 On 29 Apr 2009, at 11:29, fawad shafi wrote: for example i write one program in c language and then compile it, the compiler will create the one

[OT] Re: C language in obj-c

2009-04-29 Thread Alastair Houghton
On 29 Apr 2009, at 11:36, fawad shafi wrote: thanks for this useful info. is it possible? existing code that (possibly written in C) that we can easily port over to obj-c with minimum effort. You don't need to port C code to ObjC. ObjC is just C with some simple extensions. Similarly,