Thread: TLINK.EXE not working when in command line.

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    22

    TLINK.EXE not working when in command line.

    Greetings

    A friend needs me to make a program for him using Turbo C++ 3.01... well, if I try to compile -some- projects under the DOS IDE it works, but man... a DOS IDE... you get what I mean, so I'm trying with a Windows editor (specifically EditPlus 2) and compiling works, but not linking...

    This is my code
    Code:
    #include <iostream.h>
    
    main()
    {
        cout << "This is a test";
        return 0;
    }
    When compiling, I get... (TCC test)
    Code:
    Turbo C++ Version 3.00 Copyright (c) 1992 Borland International
    test.cpp:
    
            Available memory 4094936
    When linking, I get... (TLINK test)
    Code:
    Turbo Link  Version 5.0 Copyright (c) 1992 Borland International
    Error: Undefined symbol ostream::outstr(const char near*,const char near*) in module TEST.CPP
    Error: Undefined symbol _COUT in module TEST.CPP
    Warning: No stack
    Of course, I'm not dumb, so here's my PATH

    %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\Sy stem32\Wbem;C:\Archivos de programa\Archivos comunes\Autodesk Shared\;C:\Archivos de programa\backburner 2\;C:\Archivos de programa\Archivos comunes\Adobe\AGL;F:\Tc;F:\Tc\Bin;F:\Tc\Include;F: \Tc\Lib

    Where F:\ is the drive where I have TC.

    Now, why it works in the IDE, and not in the command line? and how would I make it work in the command line or in EditPlus 2? anyone have an idea why this doesn't links, and in the DOS IDE does?
    Last edited by DARKGuy; 05-19-2006 at 07:44 PM. Reason: Some gramatical errors.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    > F:\Tc\Include;F: \Tc\Lib
    These are typically stored in different environment variables like INCLUDE and LIB

    You'd have to read the manual to find out what the actual names of these variables are, since they vary from compiler to compiler.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    Quote Originally Posted by DARKGuy
    Turbo C++ Version 3.00 Copyright (c) 1992 Borland International
    Why not just go with a modern compiler? That way you can get help from people who use the same compiler.

  4. #4
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    Specifically, Dev-C++: http://www.bloodshed.net/devcpp.html
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  5. #5
    Registered User
    Join Date
    May 2006
    Posts
    22
    If I would, I wouldn't be asking here, would I?

    Anyways. Salem, that's useful actually I don't think I have the manual around (unless it comes with the installation files?) because my friend who gave it to me just compressed it and sent it >_>... know what those variables are or at least where to find the manual?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Function not working
    By sloopy in forum C Programming
    Replies: 31
    Last Post: 11-12-2005, 08:08 PM
  2. Program Not working Right
    By raven420smoke in forum C++ Programming
    Replies: 2
    Last Post: 09-16-2005, 03:21 AM
  3. Trying to eject D drive using code, but not working... :(
    By snowfrog in forum C++ Programming
    Replies: 3
    Last Post: 05-07-2005, 07:47 PM
  4. x on upper right corner not working
    By caduardo21 in forum Windows Programming
    Replies: 1
    Last Post: 02-20-2005, 08:35 PM
  5. cygwin -> unix , my code not working properly ;(
    By CyC|OpS in forum C Programming
    Replies: 4
    Last Post: 05-18-2002, 04:08 AM