🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #4404

Re: How do you command-line compile in TC++?

#4404
From: rdw2030
Date: Tue, 29 Jan 1991 02:34
41 lines
2158 bytes
In article <1991Jan28.214552.25542@d.cs.okstate.edu>, ong@d.cs.okstate.edu (ONG ENG TENG) writes...
>I am attempting to use the command-line compile in TC++.  I went thru 
>the manuals twice, tried all kinds of options (including -I and
>-L), but still I get "undefined symbols" during link time for 
>instructions like "setcolor", "kbhit", etc.  If I compile it
>inside the IDE, it works fine.  What am I doing wrong?
> 
>Thanks in advance.
> 
>E. Teng Ong (ong@d.cs.okstate.edu) 

Well, the only thing I can figure is that when you use the -I and -L options,
you may not be including the entire path to the appropriate directories.

If you want to be REALLY sure you get them right, you need to enter the
whole thing.  I usually use the IDE, but do experiment with TCC sometimes.
I enter:

           tcc -Id:\lang\tc\include -Ld:\lang\tc\lib foo.c

Now you know why MAKE is so nice!

Another problem you could be having is not linking in the right libraries
when you link.  If you are using the small model, you need some crap like

           link foo.obj+d:\lang\tc\lib\c0s.lib+d:\lang\tc\lib\graphics.lib /
                       +d:\lang\tc\lib\cs.obj

and so on and so forth.  I noticed you mentioned setcolor.  Make sure you
link in the graphics library!  

I told you all this from memory, so there are holes.  But experiment, and by
all means KEEP LOOKING AT THE MANUALS.  Even with the manuals, it takes time
to fully understand it all!

Me... I just use the IDE!  :-)

Mark C. "Bro!" Lowe - KB5III

PS- And by all means... LEARN HOW TO USE MAKE!!  It's a MUST so you don't have
    keep typing all those LONG lines!
Technical Details
Message-ID: <11577@helios.TAMU.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!helios!venus.tamu.edu!rdw2030
References: <1991Jan28.214552.25542@d.cs.okstate.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!helios!venus.tamu.edu!rdw2030
From: rdw2030@venus.tamu.edu
Newsgroups: comp.os.msdos.programmer
Subject: Re: How do you command-line compile in TC++?
Message-ID: <11577@helios.TAMU.EDU>
Date: 29 Jan 91 02:34:59 GMT
References: <1991Jan28.214552.25542@d.cs.okstate.edu>
Sender: usenet@helios.TAMU.EDU
Reply-To: rdw2030@venus.tamu.edu
Organization: Texas A&M University
Lines: 41
News-Software: VAX/VMS VNEWS 1.3-4