FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

LinkBack Thread Tools
Old 04-18-2011, 02:18 AM
"Robert Blair Mason Jr."
Default Clang include paths

I'm running a fresh install of debian-testing on an amd64 laptop. I do
lots of C++ compiling, and prefer clang's error messages to g++'s
cryptic gobbledygook. After installing clang, I was surprised to find
that nothing compiled. Stepping back, I tried to compile hello world:

$ clang++ test.cpp
test.cpp:1:10: fatal error: 'iostream' file not found
#include <iostream>
1 diagnostic generated.

I checked that headers were installed (they were). However, specifying
include directories on the command line worked:

$ clang++ -I/usr/include/c++/4.5.2
-I/usr/include/c++/4.5.2/x86_64-linux-gnu test.cpp

compiles as expected.

According to the documentation, the include path is hard coded in a
source file, and the only way to *not* have to specify the full include
path on the command line is to compile from source.

My question is, is this a bug? If so, would it be fixed at the package
level or upstream? In the meantime, I can compile the compiler from
source. Also, why don't compilers have files like /etc/clang.conf that
allow you to set include paths more flexibly?



To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110417221820.69e7880d@blairasus.mason.homeunix.o rg">http://lists.debian.org/20110417221820.69e7880d@blairasus.mason.homeunix.o rg

Thread Tools

All times are GMT. The time now is 03:38 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org