[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sheflug] G++
On Thu, Jul 13, 2000 at 02:17:48AM +0000, Sammy Redshaw wrote:
> I am have trouble trying to compile a simple progam i am have problem
> with g++ trying to find the "#include <xxxx.h>" header file, and i am
> running from root. There is an /usr/include file but I cannot figure
> out how to get it to point to it. Any help would be greatly appreciated
Note that you have to specify whih libs you link against. Even
for rather mundane tasks (sqrt() and stuff like that), you need to
define that. It is wise to look at what paths your compiler will check
for libraries. You can add new paths using the -Ldirectory option.
As a brief example, if I have to compile some program that
requires X windows support, I need the libX11.so library (or the X11
library). I define the #include somewhere on the file, and then compile
with
gcc -o prog1 prog1.C -L/usr/X11R6/lib -lX11
Also, and maybe the whole problem arises from there (didn't have
enough coffee to catch up with reality yet...), do you have the
development packages installed? In my Mandrake experience, you do need
to install things like glibc-dev<something>.rpm to have the header
files. Re-reading your e-mail, this is what seems to be happening. So,
install the development packages, and have fun!
Hope this helps,
José
--
José L Gómez Dans PhD student
Radar & Communications Group
Department of Electronic Engineering
University of Sheffield UK
---------------------------------------------------------------------
Sheffield Linux User's Group - http://www.sheflug.co.uk
To unsubscribe from this list send mail to
- <sheflug-request [at] vuw.ac.nz> - with the word
"unsubscribe" in the body of the message.
GNU the choice of a complete generation.