home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / c / 20158 < prev    next >
Encoding:
Internet Message Format  |  1993-01-24  |  2.3 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!nigel.msen.com!hela.iti.org!ais.org!roofus!empath
  2. Message-ID: <765368d487688t13@roofus.ann-arbor.mi.us>
  3. Date: Sunday, 24 January 1993 01:15:24 EST
  4. X-Mailer: TMail version 1.14R
  5. From: "Tim Triemstra" <empath@ais.org>
  6. Organization: Empath Software
  7. References: <C1BJ1I.8zv@cs.mcgill.ca>
  8. Subject: Re: C and assembly linking problems ! HELP!!
  9. Newsgroups: comp.lang.c
  10. Distribution: world
  11. Lines: 43
  12.  
  13. In <C1BJ1I.8zv@cs.mcgill.ca>, james@cs.mcgill.ca (Luc MIKISZKO)  wrote:
  14.    >        I do exactly this:   tcc l1.c
  15.    >                     tasm l2
  16.    >
  17.    >        Then, no problem, not a single warning or error;
  18.    >
  19.    >        BUT when I link them : tlink l1 l2, exefile
  20.    >
  21.    >        Then I get messages saying that functions such
  22.    >        as "GETCH_", "PRINTF_" are not defined ?!?!?!?
  23.  
  24.  This is probably because you are used to compiling and linking from the
  25.  same command line.  In most compilers (including TurboC etc) you must
  26.  explicitly list the libraries you wish to link when just "tlink"ing or
  27.  using a linker stand-alone from the batch compile command line.
  28.  
  29.  I'm not sure of the filename, but there should be a file in the .lib 
  30.  directory that is pretty big (with a .lib extention) that ends in
  31.  l, s, m or something with respect to a memory model.  An example for large
  32.  memory model would be cl.lib or cm.lib for medium.  Just looking in the 
  33.  lib directory should make it obvious which one to link.  Of course, this
  34.  should be the same with respect to the model you use by default.  I noticed
  35.  you didn't have a -m? switch so you must have the -m switch defined in a
  36.  turboc.cfg file or something like that.
  37.  
  38.  If your environment variables (like SET LIB=C:\TC\LIB) are set right,
  39.  you should just be able to add cl.lib or whatever to the list of answers
  40.  you must respond with to tlink.
  41.  
  42.  Hope this helps.  BTW:  You should probably read up on the command line
  43.  usages.  I personally (as do many programmers) prefer command line usage
  44.  cause you can write your own batch/make files and use your own word 
  45.  processor or editor.  Not to mention less memory....
  46.  
  47.  Good luck.
  48.  Tim.
  49.  
  50.  
  51. -------------------------------------------------------
  52. | When the end comes, there will be two men standing: |
  53. |   Me, and the guy I gotta kill.   - Gosh I'm EVIL   |
  54. ------ Tim Triemstra ------------- empath@ais.org -----
  55.