From: Starfish <97917536d AT polyu DOT edu DOT hk> Newsgroups: comp.os.msdos.djgpp Subject: Re: Compiling C++ and objective C source files Date: Sat, 15 Aug 1998 10:38:34 +0800 Organization: The Hong Kong Polytechnic University Lines: 42 Message-ID: <35D4F4AA.4006@polyu.edu.hk> References: <35d474af DOT 0 AT newsread1 DOT dircon DOT co DOT uk> NNTP-Posting-Host: ppp7102.its.polyu.edu.hk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Siddiqui wrote: > 1. How do you compile C++ scource files(Using Rhide and using commands at > the DOS prompt). I usually compile files in DOS prompt. Just type "gcc xxx.cc" or "gxx xxx.c". Read documents in gcc/rhide packages. > 2. Secondly what is objective C and how can I get the compiler to do > these types of files as well? Can I write a program that is both objective > and C++ Objective-C is another program language similar to C, and OO similar to Smalltalk. Default extension of Objective-C programmes in gcc is ".m". Program mixed Objective-C and C++ is called Objective-C++. DJGPP cannot compile it well. > 3. Can I mix C++ and C code? C++ is nearly a superset of C. Or you can .o files which compiled from C and C++. > 4. Are the compilers 100% compatble with code wrtten for other compilers > (eg: Borland + Watcom + etc) Many compilers have their own "add-on" function. You cannot compile programmes which use those functions. But most of them (include gcc) can compile ANSI-C programmes. > 5. Where can I find header files that are commonly supplied with other > compilers, but does not come with djgpp? No, you can't. Copying header files to DJGPP directory only is usually useless, unless you can find their library in .a format. -- Oh! What is this ? char p[]="char p[]=%s%s%s,e[]=%s%s%s%s,q[]=%s%s%s%s;main(){printf(p,q,p,q,q, e,e,q,q,e,q,q);}",e[]="\\",q[]="\"";main(){printf(p,q,p,q,q,e,e,q,q,e,q,q);}