Boost libreries in Opensuse

I tray to use the boost libreries with c++ in opensuse. What directive shall I give the compiler ? I have tryed #include to no avail. Yast says the boost libreries and devel packages are in the system , but I do not know how to link those libreries in my program.Help would be appreciatedThaks

Here is what I found for boost in openSUSE 12.3, what openSUSE version are you using?

-----------------------------------------------------------------------
 Zypper Command - Zypper Package Management Menu System - Version 2.12 
-----------------------------------------------------------------------

Terminal Command: zypper search  boost

Loading repository data...
Reading installed packages...

S | Name                                 | Summary                                        | Type   
--+--------------------------------------+------------------------------------------------+--------
i | boost-devel                          | Development package for Boost C++              | package
  | boost-devel-32bit                    | Development package for Boost C++              | package
  | boost-doc-html                       | HTML documentation for the Boost C++ Libraries | package
  | boost-doc-man                        | Man documentation for the Boost C++ Libraries  | package
  | boost-doc-pdf                        | PDF documentation for the Boost C++ Libraries  | package
i | boost-jam                            | An Enhanced Make Replacement                   | package
i | boost-license1_49_0                  | Boost License                                  | package
i | libboost_chrono1_49_0                | The Boost::Chrono runtime library              | package
i | libboost_date_time1_49_0             | Boost::Date.Time Runtime libraries             | package
  | libboost_date_time1_49_0-32bit       | Boost::Date.Time Runtime libraries             | package
i | libboost_filesystem1_49_0            | Boost::Filesystem Runtime Libraries            | package
  | libboost_filesystem1_49_0-32bit      | Boost::Filesystem Runtime Libraries            | package
i | libboost_graph1_49_0                 | Boost::Graph Runtime Libraries                 | package
  | libboost_graph1_49_0-32bit           | Boost::Graph Runtime Libraries                 | package
i | libboost_iostreams1_49_0             | Boost::IOStreams Runtime Libraries             | package
  | libboost_iostreams1_49_0-32bit       | Boost::IOStreams Runtime Libraries             | package
i | libboost_locale1_49_0                | The Boost::Locale runtime library              | package
i | libboost_math1_49_0                  | Boost::Math Runtime Libraries                  | package
  | libboost_math1_49_0-32bit            | Boost::Math Runtime Libraries                  | package
i | libboost_mpi1_49_0                   | Boost::MPI Runtime libraries                   | package
  | libboost_mpi1_49_0-32bit             | Boost::MPI Runtime libraries                   | package
i | libboost_program_options1_49_0       | Boost::ProgramOptions Runtime libraries        | package
  | libboost_program_options1_49_0-32bit | Boost::ProgramOptions Runtime libraries        | package
i | libboost_python1_49_0                | Boost::Python Runtime Libraries                | package
  | libboost_python1_49_0-32bit          | Boost::Python Runtime Libraries                | package
i | libboost_random1_49_0                | The Boost::Random runtime library              | package
  | libboost_random1_49_0-32bit          | The Boost::Random runtime library              | package
i | libboost_regex1_49_0                 | The Boost::Regex runtime library               | package
  | libboost_regex1_49_0-32bit           | The Boost::Regex runtime library               | package
i | libboost_serialization1_49_0         | Boost::Serialization Runtime Libraries         | package
  | libboost_serialization1_49_0-32bit   | Boost::Serialization Runtime Libraries         | package
i | libboost_signals1_49_0               | Boost::Signals Runtime Libraries               | package
  | libboost_signals1_49_0-32bit         | Boost::Signals Runtime Libraries               | package
i | libboost_system1_49_0                | Boost::System Runtime Libraries                | package
  | libboost_system1_49_0-32bit          | Boost::System Runtime Libraries                | package
i | libboost_test1_49_0                  | Boost::Test Runtime Libraries                  | package
  | libboost_test1_49_0-32bit            | Boost::Test Runtime Libraries                  | package
i | libboost_thread1_49_0                | Boost::Thread Runtime Libraries                | package
  | libboost_thread1_49_0-32bit          | Boost::Thread Runtime Libraries                | package
i | libboost_timer1_49_0                 | The Boost::Timer runtime library               | package
i | libboost_wave1_49_0                  | Boost::Wave Runtime Libraries                  | package
  | libboost_wave1_49_0-32bit            | Boost::Wave Runtime Libraries                  | package

Error Code on Command Exit = 0, 0 = Success

End Of Listing (Q=Quit H=Help) ...

You can find out more about boost here: Boost Getting Started on Unix Variants - 1.38.0

You can find compiler info here: The C++ and Boost Code Shop: Getting Started with Boost

I have not used boost myself, but the libraries are there and so is info on how to use them it appears. For help in Package searching have a look at this:

Zypper Command - Zypper Package Management Menu System - Version 2.00 - Blogs - openSUSE Forums

Good luck in your quest. Let us know if anything here has helped you.

Thank You,

Thanks for your helpI use SUSE 12.3. Yasts sys I have all necessary Boost packages and their devels loaded, but I do not knou how to tell dem Compiler they are there, ready to use.I will skim the documentation you hintedThanks again

As you are apperently writing a (C++) programm and want help with compiling/linkiing, shouldn’t this thread be in Development > Programming/Scripting where you have more chance to meet other (C++) programmers?

When you want me to move this thread, please ask.

yes, please, move the threadThaks

CLOSED for the moment.
Will be moved to Programming/Scripting.

Moved from Applications and open again.

For compiling you have to tell the compiler the location of the boost includes with -I:

g++ -c -I/usr/include/boost/ boost_test.cc

And you have to link against the boost libraries you are using, f.e.:

g++ boost_test.o -o boost_test -lboost_regex

Of course you can combine compiling and linking into one command:

g++ boost_test.cc -o boost_test -I/usr/include/boost -lboost_regex

And if you use include statements like “#include <boost/regex.hpp>”, you can omit the “-I/usr/include/boost” of course.

So the following line would compile and link the example from Boost Getting Started on Unix Variants - 1.53.0:

g++ example.cpp -o example -lboost_regex

on openSUSE.