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