Compile with *.lib

This is a discussion on Compile with *.lib within the C++ Programming forums, part of the General Programming Boards category; VC++->Project->Settings->Link tab, This method is to add a *.lib file.....(please correct me if I am wrong) then how to add ...

  1. #1
    Registered User
    Join Date
    Jul 2002
    Posts
    85

    Compile with *.lib

    VC++->Project->Settings->Link tab,

    This method is to add a *.lib file.....(please correct me if I am wrong)
    then how to add a *lib file in Dev-C++ and BC++ (Command line)?

  2. #2
    Registered User squireBOB's Avatar
    Join Date
    Dec 2001
    Posts
    6

    Lightbulb Borland CBuilder C++5 - Straight from the help file.

    The linker syntax controls how the linkers work. Linker command-line options are case-sensitive.
    The linkers can also use a configuration file called ILINK32.CFG for options that you'd normally type at the command-line.

    Syntax

    ILINK32 [@respfile][options] startup myobjs, [exe], [mapfile], [libraries], [deffile], [resfile]

    [@respfile] A response file is an ASCII file that lists linker options and file names that you would normally type at the command line. By placing options and files names in a response file, you can save the amount of keystrokes you need to type to link your application.

    [options] Linker options that control how the linker works. For example, options specify whether to produce an .EXE or a DLL file. Linker options must be preceded by either a slash (/) or a hyphen (-).
    startup A Borland initialization module for executables or DLLs that arranges the order of the various segments of the program. Failure to link in the correct initialization module usually results in a long list of error messages telling you that certain identifiers are unresolved, or that no stack has been created.

    myobjs The .OBJ files you want linked. Specify the path if the files aren't in the current directory. (The linker appends an .OBJ extensions if no extension is present.)

    [exe] The name you want given to the executable file ( .EXE, or .DLL). If you don't specify an executable file name, ILINK32 derives the name of the executable by appending .EXE or .DLL to the first object file name listed. (The linker assumes or appends an .EXE extensions for executable files if no extension is present. It also assumes or appends a .DLL extension for dynamic link libraries if no extension is present.)

    [mapfile] Is the name you want given to the map file. If you don't specify a name, the map file name is given the same as exefile (but with the .MAP extension). (The linker appends a .MAP extensions if no extension is present.)

    [libraries] The library files you want included at link time. Do not use commas to separate the libraries listed. If a file is not in the current directory or the search path (see the /L option) then you must include the path in the link statement. (The linker appends a .LIB extension if no extension is present.)

    The order in which you list the libraries is very important; be sure to use the order defined in this list:
    Code Guard libraries (if needed)
    List any of your own user libraries, noting that if a function is defined more than once, the linker uses the first definition encountered
    IMPORT32.LIB (if you’re creating an executable that uses the Windows API)
    Math libraries
    Runtime libraries
    [deffile] The module definition file for a Windows executable. If you don't specify a module definition (.DEF) file and you have used the /Twe or /Twd option, the linker creates an application based on default settings. (The linker appends a .DEF extension if no extension is present.)

    [resfile] A list of .RES files (compiled resource files) to bind to the executable. (The linker appends an .RES extension if no extension is present.)[COLOR=red][libraries] The library files you want included at link time. Do not use commas to separate the libraries listed. If a file is not in the current directory or the search path (see the /L option) then you must include the path in the link statement. (The linker appends a .LIB extension if no extension is present.)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C and C++ compile speed
    By swgh in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 01-02-2007, 01:37 PM
  2. Compile as you type
    By Rocketmagnet in forum A Brief History of Cprogramming.com
    Replies: 33
    Last Post: 12-07-2006, 12:36 PM
  3. How to compile mfc libs from platform sdk
    By tjcbs in forum Windows Programming
    Replies: 6
    Last Post: 11-19-2006, 07:20 AM
  4. Compile crashes certain windows
    By Loduwijk in forum C++ Programming
    Replies: 5
    Last Post: 03-26-2006, 08:05 PM
  5. How can I compile C or C++ with Visual Studio .NET?
    By Dakkon in forum C Programming
    Replies: 8
    Last Post: 02-11-2003, 01:58 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21