Re: [Dev-C++] implementation .o procedure
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Santiago <sa...@ho...> - 2002-10-14 03:40:27
|
Thanks Elizabeth, Sorry I'm so new with this. I Tried compiling myClass.cpp (implementation of myClass.h) and I don't get the .o file. I only get the .o file when I compile the userCode.cpp and the myClass.cpp together. In other words, do I have to link the implementation to userCode.cpp in order to create the .o file? Santiago ----- Original Message ----- From: "Elizabeth Barham" <sog...@ya...> To: "Santiago" <sa...@ho...> Cc: "dev-cpp-users-list" <dev...@li...> Sent: Sunday, October 13, 2002 11:27 PM Subject: Re: [Dev-C++] implementation .o procedure > "Santiago" <sa...@ho...> writes: > > > All I'd like to know is where to type: > > gcc -c a.c > > gcc -c b.c > > > > in DevC++. > > *You* don't, as it is in the Makefile that Dev-C++ generates (but you > can do it if you want). > > You just add the object file that you want to share to the line that > we spoke of earlier (under Project Options). > > What you do is write your c/c++ code that uses the shared object file, > add the shared object file in that menu thing (under Project Options), > then tell Dev-C++ to compile and link your project. > > NOW, if you want to see how to build an object file by hand, bring up > a MS-DOS shell and cd into the directory that has the a.c file (for > example). Then, add the directory that has gcc in it onto your path > (consult any MS-DOS tutorial on instructions of how to do this), and > *in the MS-DOS shell*, type in "gcc -c a.c" (or whatever your source > file is called). > > *But*, Dev-C++ does this for you when you tell it to compile your > source code, and if you look at your directory after compiling your > code, you shall see the object file just generated. THAT OBJECT FILE > is the one you want to share with your friends and place on that line > in the menu thing under "Project Options". > > Normally, however, one makes a library with the "ar" command or a DLL. > > Elizabeth > |