home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / alt / msdos / programm / 3196 < prev    next >
Encoding:
Text File  |  1993-01-21  |  1.7 KB  |  43 lines

  1. Newsgroups: alt.msdos.programmer
  2. Path: sparky!uunet!cs.utexas.edu!asuvax!ennews!anasaz!gaf
  3. From: gaf@misty.anasazi.com (Guy Finney)
  4. Subject: C/C++ 7.0 idiotic linking problem (the shame!)
  5. Organization: Anasazi, Inc.  Phoenix, Arizona USA
  6. Date: Thu, 21 Jan 1993 21:26:57 GMT
  7. Message-ID: <1993Jan21.212657.4692@anasazi.com>
  8. Originator: gaf@misty
  9. Sender: usenet@anasazi.com (Usenet News)
  10. Lines: 31
  11.  
  12.  
  13. Okay, so I haven't done any C development on DOS for some years.  My job is
  14. to write C on Unix, and I only recently got the bug for doing Windows
  15. development at home.
  16.  
  17. So I got me the shiny new C/C++ 7.0, installed it per the instructions,
  18. and now find I can't link the simplest program (hello.c):
  19.  
  20.     #include <stdio.h>
  21.     main() {
  22.         printf("Hello world\n");
  23.     }
  24.  
  25. I compile it with the following command.  Yes, I want the large model.
  26.  
  27.     cl /AL /c hello.c
  28.  
  29. Fine, it compiles into hello.obj.  But when I try to link it into hello.exe,
  30. I get the message "Invalid object module" in reference to hello.obj.
  31. Not even one of the Lnnnn message numbers to look up.  Hmmphh.
  32.  
  33. Geez, I'm not a total idiot, but what the heck is this all about?  Am I
  34. missing some secret option to the linker, compiler, or what?  Why isn't
  35. this just as straightforward as it should be?  Any help will be appreciated,
  36. as this is going to be an expensive doorstop without the ability to link
  37. object modules together into a single executable.
  38. -- 
  39. Guy Finney                                   "Ah, this is obviously some
  40. Anasazi, Phoenix AZ                          new usage of the word 'safe'
  41. gaf@anasazi.com  -or-                        I was previously unaware of".
  42. ...!asuvax!anasaz!gaf                            --- Arthur Dent
  43.