Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Sep 7 10:00:08 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id m87H08Li008990 for ; Sun, 7 Sep 2008 10:00:08 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.14.2/8.14.1) with ESMTP id m87GwtLe014196 for ; Sun, 7 Sep 2008 09:58:55 -0700 Message-Id: <200809071658.m87GwtLe014196@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: separate compilation Date: Sun, 07 Sep 2008 09:58:55 -0700 From: Bill Cheng Someone wrote: > I am still a bit confused about this one. I have a server.cpp and a > client.cpp file which does all the work. > From your previous mail I understand that I need to create few more modules. Putting everything in one file is a bad habit! So, I'm asking you to break your source code into different modules on purpose! You can break it anyway you want (even in a silly way). But you must learn to compile each module into corresponding .o file separately. Then, use a separate rule to link all the .o files together to create the executable. Please see the grading guidelines to see how many points you may lose if you don't do all these. I have this requirement for *all* the programming assignments. So, this is the time to learn. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- From: Bill Cheng [mailto:william@bourbon.usc.edu] Sent: Sunday, September 07, 2008 8:12 AM To: cs551@merlot.usc.edu Subject: Re: separate compilation Someone wrote: > For separate compilation how many module we need to make. I have 3 module, > common, client and server. Do I need to break client and server into > separate modules for ADDR, FILESIZE and GET request handler modules? For each executable, you need at least 2 modules. So, it's perfectly fine to link "common.o" and "client.o" to create "client" and to link "common.o" and "server.o" to create "server". -- Bill Cheng // bill.cheng@usc.edu