C Board  

Go Back   C Board > General Programming Boards > C++ Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 07-23-2002, 03:53 PM   #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)?
Kelvin is offline   Reply With Quote
Old 07-23-2002, 06:24 PM   #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.)
squireBOB is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
C and C++ compile speed swgh General Discussions 3 01-02-2007 02:37 PM
Compile as you type Rocketmagnet General Discussions 33 12-07-2006 01:36 PM
How to compile mfc libs from platform sdk tjcbs Windows Programming 6 11-19-2006 08:20 AM
Compile crashes certain windows Loduwijk C++ Programming 5 03-26-2006 09:05 PM
How can I compile C or C++ with Visual Studio .NET? Dakkon C Programming 8 02-11-2003 02:58 PM


All times are GMT -6. The time now is 03:54 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

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