Difference between revisions of "FAQ:Compiling 01"
(Move FAQ text to a template page) |
|||
Line 1: | Line 1: | ||
= How do I compile with 'cc' instead of 'gcc'? = | = How do I compile with 'cc' instead of 'gcc'? = | ||
− | + | {{FAQ:Compiling_01}} | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
[[FAQ:Compiling]] | [[FAQ:Compiling]] | ||
{{FAQ:Compiling}} | {{FAQ:Compiling}} |
Revision as of 14:35, 29 December 2006
How do I compile with 'cc' instead of 'gcc'?
The basic mechanism for compiling the Net-SNMP project software is to
run configure
, followed by make
(to compile it), make test
(to
check that it's working properly) and then make install
(to install
the files into the correct locations - which typically needs to be done
as root.
The primary role of configure
is to determines various aspects about
the system that the software is being compiled on. However there are
also a number of options to configure which can be used to control
various aspects of the compilation environment.
The most common options are --with-mib-modules
and --with-out-mib-modules
which control the set of MIB module code files that are included within
the agent binary. Adding or removing these modules will affect what MIB
information the agent can return.
See the entry How do I add a MIB to the agent? for more details.
The configure script can also specify the compiler to use for compiling
the source code (e.g. configure --with-cc=cc
), the flags passed to
this compiler (e.g. configure --with-cflags=-g
), or to the linker
(e.g. configure --with-ldflags=-Bstatic
), and various other aspects of
the build environment.
Run configure --help
for a full list.
FAQ:Compiling
- How do I control the environment used to compile the software?
- How do I control the environment used to compile the software under Windows?
- Why does the compilation complain about missing libraries?
- How can I reduce the memory footprint?
- How can I reduce the installation footprint or speed up compilation?
- How can I compile the project for use on an embedded system?
- How can I compile the project to use static linking?
- Why does 'make test' skip various tests?
- Why does 'make test' complain about a pid file?