From: "Michael Stewart" Newsgroups: comp.os.msdos.djgpp Subject: Re: When I use RHIDE to build C++ program... Date: Thu, 5 Aug 1999 11:35:34 +0100 Organization: (Posted via) Netcom Internet Ltd. Lines: 61 Message-ID: <7obpf6$cq2$1@taliesin.netcom.net.uk> References: <37a81f73 AT ruby DOT hknet DOT com> <7oa1q1$1ent$1 AT nnrp01 DOT ops DOT uunet DOT co DOT za> NNTP-Posting-Host: hgty.capgemini.co.uk X-Trace: taliesin.netcom.net.uk 933849382 13122 194.42.240.2 (5 Aug 1999 10:36:22 GMT) X-Complaints-To: abuse AT corp DOT netcom DOT net DOT uk NNTP-Posting-Date: 5 Aug 1999 10:36:22 GMT X-Newsreader: Microsoft Outlook Express 4.72.3155.0 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Burger Rule wrote in message <7oa1q1$1ent$1 AT nnrp01 DOT ops DOT uunet DOT co DOT za>... > >Alvin Lau wrote in message >news:37a81f73 AT ruby DOT hknet DOT com... >> When I use RHIDE to build C++ program, it always responds an error message >> "Error: c:/djgpp/bin/ld.exe: cannot open -lstdcx: No such file or >directory >> (ENOENT)" It's explained in the FAQ (section 8.7) and in this HOWTO http://www.delorie.com/howto/rhide/lstdcx-fix.html >> Why ? Anyone know how to build C++ program with RHIDE ?? >> (I have both gcc and gxx in bin directory) Rhide handles this for you providing you have followed the instructions provided in the URL above. >Hi!. > >I have the same problem. >I don't know why it does that, BUT I do know how to bypass it. > >Compile the program in RHIDE. This creates an object file with a ".o" >extension. >From RHIDE, goto FILE then DOS SHELL. >Change to the directory in which the object file is. >Say your program is "test.cpp". >When you compiled it, "test.o" is created. > >To create the executable file, type in: > > gxx -o test.exe test.o > >Say you used the Allegro library with your program, type in: > > gxx -o test.exe test.o -lalleg > >You now can run your program by typing "test". > >SO... > >The syntax goes: > > gxx -o [name of executable file . exe] [name of object file .o] >[library(if any)] > >RHIDE does the same, but it adds a -lstdcx switch for some reason I don't >know. >I am using this until I find out how to solve this "-lstdcx" thing. Follow the above URL :-) -lstdcxx is the C++ library which needs to be linked when you are compiling C++ files. To use gcc you need to provide the library (as Rhide does), but you can use gxx which does that for you.