
Dear All, I have a simple test using program_options but even if I set BOOST_ALL_NO_LIB=1 the linker gives me errors. Any idea? Regards Gianni

What errors? Just because you ask it not to link to any boost library
doesn't mean that program_options can work without its compiled
parts... You'll have to link against somehting...
Best,
Dee
On Wed, Mar 9, 2011 at 16:56, Gianni Ambrosio
Dear All, I have a simple test using program_options but even if I set BOOST_ALL_NO_LIB=1 the linker gives me errors. Any idea?
Regards Gianni
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

Hi Diederick,
it seems link errors directly related to program_options lib. I used
property tree lib without the need of any lib to link against. So, which
is the benefit of using BOOST_ALL_NO_LIB if I need to link against boost
libs?
Anyway, here are the errors:
error LNK2001: unresolved external symbol "void __cdecl
boost::program_options::validators::check_first_occurrence(class
boost::any const &)"
(?check_first_occurrence@validators@program_options@boost@@YAXABVany@3@@Z)
error LNK2001: unresolved external symbol "class
std::basic_ostream
What errors? Just because you ask it not to link to any boost library doesn't mean that program_options can work without its compiled parts... You'll have to link against somehting...
Best, Dee
On Wed, Mar 9, 2011 at 16:56, Gianni Ambrosio
wrote: Dear All, I have a simple test using program_options but even if I set BOOST_ALL_NO_LIB=1 the linker gives me errors. Any idea?
Regards Gianni
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
----- No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1204 / Virus Database: 1497/3492 - Release Date: 03/08/11

On 09/03/11 09:35, Gianni Ambrosio wrote:
Hi Diederick, it seems link errors directly related to program_options lib. I used property tree lib without the need of any lib to link against. So, which is the benefit of using BOOST_ALL_NO_LIB if I need to link against boost libs?
As far as I understand it, BOOST_ALL_NO_LIB removes the auto-linking functionality. This means you will need to explicitly link against the correct libraries in your build system. It does not remove the need to link altogether. John.

Il 3/9/2011 10:50 AM, John Reid ha scritto:
As far as I understand it, BOOST_ALL_NO_LIB removes the auto-linking functionality. This means you will need to explicitly link against the correct libraries in your build system. It does not remove the need to link altogether.
OK, so there's no way to use header only libraries? Regards Gianni

it seems link errors directly related to program_options lib. I used property tree lib without the need of any lib to link against. So, which is the benefit of using BOOST_ALL_NO_LIB if I need to link against boost libs?
As far as I understand it, BOOST_ALL_NO_LIB removes the auto-linking functionality. This means you will need to explicitly link against the correct libraries in your build system. It does not remove the need to link altogether.
Correct, and with msvc it's *strongly* recommended that you do not define BOOST_ALL_NO_LIB unless you *really* know what you're doing. The correct fix is to set the library search path to search the location of the libraries built when you built Boost (defaults to stage/lib with msvc) - you did build Boost right? HTH, John.

Il 3/9/2011 1:19 PM, John Maddock ha scritto:
The correct fix is to set the library search path to search the location of the libraries built when you built Boost (defaults to stage/lib with msvc) - you did build Boost right?
John, obviously the error I get is related to the fact the program_options lib is not reached by the linker. My question at this point is different: can I use program_options as header only library? On the basis of what Diederick told me it seems I can't. Now, could you please tell me where can I find the list of boost libs that can be used as header only? Thanks Gianni

A simple search would give you that
See
http://www.boost.org/doc/libs/1_46_0/more/getting_started/unix-variants.html
or
http://www.boost.org/doc/libs/1_46_0/more/getting_started/windows.html,
depending on your platform, point 3 for both.
Best,
Dee
On Wed, Mar 9, 2011 at 22:11, Gianni Ambrosio
Il 3/9/2011 1:19 PM, John Maddock ha scritto:
The correct fix is to set the library search path to search the location of the libraries built when you built Boost (defaults to stage/lib with msvc) - you did build Boost right?
John, obviously the error I get is related to the fact the program_options lib is not reached by the linker. My question at this point is different: can I use program_options as header only library? On the basis of what Diederick told me it seems I can't. Now, could you please tell me where can I find the list of boost libs that can be used as header only?
Thanks Gianni
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

Hi...I've followed your advice, and I have downloaded the new boost asio
library, which support the fork().
I've downloaded the simple example at the following link:
http://think-async.com/Asio/boost_asio_1_5_2/doc/html/boost_asio/example/for...,
but when I'm trying to compile I get the following error:
**** Build of configuration Debug for project ServerFork ****
make all
Building file: ../ServerFork.cpp
Invoking: GCC C++ Compiler
g++ -I/usr/nuovoboost/boost_asio_1_5_2 -O0 -g3 -Wall -c -fmessage-length=0 -MMD
-MP -MF"ServerFork.d" -MT"ServerFork.d" -o"ServerFork.o" "../ServerFork.cpp"
In file included from
/usr/nuovoboost/boost_asio_1_5_2/boost/asio/detail/impl/throw_error.ipp:21,
from
/usr/nuovoboost/boost_asio_1_5_2/boost/asio/detail/throw_error.hpp:52,
from
/usr/nuovoboost/boost_asio_1_5_2/boost/asio/detail/impl/posix_mutex.ipp:23,
from
/usr/nuovoboost/boost_asio_1_5_2/boost/asio/detail/posix_mutex.hpp:73,
from
/usr/nuovoboost/boost_asio_1_5_2/boost/asio/detail/mutex.hpp:25,
from
/usr/nuovoboost/boost_asio_1_5_2/boost/asio/detail/service_registry.hpp:20,
from
/usr/nuovoboost/boost_asio_1_5_2/boost/asio/impl/io_service.hpp:19,
from
/usr/nuovoboost/boost_asio_1_5_2/boost/asio/io_service.hpp:767,
from ../ServerFork.cpp:1:
/usr/nuovoboost/boost_asio_1_5_2/boost/system/system_error.hpp:22: error:
expected initializer before ‘:’ token
In file included from
/usr/nuovoboost/boost_asio_1_5_2/boost/asio/impl/io_service.hpp:19,
from
/usr/nuovoboost/boost_asio_1_5_2/boost/asio/io_service.hpp:767,
from ../ServerFork.cpp:1:
/usr/nuovoboost/boost_asio_1_5_2/boost/asio/detail/service_registry.hpp:38:
error: expected ‘}’ before end of line
/usr/nuovoboost/boost_asio_1_5_2/boost/asio/detail/service_registry.hpp:38:
error: expected ‘}’ before end of line
/usr/nuovoboost/boost_asio_1_5_2/boost/asio/detail/service_registry.hpp:38:
error: expected declaration before end of line
/usr/nuovoboost/boost_asio_1_5_2/boost/asio/detail/throw_error.hpp:27: warning:
inline function ‘void boost::asio::detail::do_throw_error(const
boost::system::error_code&)’ used but never defined
/usr/nuovoboost/boost_asio_1_5_2/boost/asio/detail/throw_error.hpp:29: warning:
inline function ‘void boost::asio::detail::do_throw_error(const
boost::system::error_code&, const char*)’ used but never defined
/usr/nuovoboost/boost_asio_1_5_2/boost/system/error_code.hpp:214: warning:
‘boost::system::posix_category’ defined but not used
/usr/nuovoboost/boost_asio_1_5_2/boost/system/error_code.hpp:215: warning:
‘boost::system::errno_ecat’ defined but not used
/usr/nuovoboost/boost_asio_1_5_2/boost/system/error_code.hpp:216: warning:
‘boost::system::native_ecat’ defined but not used
make: *** [ServerFork.o] Error 1
any ideas?
thanks...
________________________________
Da: Diederick C. Niehorster
Il 3/9/2011 1:19 PM, John Maddock ha scritto:
The correct fix is to set the library search path to search the location of the libraries built when you built Boost (defaults to stage/lib with msvc) - you did build Boost right?
John, obviously the error I get is related to the fact the program_options lib is not reached by the linker. My question at this point is different: can I use program_options as header only library? On the basis of what Diederick told me it seems I can't. Now, could you please tell me where can I find the list of boost libs that can be used as header only?
Thanks Gianni
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

The correct fix is to set the library search path to search the location of the libraries built when you built Boost (defaults to stage/lib with msvc) - you did build Boost right?
John, obviously the error I get is related to the fact the program_options lib is not reached by the linker. My question at this point is different: can I use program_options as header only library?
No. RTFM ;-)
On the basis of what Diederick told me it seems I can't. Now, could you please tell me where can I find the list of boost libs that can be used as header only?
The getting started guide is always the place to look for stuff like that: http://www.boost.org/doc/libs/1_46_0/more/getting_started/windows.html#heade... Oh, it'll tell you how to build the program_options binaries too ;-) HTH, John.

John, Diederick already told me what I need. Pelase read the previous messages about the same topic before replying to avoid duplications, thanks ;) Il 3/9/2011 5:50 PM, John Maddock ha scritto:
The correct fix is to set the library search path to search the location of the libraries built when you built Boost (defaults to stage/lib with msvc) - you did build Boost right?
John, obviously the error I get is related to the fact the program_options lib is not reached by the linker. My question at this point is different: can I use program_options as header only library?
No. RTFM ;-)
On the basis of what Diederick told me it seems I can't. Now, could you please tell me where can I find the list of boost libs that can be used as header only?
The getting started guide is always the place to look for stuff like that: http://www.boost.org/doc/libs/1_46_0/more/getting_started/windows.html#heade...
Oh, it'll tell you how to build the program_options binaries too ;-)
HTH, John. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
----- No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1204 / Virus Database: 1497/3494 - Release Date: 03/09/11
participants (5)
-
Diederick C. Niehorster
-
Gianni Ambrosio
-
John Maddock
-
John Reid
-
Marco Piacentini