|
Boost : |
From: Martin Wille (mw8329_at_[hidden])
Date: 2006-12-14 13:33:20
prateek khanna wrote:
> Hi,
>
> I am using Boost for the first time and now i am stuck when i try to
> compile code in Linux. We have Linux RHEL 7.2 and g++ 2.96. I managed to
> execute the sample code Simple_ls in Windows VC++ 6, but when I try to
> compile the same code in Linux it gives me many errors.
> I am using follow command to compile my linux code.
> g++ -c -I /usr/local/include/boost-1_33_1/ -L /usr/local/lib
> Simple_ls.cpp
> I have attached a file which contains the error i am getting. I have
> never worked on Linux earlier, so i think most probably I am missing out
> on making some setting in Linux environment or macros
> If somebody can help me, I would be very grateful. :-)
You're missing a C++ compiler. So called gcc "2.96" is not an official
gcc release. It has been created by a Linux distributor by adding tons
of patches to gcc 2.95.x. Those patches made gcc "2.96" even worse than
gcc 2.95 was. gcc 2.95 and "2.96" are pre-standard compilers and way
outdated.
Please consider getting a more recent compiler. This will likely solve
your current problem and it will definitely avoid a lot of other
problems you will run into by using gcc "2.96". I suggest you try gcc
3.4.6 or gcc 4.1.1.
Beware, though, that if you're planning to link against prebuilt C++
libraries of your Linux distribution then you have to stick to the
compiler used by the distribution (that limit does not exist for C
libraries used by your application). In that case, you probably should
upgrade your system generally in order to get rid of the legacy stuff.
HTH,
m
Send instant messages to your online friends http://au.messenger.yahoo.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk