From: dmt AT bigfoot DOT com (Jeff W./DMT) Newsgroups: comp.os.msdos.djgpp Subject: Linking an object file in RHIDE/with GCC Date: Sun, 29 Mar 1998 00:04:35 GMT Organization: ZipLink -- America's Hottest ISP Lines: 27 Message-ID: <351d8edd.107493@news.ziplink.net> NNTP-Posting-Host: chi-ip-1-98.ziplink.net To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk I have one example file that was written in C and came with instructions on how to compile it with the included object file to produce an executable file. That worked fine. I wrote a very basic C++ file, and at the command line tried doing the same thing to link my program with the same object file: gcc myfile.cc -O2 -o myfile.exe -lalleg objfile.o and for some reason gcc complains that it can't find the functions which are defined in the .O file. Yes, I included the .O file's header file in my main program. How would I compile my program so that it links with the .O file? And, how can I do this in RHIDE? I tried adding -l objfile.o to the linker options, but that didn't work. And lastly, I do have the source to the .o file (written in C). I compiled it so that it was a .A library file. When re-compiling the example file, in the Libraries options I added the library name. In RHIDE, the example compiled fine. But, in my program, I got the same error (Can't find function ...). --Jeff W. "The finding of DMT in normal human body fluids opens up interesting moral and legal questions. Since DMT is illegal, as is 'any substance, compound or mixture' containing DMT, it would seem that we are all guilty of possesion of a controlled substance" -Jonathon Ott My weird, trippy page: http://www.geocities.com/SunsetStrip/Alley/3450/index.html