c++ - Newbie DMC++ question: Linking
- Tod <tk1986be gmail.com> Aug 15 2009
- Bertel Brander <bertel post4.tele.dk> Aug 15 2009
- Walter Bright <newshound1 digitalmars.com> Aug 30 2009
Dear experts, I am still learning c++ and I have chosen dmc because it looks simple enough for me (I don't want to learn how to use a fancy IDE yet). I managed to get into classes and now I am practicing the splitting of files. I have my hello.cpp, which includes a class chocolate.h (that file includes only prototypes), which has its member functions defined in a file called chocolate.cpp. I don't know how to link the three files into one executable. Please give me step-by-step instructions of the most simple way to do it. I noticed the compiler will find chocolate.h when it's in the same folder as hello.cpp but I don't know how to link the chocolate.obj (generated from chocolate.cpp, with a "no start address" warning) with the hello.obj. Thanks!
Aug 15 2009
Tod skrev:Dear experts, I am still learning c++ and I have chosen dmc because it looks simple enough for me (I don't want to learn how to use a fancy IDE yet). I managed to get into classes and now I am practicing the splitting of files. I have my hello.cpp, which includes a class chocolate.h (that file includes only prototypes), which has its member functions defined in a file called chocolate.cpp. I don't know how to link the three files into one executable. Please give me step-by-step instructions of the most simple way to do it. I noticed the compiler will find chocolate.h when it's in the same folder as hello.cpp but I don't know how to link the chocolate.obj (generated from chocolate.cpp, with a "no start address" warning) with the hello.obj.
Have a look at: http://damb.dk/multifile.php
Aug 15 2009
To link a file: dmc file.obj To link multiple files together: dmc file1.obj file2.obj file3.obj
Aug 30 2009









Bertel Brander <bertel post4.tele.dk> 