Re: [Boost-users] How do you compile Boost C++ code in Ubuntu?
Greetings,
I am sorry for the confusion; I mean my code that uses Boost C++ Libraries.
I had set the shell variable $LD_LIBRARY_PATH to:
/usr/lib/libboost_system.so. It was originally empty. I used the
"echo" command to reflect the path that I had set it to.
I had installed it with Ubuntu Software Center.
Here is a snippet of: /usr/lib
-rw-r--r-- 1 root root 31152 Jan 5 2012 libboost_chrono.so.1.48.0
-rw-r--r-- 1 root root 68216 Jan 2 2012 libboost_date_time.so.1.46.1
-rw-r--r-- 1 root root 122280 Jan 2 2012 libboost_filesystem.so.1.46.1
-rw-r--r-- 1 root root 324192 Jan 2 2012 libboost_graph.so.1.46.1
-rw-r--r-- 1 root root 328328 Jan 5 2012 libboost_graph.so.1.48.0
-rw-r--r-- 1 root root 101592 Jan 2 2012 libboost_iostreams.so.1.46.1
-rw-r--r-- 1 root root 885000 Jan 5 2012 libboost_locale.so.1.48.0
-rw-r--r-- 1 root root 105264 Jan 2 2012 libboost_math_c99f.so.1.46.1
-rw-r--r-- 1 root root 109264 Jan 2 2012 libboost_math_c99l.so.1.46.1
-rw-r--r-- 1 root root 109312 Jan 2 2012 libboost_math_c99.so.1.46.1
-rw-r--r-- 1 root root 265088 Jan 2 2012 libboost_math_tr1f.so.1.46.1
-rw-r--r-- 1 root root 244536 Jan 2 2012 libboost_math_tr1l.so.1.46.1
-rw-r--r-- 1 root root 240440 Jan 2 2012 libboost_math_tr1.so.1.46.1
-rw-r--r-- 1 root root 89656 Jan 3 2012
libboost_mpi_python-py27.so.1.46.1
-rw-r--r-- 1 root root 89656 Jan 3 2012
libboost_mpi_python-py32.so.1.46.1
-rw-r--r-- 1 root root 180320 Jan 3 2012 libboost_mpi.so.1.46.1
-rw-r--r-- 1 root root 180320 Jan 5 2012 libboost_mpi.so.1.48.0
-rw-r--r-- 1 root root 116720 Jan 5 2012 libboost_prg_exec_monitor.a
lrwxrwxrwx 1 root root 27 Jan 5 2012
libboost_prg_exec_monitor-mt.a -> libboost_prg_exec_monitor.a
lrwxrwxrwx 1 root root 35 Jan 5 2012
libboost_prg_exec_monitor-mt.so -> libboost_prg_exec_monitor.so.1.48.0
lrwxrwxrwx 1 root root 35 Jan 5 2012
libboost_prg_exec_monitor.so -> libboost_prg_exec_monitor.so.1.48.0
-rw-r--r-- 1 root root 56352 Jan 2 2012
libboost_prg_exec_monitor.so.1.46.1
-rw-r--r-- 1 root root 56352 Jan 5 2012
libboost_prg_exec_monitor.so.1.48.0
-rw-r--r-- 1 root root 414280 Jan 2 2012
libboost_program_options.so.1.46.1
-rw-r--r-- 1 root root 311168 Jan 2 2012
libboost_python-py27.so.1.46.1
-rw-r--r-- 1 root root 315264 Jan 5 2012
libboost_python-py27.so.1.48.0
-rw-r--r-- 1 root root 307072 Jan 2 2012
libboost_python-py32.so.1.46.1
-rw-r--r-- 1 root root 311136 Jan 5 2012
libboost_python-py32.so.1.48.0
-rw-r--r-- 1 root root 10472 Jan 2 2012 libboost_random.so.1.46.1
-rw-r--r-- 1 root root 1054456 Jan 2 2012 libboost_regex.so.1.46.1
-rw-r--r-- 1 root root 1079096 Jan 5 2012 libboost_regex.so.1.48.0
-rw-r--r-- 1 root root 1240020 Jan 5 2012 libboost_serialization.a
lrwxrwxrwx 1 root root 24 Jan 5 2012
libboost_serialization-mt.a -> libboost_serialization.a
lrwxrwxrwx 1 root root 32 Jan 5 2012
libboost_serialization-mt.so -> libboost_serialization.so.1.48.0
lrwxrwxrwx 1 root root 32 Jan 5 2012
libboost_serialization.so -> libboost_serialization.so.1.48.0
-rw-r--r-- 1 root root 446584 Jan 2 2012
libboost_serialization.so.1.46.1
-rw-r--r-- 1 root root 446584 Jan 5 2012
libboost_serialization.so.1.48.0
-rw-r--r-- 1 root root 80600 Jan 2 2012 libboost_signals.so.1.46.1
-rw-r--r-- 1 root root 14568 Jan 2 2012 libboost_system.so.1.46.1
-rw-r--r-- 1 root root 14568 Jan 5 2012 libboost_system.so.1.48.0
-rw-r--r-- 1 root root 1635110 Jan 5 2012 libboost_test_exec_monitor.a
lrwxrwxrwx 1 root root 28 Jan 5 2012
libboost_test_exec_monitor-mt.a -> libboost_test_exec_monitor.a
-rw-r--r-- 1 root root 101304 Jan 2 2012 libboost_thread.so.1.46.1
-rw-r--r-- 1 root root 109536 Jan 5 2012 libboost_thread.so.1.48.0
-rw-r--r-- 1 root root 33102 Jan 5 2012 libboost_timer.a
lrwxrwxrwx 1 root root 16 Jan 5 2012 libboost_timer-mt.a
-> libboost_timer.a
lrwxrwxrwx 1 root root 24 Jan 5 2012
libboost_timer-mt.so -> libboost_timer.so.1.48.0
lrwxrwxrwx 1 root root 24 Jan 5 2012 libboost_timer.so
-> libboost_timer.so.1.48.0
-rw-r--r-- 1 root root 18832 Jan 5 2012 libboost_timer.so.1.48.0
-rw-r--r-- 1 root root 1879526 Jan 5 2012
libboost_unit_test_framework.a
lrwxrwxrwx 1 root root 30 Jan 5 2012
libboost_unit_test_framework-mt.a -> libboost_unit_test_framework.a
lrwxrwxrwx 1 root root 38 Jan 5 2012
libboost_unit_test_framework-mt.so ->
libboost_unit_test_framework.so.1.48.0
lrwxrwxrwx 1 root root 38 Jan 5 2012
libboost_unit_test_framework.so ->
libboost_unit_test_framework.so.1.48.0
-rw-r--r-- 1 root root 656824 Jan 2 2012
libboost_unit_test_framework.so.1.46.1
-rw-r--r-- 1 root root 669080 Jan 5 2012
libboost_unit_test_framework.so.1.48.0
-rw-r--r-- 1 root root 1320168 Jan 2 2012 libboost_wave.so.1.46.1
-rw-r--r-- 1 root root 845962 Jan 5 2012 libboost_wserialization.a
lrwxrwxrwx 1 root root 25 Jan 5 2012
libboost_wserialization-mt.a -> libboost_wserialization.a
lrwxrwxrwx 1 root root 33 Jan 5 2012
libboost_wserialization-mt.so -> libboost_wserialization.so.1.48.0
lrwxrwxrwx 1 root root 33 Jan 5 2012
libboost_wserialization.so -> libboost_wserialization.so.1.48.0
-rw-r--r-- 1 root root 323128 Jan 2 2012
libboost_wserialization.so.1.46.1
-rw-r--r-- 1 root root 323128 Jan 5 2012
libboost_wserialization.so.1.48.0
Here is a listing of the files in: /usr/include/boost
Go Bears >ls -al
total 1308
drwxr-xr-x 86 root root 12288 Feb 7 03:51 .
drwxr-xr-x 121 root root 20480 Feb 7 03:50 ..
drwxr-xr-x 5 root root 4096 Feb 7 03:50 accumulators
drwxr-xr-x 3 root root 4096 Feb 7 03:50 algorithm
-rw-r--r-- 1 root root 4297 Jan 5 2012 aligned_storage.hpp
-rw-r--r-- 1 root root 6505 Jan 5 2012 any.hpp
drwxr-xr-x 5 root root 4096 Feb 7 03:51 archive
-rw-r--r-- 1 root root 15525 Jan 5 2012 array.hpp
drwxr-xr-x 9 root root 4096 Feb 7 03:50 asio
-rw-r--r-- 1 root root 4265 Jan 5 2012 asio.hpp
-rw-r--r-- 1 root root 4120 Jan 5 2012 assert.hpp
drwxr-xr-x 3 root root 4096 Feb 7 03:51 assign
-rw-r--r-- 1 root root 614 Jan 5 2012 assign.hpp
drwxr-xr-x 9 root root 4096 Feb 7 03:51 bimap
-rw-r--r-- 1 root root 387 Jan 5 2012 bimap.hpp
drwxr-xr-x 2 root root 4096 Feb 7 03:50 bind
-rw-r--r-- 1 root root 581 Jan 5 2012 bind.hpp
-rw-r--r-- 1 root root 618 Jan 5 2012 blank_fwd.hpp
-rw-r--r-- 1 root root 1946 Jan 5 2012 blank.hpp
-rw-r--r-- 1 root root 773 Jan 5 2012 call_traits.hpp
-rw-r--r-- 1 root root 4455 Jan 5 2012 cast.hpp
-rw-r--r-- 1 root root 4173 Jan 5 2012 cerrno.hpp
-rw-r--r-- 1 root root 1589 Jan 5 2012 checked_delete.hpp
drwxr-xr-x 4 root root 4096 Feb 7 03:50 chrono
-rw-r--r-- 1 root root 706 Jan 5 2012 chrono.hpp
drwxr-xr-x 2 root root 4096 Feb 7 03:50 circular_buffer
-rw-r--r-- 1 root root 1157 Jan 5 2012 circular_buffer_fwd.hpp
-rw-r--r-- 1 root root 2540 Jan 5 2012 circular_buffer.hpp
drwxr-xr-x 3 root root 4096 Feb 7 03:50 compatibility
-rw-r--r-- 1 root root 801 Jan 5 2012 compressed_pair.hpp
drwxr-xr-x 3 root root 4096 Feb 7 03:50 concept
-rw-r--r-- 1 root root 23671 Jan 5 2012 concept_archetype.hpp
drwxr-xr-x 2 root root 4096 Feb 7 03:50 concept_check
-rw-r--r-- 1 root root 32100 Jan 5 2012 concept_check.hpp
drwxr-xr-x 7 root root 4096 Feb 7 03:51 config
-rw-r--r-- 1 root root 2074 Jan 5 2012 config.hpp
drwxr-xr-x 3 root root 4096 Feb 7 03:51 container
-rw-r--r-- 1 root root 33373 Jan 5 2012 crc.hpp
-rw-r--r-- 1 root root 721 Jan 5 2012 cregex.hpp
-rw-r--r-- 1 root root 17287 Jan 5 2012 cstdint.hpp
-rw-r--r-- 1 root root 1739 Jan 5 2012 cstdlib.hpp
-rw-r--r-- 1 root root 1511 Jan 5 2012 current_function.hpp
drwxr-xr-x 5 root root 4096 Feb 7 03:50 date_time
-rw-r--r-- 1 root root 587 Jan 5 2012 date_time.hpp
drwxr-xr-x 3 root root 4096 Feb 7 03:50 detail
drwxr-xr-x 2 root root 4096 Feb 7 03:50 dynamic_bitset
-rw-r--r-- 1 root root 675 Jan 5 2012 dynamic_bitset_fwd.hpp
-rw-r--r-- 1 root root 560 Jan 5 2012 dynamic_bitset.hpp
-rw-r--r-- 1 root root 530 Jan 5 2012 enable_shared_from_this.hpp
drwxr-xr-x 3 root root 4096 Feb 7 03:50 exception
-rw-r--r-- 1 root root 434 Jan 5 2012 exception.hpp
-rw-r--r-- 1 root root 374 Jan 5 2012 exception_ptr.hpp
drwxr-xr-x 5 root root 4096 Feb 7 03:50 filesystem
-rw-r--r-- 1 root root 1340 Jan 5 2012 filesystem.hpp
drwxr-xr-x 3 root root 4096 Feb 7 03:50 flyweight
-rw-r--r-- 1 root root 622 Jan 5 2012 flyweight.hpp
-rw-r--r-- 1 root root 2198 Jan 5 2012 foreach_fwd.hpp
-rw-r--r-- 1 root root 45365 Jan 5 2012 foreach.hpp
drwxr-xr-x 3 root root 4096 Feb 7 03:51 format
-rw-r--r-- 1 root root 2179 Jan 5 2012 format.hpp
drwxr-xr-x 3 root root 4096 Feb 7 03:50 function
drwxr-xr-x 4 root root 4096 Feb 7 03:50 functional
-rw-r--r-- 1 root root 18893 Jan 5 2012 functional.hpp
-rw-r--r-- 1 root root 791 Jan 5 2012 function_equal.hpp
-rw-r--r-- 1 root root 2200 Jan 5 2012 function.hpp
-rw-r--r-- 1 root root 1574 Jan 5 2012 function_output_iterator.hpp
drwxr-xr-x 4 root root 4096 Feb 7 03:51 function_types
drwxr-xr-x 13 root root 4096 Feb 7 03:51 fusion
-rw-r--r-- 1 root root 1859 Jan 5 2012 generator_iterator.hpp
drwxr-xr-x 13 root root 4096 Feb 7 03:50 geometry
-rw-r--r-- 1 root root 704 Jan 5 2012 geometry.hpp
-rw-r--r-- 1 root root 921 Jan 5 2012 get_pointer.hpp
drwxr-xr-x 3 root root 4096 Feb 7 03:50 gil
drwxr-xr-x 7 root root 12288 Feb 7 03:50 graph
drwxr-xr-x 6 root root 4096 Feb 7 03:50 icl
-rw-r--r-- 1 root root 794 Jan 5 2012 implicit_cast.hpp
-rw-r--r-- 1 root root 1039 Jan 5 2012 indirect_reference.hpp
drwxr-xr-x 2 root root 4096 Feb 7 03:51 integer
-rw-r--r-- 1 root root 4617 Jan 5 2012 integer_fwd.hpp
-rw-r--r-- 1 root root 10877 Jan 5 2012 integer.hpp
-rw-r--r-- 1 root root 8714 Jan 5 2012 integer_traits.hpp
drwxr-xr-x 11 root root 4096 Feb 7 03:51 interprocess
drwxr-xr-x 3 root root 4096 Feb 7 03:50 intrusive
-rw-r--r-- 1 root root 499 Jan 5 2012 intrusive_ptr.hpp
drwxr-xr-x 3 root root 4096 Feb 7 03:51 io
-rw-r--r-- 1 root root 2381 Jan 5 2012 io_fwd.hpp
drwxr-xr-x 5 root root 4096 Feb 7 03:51 iostreams
-rw-r--r-- 1 root root 634 Jan 5 2012 is_placeholder.hpp
drwxr-xr-x 3 root root 4096 Feb 7 03:50 iterator
-rw-r--r-- 1 root root 466 Jan 5 2012 iterator_adaptors.hpp
-rw-r--r-- 1 root root 1983 Jan 5 2012 iterator.hpp
drwxr-xr-x 3 root root 4096 Feb 7 03:51 lambda
-rw-r--r-- 1 root root 1271 Jan 5 2012 last_value.hpp
-rw-r--r-- 1 root root 75248 Jan 5 2012 lexical_cast.hpp
-rw-r--r-- 1 root root 6119 Jan 5 2012 limits.hpp
drwxr-xr-x 3 root root 4096 Feb 7 03:50 locale
-rw-r--r-- 1 root root 887 Jan 5 2012 locale.hpp
drwxr-xr-x 2 root root 4096 Feb 7 03:51 logic
-rw-r--r-- 1 root root 484 Jan 5 2012 make_shared.hpp
drwxr-xr-x 10 root root 4096 Feb 7 03:50 math
-rw-r--r-- 1 root root 2527 Jan 5 2012 math_fwd.hpp
-rw-r--r-- 1 root root 596 Jan 5 2012 mem_fn.hpp
-rw-r--r-- 1 root root 1273 Jan 5 2012 memory_order.hpp
drwxr-xr-x 2 root root 4096 Feb 7 03:50 move
drwxr-xr-x 5 root root 4096 Feb 7 03:50 mpi
-rw-r--r-- 1 root root 1101 Jan 5 2012 mpi.hpp
drwxr-xr-x 10 root root 12288 Feb 7 03:50 mpl
drwxr-xr-x 5 root root 4096 Feb 7 03:50 msm
drwxr-xr-x 2 root root 4096 Feb 7 03:50 multi_array
-rw-r--r-- 1 root root 15351 Jan 5 2012 multi_array.hpp
drwxr-xr-x 3 root root 4096 Feb 7 03:50 multi_index
-rw-r--r-- 1 root root 3794 Jan 5 2012 multi_index_container_fwd.hpp
-rw-r--r-- 1 root root 33455 Jan 5 2012 multi_index_container.hpp
-rw-r--r-- 1 root root 1296 Jan 5 2012 next_prior.hpp
-rw-r--r-- 1 root root 1014 Jan 5 2012 noncopyable.hpp
-rw-r--r-- 1 root root 595 Jan 5 2012 nondet_random.hpp
-rw-r--r-- 1 root root 773 Jan 5 2012 none.hpp
-rw-r--r-- 1 root root 605 Jan 5 2012 none_t.hpp
-rw-r--r-- 1 root root 619 Jan 5 2012 non_type.hpp
drwxr-xr-x 5 root root 4096 Feb 7 03:50 numeric
-rw-r--r-- 1 root root 38818 Jan 5 2012 operators.hpp
drwxr-xr-x 2 root root 4096 Feb 7 03:50 optional
-rw-r--r-- 1 root root 528 Jan 5 2012 optional.hpp
drwxr-xr-x 3 root root 4096 Feb 7 03:51 parameter
-rw-r--r-- 1 root root 724 Jan 5 2012 parameter.hpp
drwxr-xr-x 3 root root 4096 Feb 7 03:50 pending
drwxr-xr-x 12 root root 4096 Feb 7 03:51 phoenix
-rw-r--r-- 1 root root 476 Jan 5 2012 phoenix.hpp
-rw-r--r-- 1 root root 1821 Jan 5 2012 pointee.hpp
-rw-r--r-- 1 root root 1124 Jan 5 2012 pointer_cast.hpp
-rw-r--r-- 1 root root 1199 Jan 5 2012 pointer_to_other.hpp
drwxr-xr-x 3 root root 4096 Feb 7 03:50 polygon
drwxr-xr-x 3 root root 4096 Feb 7 03:50 pool
drwxr-xr-x 19 root root 4096 Feb 7 03:50 preprocessor
-rw-r--r-- 1 root root 486 Jan 5 2012 preprocessor.hpp
drwxr-xr-x 3 root root 4096 Feb 7 03:51 program_options
-rw-r--r-- 1 root root 819 Jan 5 2012 program_options.hpp
-rw-r--r-- 1 root root 5510 Jan 5 2012 progress.hpp
drwxr-xr-x 3 root root 4096 Feb 7 03:50 property_map
drwxr-xr-x 3 root root 4096 Feb 7 03:51 property_tree
drwxr-xr-x 6 root root 4096 Feb 7 03:50 proto
drwxr-xr-x 3 root root 4096 Feb 7 03:50 ptr_container
drwxr-xr-x 6 root root 4096 Feb 7 03:51 python
-rw-r--r-- 1 root root 2868 Jan 5 2012 python.hpp
drwxr-xr-x 3 root root 4096 Feb 7 03:50 random
-rw-r--r-- 1 root root 3644 Jan 5 2012 random.hpp
drwxr-xr-x 6 root root 4096 Feb 7 03:50 range
-rw-r--r-- 1 root root 842 Jan 5 2012 range.hpp
drwxr-xr-x 4 root root 4096 Feb 7 03:51 ratio
-rw-r--r-- 1 root root 349 Jan 5 2012 ratio.hpp
-rw-r--r-- 1 root root 19603 Jan 5 2012 rational.hpp
-rw-r--r-- 1 root root 3926 Jan 5 2012 ref.hpp
drwxr-xr-x 5 root root 4096 Feb 7 03:50 regex
-rw-r--r-- 1 root root 693 Jan 5 2012 regex_fwd.hpp
-rw-r--r-- 1 root root 2174 Jan 5 2012 regex.h
-rw-r--r-- 1 root root 823 Jan 5 2012 regex.hpp
-rw-r--r-- 1 root root 502 Jan 5 2012 scoped_array.hpp
-rw-r--r-- 1 root root 491 Jan 5 2012 scoped_ptr.hpp
-rw-r--r-- 1 root root 9936 Jan 5 2012 scope_exit.hpp
drwxr-xr-x 3 root root 4096 Feb 7 03:51 serialization
-rw-r--r-- 1 root root 552 Jan 5 2012 shared_array.hpp
-rw-r--r-- 1 root root 2007 Jan 5 2012 shared_container_iterator.hpp
-rw-r--r-- 1 root root 539 Jan 5 2012 shared_ptr.hpp
-rw-r--r-- 1 root root 12795 Jan 5 2012 signal.hpp
drwxr-xr-x 3 root root 4096 Feb 7 03:50 signals
drwxr-xr-x 3 root root 4096 Feb 7 03:50 signals2
-rw-r--r-- 1 root root 752 Jan 5 2012 signals2.hpp
-rw-r--r-- 1 root root 345 Jan 5 2012 signals.hpp
drwxr-xr-x 3 root root 4096 Feb 7 03:50 smart_ptr
-rw-r--r-- 1 root root 892 Jan 5 2012 smart_ptr.hpp
drwxr-xr-x 17 root root 4096 Feb 7 03:50 spirit
-rw-r--r-- 1 root root 1085 Jan 5 2012 spirit.hpp
drwxr-xr-x 3 root root 4096 Feb 7 03:50 statechart
-rw-r--r-- 1 root root 5244 Jan 5 2012 static_assert.hpp
-rw-r--r-- 1 root root 3391 Jan 5 2012 strong_typedef.hpp
-rw-r--r-- 1 root root 287 Jan 5 2012 swap.hpp
drwxr-xr-x 2 root root 4096 Feb 7 03:51 system
drwxr-xr-x 7 root root 4096 Feb 7 03:51 test
drwxr-xr-x 5 root root 4096 Feb 7 03:51 thread
-rw-r--r-- 1 root root 839 Jan 5 2012 thread.hpp
-rw-r--r-- 1 root root 2652 Jan 5 2012 throw_exception.hpp
drwxr-xr-x 2 root root 4096 Feb 7 03:50 timer
-rw-r--r-- 1 root root 2663 Jan 5 2012 timer.hpp
-rw-r--r-- 1 root root 19728 Jan 5 2012 token_functions.hpp
-rw-r--r-- 1 root root 3742 Jan 5 2012 token_iterator.hpp
-rw-r--r-- 1 root root 2783 Jan 5 2012 tokenizer.hpp
drwxr-xr-x 4 root root 4096 Feb 7 03:50 tr1
drwxr-xr-x 3 root root 4096 Feb 7 03:51 tuple
-rw-r--r-- 1 root root 481 Jan 5 2012 type.hpp
drwxr-xr-x 5 root root 4096 Feb 7 03:51 typeof
drwxr-xr-x 4 root root 12288 Feb 7 03:51 type_traits
-rw-r--r-- 1 root root 4264 Jan 5 2012 type_traits.hpp
drwxr-xr-x 6 root root 4096 Feb 7 03:51 units
drwxr-xr-x 3 root root 4096 Feb 7 03:50 unordered
-rw-r--r-- 1 root root 550 Jan 5 2012 unordered_map.hpp
-rw-r--r-- 1 root root 550 Jan 5 2012 unordered_set.hpp
drwxr-xr-x 3 root root 4096 Feb 7 03:51 utility
-rw-r--r-- 1 root root 739 Jan 5 2012 utility.hpp
drwxr-xr-x 2 root root 4096 Feb 7 03:50 uuid
drwxr-xr-x 3 root root 4096 Feb 7 03:50 variant
-rw-r--r-- 1 root root 883 Jan 5 2012 variant.hpp
-rw-r--r-- 1 root root 1124 Jan 5 2012 version.hpp
-rw-r--r-- 1 root root 719 Jan 5 2012 visit_each.hpp
drwxr-xr-x 5 root root 4096 Feb 7 03:50 wave
-rw-r--r-- 1 root root 926 Jan 5 2012 wave.hpp
-rw-r--r-- 1 root root 474 Jan 5 2012 weak_ptr.hpp
drwxr-xr-x 4 root root 4096 Feb 7 03:50 xpressive
Go Bears >pwd
/usr/include/boost
I may be terribly wrong, but I believe that I have already installed
Boost C++ Libraries.
When I followed your instructions to install it (again), I couldn't.
Here is the transcript from the Terminal.
Go Bears >sudo apt-get install libboost-system-dev
[sudo] password for arvind:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libboost-system-dev : Depends: libboost-system1.46-dev but it is not
going to be installed
E: Unable to correct problems, you have held broken packages.
Go Bears >
Can you please kindly tell me where did I go wrong, and what is
wrong? Can you also please kindly tell me how can I compile my C++
code that uses Boost C++ Libraries?
Thank you very much, and have an awesome day!
Regards
On Thu, Feb 7, 2013 at 6:18 AM, Mateusz Loskot
On 7 February 2013 10:06, Giovanni
wrote: Greetings, I cannot compile my Boost C++ code.
Do you mean Boost C++ code, thus building Boost libraries, or you mean your code that *uses* Boost libraries? Unclear.
Initially, it complains of “undefined reference”. When I try to resolve this by including the library, I get the "/usr/bin/ld: cannot find -lboost_system" error.
So, looks like the former, you are trying to use the libraries.
From the Terminal: Go Bears >echo $LD_LIBRARY_PATH /usr/lib/libboost_system.so
Where do you get this from?
"LD_LIBRARY_PATH, which is a colon-separated list of directories" [1]
[1] http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html
Go Bears >make all g++ -L/usr/lib -lboost_system get_sys_info.cpp
Have you installed it first?
sudo apt-get install libboost-system-dev
Best regards, -- Mateusz Loskot, http://mateusz.loskot.net
On 7 February 2013 15:21, Giovanni
I had set the shell variable $LD_LIBRARY_PATH to: /usr/lib/libboost_system.so. It was originally empty. I used the "echo" command to reflect the path that I had set it to.
I tried to make a point not about how you did set the variable, but about the fact it has incorrect value. Let me copy it once again: "LD_LIBRARY_PATH, which is a colon-separated list of directories" [1] [1] http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html And you may learn from that what the LD_LIBRARY_PATH is meant to be.
I had installed it with Ubuntu Software Center. Here is a snippet of: /usr/lib [...] -rw-r--r-- 1 root root 14568 Jan 2 2012 libboost_system.so.1.46.1 -rw-r--r-- 1 root root 14568 Jan 5 2012 libboost_system.so.1.48.0
You seem to be missing libboost_system.so library or symlink named libboost_system.so with one of the two as a target. It may look the installation is broken.
When I followed your instructions to install it (again), I couldn't. Here is the transcript from the Terminal. Go Bears >sudo apt-get install libboost-system-dev [sudo] password for arvind: Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:
The following packages have unmet dependencies: libboost-system-dev : Depends: libboost-system1.46-dev but it is not going to be installed E: Unable to correct problems, you have held broken packages.
Clearly, something is broken with installation of boost packages in your system. You should seek for help from Ubuntu folks, it's unrelated to Boost. Best regards, -- Mateusz Loskot, http://mateusz.loskot.net
participants (2)
-
Giovanni
-
Mateusz Loskot