MPLAB ? C32 C Compiler User’s Guide
1.8.9
Options for Linking
If any of the options -c , -S or -E are used, the linker is not run and object file names
should not be used as arguments.
TABLE 1-13:
Option
-L dir
-l library
LINKING OPTIONS
Definition
Add directory dir to the list of directories to be searched for libraries
specified by the command line option -l .
Search the library named library when linking.
The linker searches a standard list of directories for the library, which is
actually a file named lib library .a . The linker then uses this file as if
it had been specified precisely by name.
It makes a difference where in the command you write this option. The
linker processes libraries and object files in the order they are specified.
Thus, foo.o -lz bar.o searches library z after file foo.o but before
bar.o . If bar.o refers to functions in libz.a , those functions may not
be loaded.
The directories searched include several standard system directories,
plus any that you specify with -L .
Normally the files found this way are library files (archive files whose
members are object files). The linker handles an archive file by scanning
through it for members which define symbols that have so far been
referenced but not defined. But if the file that is found is an ordinary
object file, it is linked in the usual fashion. The only difference between
using an -l option (e.g., -lmylib ) and specifying a file name (e.g.,
libmylib.a ) is that -l searches several directories, as specified.
By default the linker is directed to search:
<install-path>\lib
for libraries specified with the -l option. For a compiler installed into the
default location, this would be:
c:\Program Files\Microchip\MPLAB C32\lib
This behavior can be overridden using the environment variables.
-nodefaultlibs
-nostdlib
-s
-u symbol
-Wl, option
Do not use the standard system libraries when linking. Only the libraries
you specify are passed to the linker. The compiler may generate calls to
memcmp , memset and memcpy . These entries are usually resolved by
entries in the standard compiler libraries. These entry points should be
supplied through some other mechanism when this option is specified.
Do not use the standard system startup files or libraries when linking. No
startup files and only the libraries you specify are passed to the linker.
The compiler may generate calls to memcmp , memset and memcpy .
These entries are usually resolved by entries in standard compiler
libraries. These entry points should be supplied through some other
mechanism when this option is specified.
Remove all symbol table and relocation information from the
executable.
Pretend symbol is undefined to force linking of library modules to
define the symbol. It is legitimate to use -u multiple times with different
symbols to force loading of additional library modules.
Pass option as an option to the linker. If option contains commas, it
is split into multiple options at the commas.
-Xlinker option Pass option as an option to the linker. You can use this to supply
system-specific linker options that MPLAB C32 C compiler does not
know how to recognize.
DS51686A-page 36
? 2007 Microchip Technology Inc.
相关PDF资料
SW300003-EVAL LIBRARY SOFT MODEM-EVAL ONLY
SW300010-EVAL SPEECH RECOG LIBRARY-EVAL ONLY
SW300040-EVAL LIBRARY NOISE SUPPR-EVAL ONLY
SW300060-EVAL LIBRARY ACOUSTIC ECHO-EVAL ONLY
SW300070-EVAL SOFTWARE LIBR ENC/DEC EVAL ONLY
SW500012 HI-TECH C PRO FOR PIC32
SY87701LHI-EVAL BOARD EVAL SY87701 EXPERIMENT
SY87729LHI-EVAL BOARD EVAL N SY87729 EXPERIMENT
相关代理商/技术参数
SW006021-1 制造商:Microchip Technology 功能描述:MPLAB XC8 STANDARD COMPILER 制造商:Microchip Technology Inc 功能描述:COMPILER MPLAB XC8 STD 制造商:Microchip Technology Inc 功能描述:COMPILER MPLAB XC8 STANDARD 制造商:Microchip Technology Inc 功能描述:COMPILER, MPLAB XC8, STANDARD 制造商:Microchip Technology Inc 功能描述:MPLAB XC8 ANSI C Compiler for the PIC10 (12),(16),(18) (Workstation License) 制造商:Microchip Technology Inc 功能描述:MPLAB XC8 Standard Compiler 制造商:Microchip Technology Inc 功能描述:OPTOCOUPLERS; Core Architecture:PIC; Software Edition:Standard
SW006021-1N 制造商:Microchip Technology 功能描述:MPLAB XC8 STANDARD COMPILER (F 制造商:Microchip Technology Inc 功能描述:MPLAB XC8 STANDARD COMPILER (FLOATING LICENSE) - Boxed Product (Development Kits) 制造商:Microchip Technology Inc 功能描述:COMPILER MPLAB XC8 STD FLOAT LIC 制造商:Microchip Technology Inc 功能描述:MPLAB XC8 Standard Compiler (Fltng Lic)
SW006021-2 制造商:Microchip Technology 功能描述:MPLAB XC8 PRO COMPILER WORKSTATION LICENSE 制造商:Microchip Technology Inc 功能描述:MPLAB XC8 PRO COMPILER - Boxed Product (Development Kits) 制造商:Microchip Technology Inc 功能描述:COMPILER MPLAB XC8 PRO 制造商:Microchip Technology Inc 功能描述:COMPILER, MPLAB XC8, PRO 制造商:Microchip Technology Inc 功能描述:MPLAB XC8 ANSI PRO Compiler for the PIC10 (12),(16),(18) (Workstation License) 制造商:Microchip Technology Inc 功能描述:MPLAB XC8 PRO Compiler 制造商:Microchip Technology Inc 功能描述:SOFTWARE TOOL, MPLAB XC8 PRO COMPILER; Core Architecture:PIC; Supported Families:PIC10, PIC16, PIC18; Software Edition:Linux; License Type:Floating - node; No. of User Licenses:1; Supported Hosts:-
SW006021-2C 制造商:Microchip Technology Inc 功能描述:COMPILER MPLAB XC8 PRO CHI
SW006021-2N 功能描述:开发软件 MPLAB XC8 PRO Compiler (Fltng Lic) RoHS:否 制造商:Atollic Inc. 产品:Compilers/Debuggers 用于:ARM7, ARM9, Cortex-A, Cortex-M, Cortex-R Processors
SW006022-1 制造商:Microchip Technology 功能描述:MPLAB XC16 STANDARD COMPILER 制造商:Microchip Technology Inc 功能描述:MPLAB XC16 STANDARD COMPILER - Boxed Product (Development Kits) 制造商:Microchip Technology Inc 功能描述:COMPILER MPLAB XC16 STD 制造商:Microchip Technology Inc 功能描述:COMPILER MPLAB XC16 STANDARD 制造商:Microchip Technology Inc 功能描述:COMPILER, MPLAB XC16, STANDARD 制造商:Microchip Technology Inc 功能描述:MPLAB XC16 Standard Compiler (Workstation License) 制造商:Microchip Technology Inc 功能描述:OPTOCOUPLERS; Core Architecture:PIC, dsPIC; Software Edition:Standard
SW006022-1N 制造商:Microchip Technology 功能描述:MPLAB XC16 STANDARD COMPILER ( 制造商:Microchip Technology Inc 功能描述:MPLAB XC16 STANDARD COMPILER (FLOATING LICENSE) - Boxed Product (Development Kits) 制造商:Microchip Technology Inc 功能描述:COMPILER MPLAB XC16 FLOAT LIC 制造商:Microchip Technology Inc 功能描述:MPLAB XC16 Standard Compiler (Fltng Lic)
SW006022-2 功能描述:开发软件 MPLAB XC16 PRO Compiler RoHS:否 制造商:Microchip Technology 产品: 用于: