Re: [Dev-C++] implementation .o procedure
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Elizabeth B. <sog...@ya...> - 2002-10-14 03:27:29
|
"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 |