Boost logo

Boost :

Subject: [boost] Problem with program_options on FreeBSD 8 (gcc 4.2)
From: elekktretterr_at_[hidden]
Date: 2010-08-12 05:22:03


Hi,
I'm new to Boost and I've decided to use it in my C++ project. My first
attempt is to use boost::program_options. However, Im hitting a slag and I
can't figure out whats the problem.

ive got this:

#include "boost/program_options.hpp"

int main()
{
  return 0;
}

then I run:
g++ -I/usr/local/include -L/usr/local/lib test.cpp

but I get this error that doesn't make any sense to me:

In file included from
/usr/local/include/boost/program_options/value_semantic.hpp:14,
                 from
/usr/local/include/boost/program_options/options_description.hpp:13,
                 from /usr/local/include/boost/program_options.hpp:15,
                 from test.cpp:1:
/usr/local/include/boost/type_traits/is_unsigned.hpp: In instantiation of
'boost::detail::is_ununsigned_helper<short int>':
/usr/local/include/boost/type_traits/is_unsigned.hpp:73: instantiated
from 'boost::detail::is_unsigned_imp<short int>'
/usr/local/include/boost/type_traits/is_unsigned.hpp:123: instantiated
from 'boost::is_unsigned<short int>'
/usr/local/include/boost/type_traits/make_unsigned.hpp:110: instantiated
from 'boost::detail::make_unsigned_imp<short int>'
/usr/local/include/boost/type_traits/make_unsigned.hpp:130: instantiated
from 'boost::make_unsigned<short int>'
/usr/local/include/boost/lexical_cast.hpp:846: instantiated from here
/usr/local/include/boost/type_traits/is_unsigned.hpp:40: warning:
comparison between 'enum boost::detail::is_unsigned_values<short
int>::<anonymous>' and 'enum boost::detail::is_unsigned_values<short
int>::<anonymous>'
/usr/local/include/boost/type_traits/is_unsigned.hpp: In instantiation of
'boost::detail::is_ununsigned_helper<int>':
/usr/local/include/boost/type_traits/is_unsigned.hpp:73: instantiated
from 'boost::detail::is_unsigned_imp<int>'
/usr/local/include/boost/type_traits/is_unsigned.hpp:123: instantiated
from 'boost::is_unsigned<int>'
/usr/local/include/boost/type_traits/make_unsigned.hpp:110: instantiated
from 'boost::detail::make_unsigned_imp<int>'
/usr/local/include/boost/type_traits/make_unsigned.hpp:130: instantiated
from 'boost::make_unsigned<int>'
/usr/local/include/boost/lexical_cast.hpp:860: instantiated from here
/usr/local/include/boost/type_traits/is_unsigned.hpp:40: warning:
comparison between 'enum
boost::detail::is_unsigned_values<int>::<anonymous>' and 'enum
boost::detail::is_unsigned_values<int>::<anonymous>'
/usr/local/include/boost/type_traits/is_unsigned.hpp: In instantiation of
'boost::detail::is_ununsigned_helper<long int>':
/usr/local/include/boost/type_traits/is_unsigned.hpp:73: instantiated
from 'boost::detail::is_unsigned_imp<long int>'
/usr/local/include/boost/type_traits/is_unsigned.hpp:123: instantiated
from 'boost::is_unsigned<long int>'
/usr/local/include/boost/type_traits/make_unsigned.hpp:110: instantiated
from 'boost::detail::make_unsigned_imp<long int>'
/usr/local/include/boost/type_traits/make_unsigned.hpp:130: instantiated
from 'boost::make_unsigned<long int>'
/usr/local/include/boost/lexical_cast.hpp:874: instantiated from here
/usr/local/include/boost/type_traits/is_unsigned.hpp:40: warning:
comparison between 'enum boost::detail::is_unsigned_values<long
int>::<anonymous>' and 'enum boost::detail::is_unsigned_values<long
int>::<anonymous>'
/usr/local/include/boost/type_traits/is_unsigned.hpp: In instantiation of
'boost::detail::is_ununsigned_helper<long long int>':
/usr/local/include/boost/type_traits/is_unsigned.hpp:73: instantiated
from 'boost::detail::is_unsigned_imp<long long int>'
/usr/local/include/boost/type_traits/is_unsigned.hpp:123: instantiated
from 'boost::is_unsigned<long long int>'
/usr/local/include/boost/type_traits/make_unsigned.hpp:110: instantiated
from 'boost::detail::make_unsigned_imp<long long int>'
/usr/local/include/boost/type_traits/make_unsigned.hpp:130: instantiated
from 'boost::make_unsigned<long long int>'
/usr/local/include/boost/lexical_cast.hpp:889: instantiated from here
/usr/local/include/boost/type_traits/is_unsigned.hpp:40: warning:
comparison between 'enum boost::detail::is_unsigned_values<long long
int>::<anonymous>' and 'enum boost::detail::is_unsigned_values<long long
int>::<anonymous>'

I tried including other libraries like foreach and thread and they compile
& link fine.

Can someone please help me?

Thanks,
Petr


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk