This is the mail archive of the
mailing list for the GCC project.
Re: How do I link libraries with g++...
- To: tgjp at thezone dot net
- Subject: Re: How do I link libraries with g++...
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Sun, 28 May 2000 17:13:33 +0200
- CC: gcc-help at gcc dot gnu dot org
- References: <39312DB5.14D3C108@thezone.net>
> I'm trying to use the Mesa (OpenGL) with g++ to develop graphics
> applications, but I have no idea how to link the Mesa and Glut libraries
> to my program (test.c}.... I've downloaded sample code utilizing header
> files and libraries from both Mesa and Glut, but I can't compile the
> sample code... I'm thinking I need to link the libraries into the
> source file, but I have no idea how to do this with g++... Any help
> will be greatly appreciated... Thanks...
Please have a look at the gcc(1) manual page, or the section "Invoking
GCC" of the GCC manual; it explains all options of gcc in detail. Take
particular notice of the -l option.
If you still have problems, please report exactly what you did (in
terms of typing commands at the Unix shell), what the output of the
system was, and what you think should have happened instead.