c++ boost 1_46_1 on OSX 10.6.6. not linking - c++

i downloaded c++ boost 1_46_1. unzipped it and followed the installation instructions.
i have tried to get a basic boost program to compile and link, but with no luck so far.
here it the boost program
#include <boost/program_options.hpp>
namespace po = boost::program_options;
#include <iostream>
#include <iterator>
using namespace std;
int main(int ac, char* av[])
{
try {
po::options_description desc("Allowed options");
desc.add_options()
("help", "produce help message")
("compression", po::value<int>(), "set compression level")
;
po::variables_map vm;
po::store(po::parse_command_line(ac, av, desc), vm);
po::notify(vm);
if (vm.count("help")) {
cout << desc << "\n";
return 1;
}
if (vm.count("compression")) {
cout << "Compression level was set to "
<< vm["compression"].as<int>() << ".\n";
} else {
cout << "Compression level was not set.\n";
}
}
catch(exception& e) {
cerr << "error: " << e.what() << "\n";
return 1;
}
catch(...) {
cerr << "Exception of unknown type!\n";
}
return 0;
}
here is my makefile
# compiler to use
CC = c++
INC = -I ~/usr/local/boost_1_46_1
#-I /usr/include/c++/4.2.1
LIB=-L~/usr/local/boost_1_46_1/stage/lib
#LIB =-Lusr/local/lib
#LIBNAME =-libboost_program_options.dylib
SOURCE = main.cpp
OUTPUT = out
all:
$(CC) $(INC) $(SOURCE) -o $(OUTPUT) -v $(LIB) -dynamic
here is the error i get
Using built-in specs. Target: i686-apple-darwin10 Configured with: /var/tmp/gcc/gcc-5664~89/src/configure
--disable-checking --enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/
--with-slibdir=/usr/lib --build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1 Thread model: posix gcc version 4.2.1 (Apple Inc. build 5664) /usr/libexec/gcc/i686-apple-darwin10/4.2.1/cc1plus
-quiet -v -I /Users/smith/usr/local/boost_1_46_1
-imultilib x86_64 -D__DYNAMIC__ main.cpp -fPIC -quiet -dumpbase main.cpp -mmacosx-version-min=10.6.6
-m64 -mtune=core2 -auxbase main -version -D__private_extern__=extern -o /var/folders/y7/y7wCKCc3HJWLBAK5YLrg5E+++TI/-Tmp-//ccumV5Oo.s ignoring nonexistent directory "/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../../i686-apple-darwin10/include" ignoring nonexistent directory "/Users/smith/usr/local/boost_1_46_1"
#include "..." search starts here:
#include <...> search starts here: /usr/include/c++/4.2.1 /usr/include/c++/4.2.1/i686-apple-darwin10/x86_64 /usr/include/c++/4.2.1/backward /usr/local/include /usr/lib/gcc/i686-apple-darwin10/4.2.1/include /usr/include /System/Library/Frameworks (framework directory) /Library/Frameworks (framework directory) End of search list. GNU C++ version 4.2.1 (Apple Inc. build 5664) (i686-apple-darwin10) compiled by GNU C version 4.2.1 (Apple Inc. build 5664). GGC heuristics: --param ggc-min-expand=150
--param ggc-min-heapsize=131072 Compiler executable checksum: 35e7c8ac2c3562481c35a1833320fc34 /usr/libexec/gcc/i686-apple-darwin10/4.2.1/as
-arch x86_64 -force_cpusubtype_ALL -o /var/folders/y7/y7wCKCc3HJWLBAK5YLrg5E+++TI/-Tmp-//cce6AA55.o /var/folders/y7/y7wCKCc3HJWLBAK5YLrg5E+++TI/-Tmp-//ccumV5Oo.s /usr/libexec/gcc/i686-apple-darwin10/4.2.1/collect2
-dynamic -arch x86_64 -dynamic -macosx_version_min 10.6.6 -weak_reference_mismatches non-weak -o out -lcrt1.10.6.o
-L~/usr/local/boost_1_46_1/stage/lib -L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64
-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64
-L/usr/lib/i686-apple-darwin10/4.2.1 -L/usr/lib/gcc/i686-apple-darwin10/4.2.1
-L/usr/lib/gcc/i686-apple-darwin10/4.2.1
-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../i686-apple-darwin10/4.2.1 -L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../.. /var/folders/y7/y7wCKCc3HJWLBAK5YLrg5E+++TI/-Tmp-//cce6AA55.o
-lstdc++ -lSystem -lgcc -lSystem ld: warning: directory '~/usr/local/boost_1_46_1/stage/lib' following -L not found Undefined symbols: "boost::program_options::operator<<(std::basic_ostream<char, std::char_traits<char> >&, boost::program_options::options_description const&)", referenced from:
_main in cce6AA55.o "vtable for boost::program_options::variables_map", referenced from:
boost::program_options::variables_map::~variables_map()in cce6AA55.o "boost::program_options::detail::cmdline::set_additional_parser(boost::function1<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>)", referenced from:
boost::program_options::basic_command_line_parser<char>::extra_parser(boost::function1<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>)in cce6AA55.o "typeinfo for boost::program_options::validation_error", referenced from:
typeinfo for boost::exception_detail::error_info_injector<boost::program_options::validation_error>in cce6AA55.o
typeinfo for boost::program_options::invalid_option_valuein cce6AA55.o "boost::program_options::detail::cmdline::cmdline(std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)", referenced from:
boost::program_options::basic_command_line_parser<char>::basic_command_line_parser(int, char const* const*)in cce6AA55.o "boost::program_options::options_description_easy_init::operator()(char const*, char const*)", referenced from:
_main in cce6AA55.o "boost::program_options::value_semantic_codecvt_helper<char>::parse(boost::any&, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool) const", referenced from:
vtable for boost::program_options::typed_value<int, char>in cce6AA55.o "boost::program_options::detail::cmdline::style(int)", referenced from:
boost::program_options::basic_command_line_parser<char>::style(int)in cce6AA55.o "boost::program_options::to_internal(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from:
std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > boost::program_options::to_internal<std::basic_string<char, std::char_traits<char>, std::allocator<char> >
>(std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)in cce6AA55.o "boost::program_options::notify(boost::program_options::variables_map&)", referenced from:
_main in cce6AA55.o "boost::program_options::options_description_easy_init::operator()(char const*, boost::program_options::value_semantic const*, char const*)", referenced from:
_main in cce6AA55.o "boost::program_options::store(boost::program_options::basic_parsed_options<char> const&, boost::program_options::variables_map&, bool)", referenced from:
_main in cce6AA55.o "boost::program_options::arg", referenced from:
boost::program_options::typed_value<int, char>::name() constin cce6AA55.o
boost::program_options::typed_value<int, char>::name() constin cce6AA55.o "vtable for boost::program_options::value_semantic_codecvt_helper<char>", referenced from:
boost::program_options::value_semantic_codecvt_helper<char>::value_semantic_codecvt_helper()in cce6AA55.o
boost::program_options::value_semantic_codecvt_helper<char>::~value_semantic_codecvt_helper()in cce6AA55.o "typeinfo for boost::program_options::value_semantic_codecvt_helper<char>", referenced from:
typeinfo for boost::program_options::typed_value<int, char>in cce6AA55.o "boost::program_options::options_description::add_options()", referenced from:
_main in cce6AA55.o "boost::program_options::validation_error::validation_error(boost::program_options::validation_error::kind_t, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from:
std::basic_string<char, std::char_traits<char>, std::allocator<char> > const& boost::program_options::validators::get_single_string<char>(std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool)in cce6AA55.o
std::basic_string<char, std::char_traits<char>, std::allocator<char> > const& boost::program_options::validators::get_single_string<char>(std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool)in cce6AA55.o "vtable for boost::program_options::validation_error", referenced from:
boost::program_options::validation_error::~validation_error()in cce6AA55.o
boost::program_options::validation_error::~validation_error()in cce6AA55.o
boost::program_options::validation_error::validation_error(boost::program_options::validation_error const&)in cce6AA55.o "boost::program_options::validation_error::what() const", referenced from:
vtable for boost::exception_detail::error_info_injector<boost::program_options::validation_error>in cce6AA55.o
vtable for boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::program_options::validation_error>
>in cce6AA55.o
vtable for boost::exception_detail::error_info_injector<boost::program_options::invalid_option_value>in cce6AA55.o
vtable for boost::program_options::invalid_option_valuein cce6AA55.o
vtable for boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::program_options::invalid_option_value>
>in cce6AA55.o "boost::program_options::variables_map::variables_map()", referenced from:
_main in cce6AA55.o "boost::program_options::options_description::options_description(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int)", referenced from:
_main in cce6AA55.o "boost::program_options::detail::cmdline::run()", referenced from:
boost::program_options::basic_command_line_parser<char>::run() in cce6AA55.o "boost::program_options::invalid_option_value::invalid_option_value(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from:
void boost::program_options::validate<int, char>(boost::any&, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, int*, long)in cce6AA55.o "boost::program_options::options_description::m_default_line_length", referenced from:
_main in cce6AA55.o
_main in cce6AA55.o "boost::program_options::detail::cmdline::set_options_description(boost::program_options::options_description const&)", referenced from:
boost::program_options::basic_command_line_parser<char>::options(boost::program_options::options_description const&)in cce6AA55.o "boost::program_options::validators::check_first_occurrence(boost::any const&)", referenced from:
void boost::program_options::validate<int, char>(boost::any&, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, int*, long)in cce6AA55.o "boost::program_options::abstract_variables_map::operator[](std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const", referenced from:
boost::program_options::variables_map::operator[](std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) constin cce6AA55.o ld: symbol(s) not found collect2: ld returned 1 exit status make: *** [all] Error 1

You lack -lboost_program_options
all:
$(CC) $(INC) $(SOURCE) -o $(OUTPUT) $(LIB) -lboost_program_options -dynamic

you are providing linker with wrong path:
warning: directory '~/usr/local/boost_1_46_1/stage/lib' following -L not found
results in not linking your objects

The linker output includes the line:
ignoring nonexistent directory "/Users/smith/usr/local/boost_1_46_1"
so there is some mismatch between where you expect the libraries to be and where they actually are...

Related

Issue installing openmp on mac using homebrew

I'm trying to use Openmp on my mac, but i'm getting a compiler error I don't understand. I installed openmp using
brew install llvm
When I try to compile my code using -fopenmp I get errors like this
Undefined symbols for architecture x86_64:
"std::runtime_error::what() const", referenced from:
vtable for boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> > in ccOEbbPM.o
vtable for boost::exception_detail::error_info_injector<std::runtime_error> in ccOEbbPM.o
vtable for boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::range_error> > in ccOEbbPM.o
vtable for boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::overflow_error> > in ccOEbbPM.o
vtable for boost::exception_detail::error_info_injector<std::range_error> in ccOEbbPM.o
vtable for boost::exception_detail::error_info_injector<std::overflow_error> in ccOEbbPM.o
"std::locale::operator==(std::locale const&) const", referenced from:
boost::detail::lcast_put_unsigned<std::char_traits<char>, unsigned long long, char>::convert() in ccOEbbPM.o
"std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find_first_not_of(char, unsigned long) const", referenced from:
boost::multiprecision::backends::cpp_int_backend<0u, 0u, (boost::multiprecision::cpp_integer_type)1, (boost::multiprecision::cpp_int_check_type)0, std::allocator<unsigned long long> >::do_get_string[abi:cxx11](std::_Ios_Fmtflags, mpl_::bool_<false> const&) const in ccOEbbPM.o
"std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::size() const", referenced from:
std::basic_ostream<char, std::char_traits<char> >& boost::multiprecision::operator<< <boost::multiprecision::backends::cpp_int_backend<0u, 0u, (boost::multiprecision::cpp_integer_type)1, (boost::multiprecision::cpp_int_check_type)0, std::allocator<unsigned long long> >, (boost::multiprecision::expression_template_option)1>(std::basic_ostream<char, std::char_traits<char> >&, boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<0u, 0u, (boost::multiprecision::cpp_integer_type)1, (boost::multiprecision::cpp_int_check_type)0, std::allocator<unsigned long long> >, (boost::multiprecision::expression_template_option)1> const&) in ccOEbbPM.o
It's just a small segment of the error code since it goes on for quite a while, but I post the rest if need be. I also have the boost library installed.
Any help is appreciated, thanks.
EDIT:
Simple program that causes the error:
#include <iostream>
#include <omp.h>
using namespace std;
int main(){
int x = 5;
#pragma omp parallel
for(int y = 0; y < 50;y++){
x += 5;
}
cout << x << endl;
return 0;
}
Commands used to compile:
gcc-7 -fopenmp -Wall ex.cc
gcc-7 -std=c++11 -fopenmp -Wall ex.cc (I get less errors doing it this way)
Error when using the second compile command:
Undefined symbols for architecture x86_64:
"std::basic_ostream<char, std::char_traits<char> >::operator<<(std::basic_ostream<char, std::char_traits<char> >& (*)
(std::basic_ostream<char, std::char_traits<char> >&))", referenced from:
_main in ccXt8Pa8.o
"std::basic_ostream<char, std::char_traits<char> >::operator<<(int)", referenced from:
_main in ccXt8Pa8.o
"std::ios_base::Init::Init()", referenced from:
__static_initialization_and_destruction_0(int, int) in ccXt8Pa8.o
"std::ios_base::Init::~Init()", referenced from:
__static_initialization_and_destruction_0(int, int) in ccXt8Pa8.o
"std::cout", referenced from:
_main in ccXt8Pa8.o
"std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)", referenced from:
_main in ccXt8Pa8.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
Use g++-7 rather than gcc-7, and all will be fine - it is C++ after all ;-)
g++-7 -std=c++11 -fopenmp openmp.cpp -o openmp

googletest Undefined symbols for architecture x86_64 error

Let GTEST_DIR be the environment variable storing the path to the googletest directory. (I cloned googletest-master from googletest's github repo.)
I cd'ed into $GTEST_DIR, did a mkdir build && cd build, then executed the following command :
cmake .. -DCMAKE_C_COMPILER=$GNU-6.0.0/bin/gcc-6.0.0 -DCMAKE_CXX_COMPILER=$GNU-6.0.0/bin/g++-6.0.0
where GNU-6.0.0 is the path to my gnu install. This generated a Makefile inside $GTEST_DIR/build that I tweaked as follows : I've added
CC = $GNU-6.0.0/bin/gcc-6.0.0
CXX = $GNU-6.0.0/bin/g++-6.0.0
at its beginning, to be sure that the c and c++ compilers that will be used will be those I want to be used. Then I ran make which produced archive files libgtest.a and libgtest_main.a inside $GTEST_DIR/build.
Next step : in a same folder I put a main test source file main.cpp containg :
#include "path/to/gtest.h"
int main(int argc, char* argv[])
{
::testing::InitGoogleTest(&argc,argv);
return RUN_ALL_TESTS();
}
and a dummy test dummy_test.cpp containing :
#include "path/to/gtest.h"
TEST(dummy_test, test1)
{
EXPECT_EQ(1,1);
}
and a Makefile containing :
CC = gcc-6.0.0
CXX = g++-6.0.0
CPPFLAGS += -isystem $(GTEST_DIR)/include
LDFLAGS := -L/usr/lib -lpthread -L$(GTEST_DIR)/build -lgtest
all :
$(CXX) -o cpptests $(CPPFLAGS) ./main.cpp ./dummy_test.cpp $(LDFLAGS)
clean :
rm -rf ./cpptests
Running make I have this output :
Undefined symbols for architecture x86_64:
"std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::end() const", referenced from:
testing::internal::XmlUnitTestResultPrinter::RemoveInvalidXmlCharacters(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in libgtest.a(gtest-all.cc.o)
"std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::data() const", referenced from:
testing::internal::PrintStringTo(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_ostream<char, std::char_traits<char> >*) in libgtest.a(gtest-all.cc.o)
__gnu_cxx::__enable_if<std::__is_char<char>::__value, bool>::__type std::operator==<char>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in libgtest.a(gtest-all.cc.o)
"std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long) const", referenced from:
bool testing::(anonymous namespace)::IsSubstringPred<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in libgtest.a(gtest-all.cc.o)
"std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find(char, unsigned long) const", referenced from:
testing::internal::SplitString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >*) in libgtest.a(gtest-all.cc.o)
testing::internal::FormatDeathTestOutput(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in libgtest.a(gtest-all.cc.o)
"std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::size() const", referenced from:
testing::internal::(anonymous namespace)::SplitEscapedString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in libgtest.a(gtest-all.cc.o)
...
...
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make: *** [all] Error 1
The entire output is in this snippet while the output of nm libgtest.a is in this snippet.
Precision : I am under mac os x 10.10.5. As I want to continue working, developping code and testing it, while the aforementionned error with gcc/g++ 6.0.0 is solved, I tried to switch to another compiler : clang, and I remarked that I had no error at all with it.
Remark libgtest.a was initially (that is, before I asked this question) built "by error" with clang and used in tests with g++-6.1.0 when I encountered the error, that's why I decided to rebuild libgtest.a with g++-6.1.0, thinking that it would solve the problem, but it didn't, which led me to post here.
The problem seems to be due to some linking issues. Have you used the linker flags correctly. For gtest, we need to compile with -lgtest and the linker can link it correctly. Similarly, we need to have the flags for all possible libraries that we are linking against.
The code
TEST(dummy_test, test1) {
EXPECT_EQ(1,1); }
int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS(); }
compiles perfectly for me with command
clang++ -std=c++11 main.cpp -lgtest
and I could run the single test without an issue.
I was getting following error
Undefined symbols for architecture x86_64:
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
with the command
/usr/bin/g++ -g testgoogletestsetup.cpp -std=c++11 -o testgoogletestsetup -lgtest
Solution:
Library gtest_main needs to be linked (and the library gtest too) to compile it successfully. For that provide the linker flags as -lgtest_main as shown in below command.
/usr/bin/g++ -g testgoogletestsetup.cpp -std=c++11 -o testgoogletestsetup -lgtest -lgtest_main

Error on C++'s Hello World

I started learning C++ and I tried to run the classic Hello World program:
#include <iostream>
using namespace std;
int main ()
{
cout << "Hello, World!";
return 0;
}
but when I compile it in terminal using GCC I always get that error:
Undefined symbols for architecture x86_64:
"std::basic_string<char, std::char_traits<char>, std::allocator<char> >::size() const", referenced from:
std::__verify_grouping(char const*, unsigned long, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in ccpe3DPY.o
"std::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned long) const", referenced from:
std::__verify_grouping(char const*, unsigned long, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in ccpe3DPY.o
"std::cout", referenced from:
_main in ccpe3DPY.o
"std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)", referenced from:
_main in ccpe3DPY.o
"std::ios_base::Init::Init()", referenced from:
__static_initialization_and_destruction_0(int, int)in ccpe3DPY.o
"std::ios_base::Init::~Init()", referenced from:
___tcf_0 in ccpe3DPY.o
"___gxx_personality_v0", referenced from:
Dwarf Exception Unwind Info (__eh_frame) in ccpe3DPY.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
can you tell me why?
You've compiled your program with gcc, which is a C compiler, not a C++ compiler. Use g++ instead; it knows to include the C++ run-time libraries, where those missing symbols are defined.
Thats a C compiler you need to use a C++ compiler like rob says above g++. Also if you are a beginner I would highly recommend using Microsoft visual studio express if you run a windows OS; if not then netbeans.

link fails with clang / llvm using g++

I'm trying to compile this .ccp file. I got it from https://github.com/loarabia/Clang-tutorial.
// This code is licensed under the New BSD license.
// See LICENSE.txt for more details.
#include <iostream>
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/Host.h"
#include "llvm/ADT/IntrusiveRefCntPtr.h"
#include "clang/Frontend/DiagnosticOptions.h"
#include "clang/Frontend/TextDiagnosticPrinter.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/FileSystemOptions.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Lex/HeaderSearch.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/TargetOptions.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Frontend/CompilerInstance.h"
int main()
{
clang::DiagnosticOptions diagnosticOptions;
clang::TextDiagnosticPrinter *pTextDiagnosticPrinter =
new clang::TextDiagnosticPrinter(
llvm::outs(),
diagnosticOptions);
llvm::IntrusiveRefCntPtr<clang::DiagnosticIDs> pDiagIDs;
//clang::DiagnosticIDs diagIDs;
clang::DiagnosticsEngine *pDiagnosticsEngine =
new clang::DiagnosticsEngine(pDiagIDs, pTextDiagnosticPrinter);
clang::LangOptions languageOptions;
clang::FileSystemOptions fileSystemOptions;
clang::FileManager fileManager(fileSystemOptions);
clang::SourceManager sourceManager(
*pDiagnosticsEngine,
fileManager);
clang::HeaderSearch headerSearch(fileManager, *pDiagnosticsEngine);
clang::TargetOptions targetOptions;
targetOptions.Triple = llvm::sys::getDefaultTargetTriple();
clang::TargetInfo *pTargetInfo =
clang::TargetInfo::CreateTargetInfo(
*pDiagnosticsEngine,
targetOptions);
clang::CompilerInstance compInst;
clang::Preprocessor preprocessor(
*pDiagnosticsEngine,
languageOptions,
pTargetInfo,
sourceManager,
headerSearch,
compInst);
return 0;
}
And I use g++ compile line like this:
g++ tutorial1.cpp -g -fno-rtti `llvm-config --cxxflags --ldflags --libs` -lclangBasic
-lclangLex -lclangDriver -lclangFrontend -lclangParse -lclangAST -lclangSema
-lclangAnalysis -I ../llvm/tools/clang/include/
-I/Users/scher/Documents/Projects/task/C/last_clang/llvm/include
-I/Users/scher/Documents/Projects/task/C/last_clang/build/include
-I/Users/scher/Documents/Projects/task/C/last_clang/build/tools/clang/include
But it fails with the following report:
Undefined symbols for architecture x86_64:
"clang::serialization::ModuleManager::lookup(llvm::StringRef)", referenced from:
clang::ASTUnit::TranslateStoredDiagnostics(clang::ASTReader*, llvm::StringRef, clang::SourceManager&, llvm::SmallVectorImpl<clang::StoredDiagnostic> const&, llvm::SmallVectorImpl<clang::StoredDiagnostic>&)in libclangFrontend.a(ASTUnit.o)
"clang::ASTWriter::ASTWriter(llvm::BitstreamWriter&)", referenced from:
clang::ASTUnit::serialize(llvm::raw_ostream&) in libclangFrontend.a(ASTUnit.o)
"clang::ASTWriter::WriteAST(clang::Sema&, clang::MemorizeStatCalls*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, clang::Module*, llvm::StringRef)", referenced from:
clang::ASTUnit::serialize(llvm::raw_ostream&) in libclangFrontend.a(ASTUnit.o)
"clang::ASTWriter::~ASTWriter()", referenced from:
clang::ASTUnit::serialize(llvm::raw_ostream&) in libclangFrontend.a(ASTUnit.o)
"clang::PCHGenerator::PCHGenerator(clang::Preprocessor const&, llvm::StringRef, clang::Module*, llvm::StringRef, llvm::raw_ostream*)", referenced from:
(anonymous namespace)::PrecompilePreambleConsumer::PrecompilePreambleConsumer(clang::ASTUnit&, clang::Preprocessor const&, llvm::StringRef, llvm::raw_ostream*)in libclangFrontend.a(ASTUnit.o)
"clang::PCHGenerator::HandleTranslationUnit(clang::ASTContext&)", referenced from:
(anonymous namespace)::PrecompilePreambleConsumer::HandleTranslationUnit(clang::ASTContext&)in libclangFrontend.a(ASTUnit.o)
"clang::ASTWriter::getDeclID(clang::Decl const*)", referenced from:
(anonymous namespace)::PrecompilePreambleConsumer::HandleTranslationUnit(clang::ASTContext&)in libclangFrontend.a(ASTUnit.o)
"clang::PCHGenerator::~PCHGenerator()", referenced from:
(anonymous namespace)::PrecompilePreambleConsumer::~PrecompilePreambleConsumer()in libclangFrontend.a(ASTUnit.o)
"vtable for clang::ASTReaderListener", referenced from:
clang::ASTReaderListener::ASTReaderListener()in libclangFrontend.a(ASTUnit.o)
"clang::ASTReaderListener::~ASTReaderListener()", referenced from:
(anonymous namespace)::ASTInfoCollector::~ASTInfoCollector()in libclangFrontend.a(ASTUnit.o)
"clang::PCHGenerator::GetASTMutationListener()", referenced from:
vtable for (anonymous namespace)::PrecompilePreambleConsumerin libclangFrontend.a(ASTUnit.o)
"clang::PCHGenerator::GetASTDeserializationListener()", referenced from:
vtable for (anonymous namespace)::PrecompilePreambleConsumerin libclangFrontend.a(ASTUnit.o)
"clang::serialization::ModuleManager::addInMemoryBuffer(llvm::StringRef, llvm::MemoryBuffer*)", referenced from:
clang::ASTReader::addInMemoryBuffer(llvm::StringRef&, llvm::MemoryBuffer*) in libclangFrontend.a(ChainedIncludesSource.o)
"clang::ASTReader::ASTReader(clang::Preprocessor&, clang::ASTContext&, llvm::StringRef, bool, bool)", referenced from:
clang::CompilerInstance::createPCHExternalASTSource(llvm::StringRef, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool, clang::Preprocessor&, clang::ASTContext&, void*, bool)in libclangFrontend.a(CompilerInstance.o)
clang::CompilerInstance::loadModule(clang::SourceLocation, llvm::ArrayRef<std::pair<clang::IdentifierInfo*, clang::SourceLocation> >, clang::Module::NameVisibilityKind, bool)in libclangFrontend.a(CompilerInstance.o)
clang::ASTUnit::LoadFromASTFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, llvm::IntrusiveRefCntPtr<clang::DiagnosticsEngine>, clang::FileSystemOptions const&, bool, std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, llvm::PointerUnion<char const*, llvm::MemoryBuffer const*> >*, unsigned int, bool)in libclangFrontend.a(ASTUnit.o)
createASTReader(clang::CompilerInstance&, llvm::StringRef, llvm::SmallVector<llvm::MemoryBuffer*, 4u>&, llvm::SmallVector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, 4u>&, clang::ASTDeserializationListener*)in libclangFrontend.a(ChainedIncludesSource.o)
"clang::ASTReader::setDeserializationListener(clang::ASTDeserializationListener*)", referenced from:
clang::CompilerInstance::createPCHExternalASTSource(llvm::StringRef, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool, clang::Preprocessor&, clang::ASTContext&, void*, bool)in libclangFrontend.a(CompilerInstance.o)
clang::CompilerInstance::loadModule(clang::SourceLocation, llvm::ArrayRef<std::pair<clang::IdentifierInfo*, clang::SourceLocation> >, clang::Module::NameVisibilityKind, bool)in libclangFrontend.a(CompilerInstance.o)
createASTReader(clang::CompilerInstance&, llvm::StringRef, llvm::SmallVector<llvm::MemoryBuffer*, 4u>&, llvm::SmallVector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, 4u>&, clang::ASTDeserializationListener*)in libclangFrontend.a(ChainedIncludesSource.o)
"clang::ASTReader::ReadAST(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, clang::serialization::ModuleKind)", referenced from:
clang::CompilerInstance::createPCHExternalASTSource(llvm::StringRef, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool, clang::Preprocessor&, clang::ASTContext&, void*, bool)in libclangFrontend.a(CompilerInstance.o)
clang::CompilerInstance::loadModule(clang::SourceLocation, llvm::ArrayRef<std::pair<clang::IdentifierInfo*, clang::SourceLocation> >, clang::Module::NameVisibilityKind, bool)in libclangFrontend.a(CompilerInstance.o)
clang::ASTUnit::LoadFromASTFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, llvm::IntrusiveRefCntPtr<clang::DiagnosticsEngine>, clang::FileSystemOptions const&, bool, std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, llvm::PointerUnion<char const*, llvm::MemoryBuffer const*> >*, unsigned int, bool)in libclangFrontend.a(ASTUnit.o)
createASTReader(clang::CompilerInstance&, llvm::StringRef, llvm::SmallVector<llvm::MemoryBuffer*, 4u>&, llvm::SmallVector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, 4u>&, clang::ASTDeserializationListener*)in libclangFrontend.a(ChainedIncludesSource.o)
"clang::ASTReader::makeModuleVisible(clang::Module*, clang::Module::NameVisibilityKind)", referenced from:
clang::CompilerInstance::loadModule(clang::SourceLocation, llvm::ArrayRef<std::pair<clang::IdentifierInfo*, clang::SourceLocation> >, clang::Module::NameVisibilityKind, bool)in libclangFrontend.a(CompilerInstance.o)
"clang::ASTReader::getOriginalSourceFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, clang::FileManager&, clang::DiagnosticsEngine&)", referenced from:
ParsePreprocessorArgs(clang::PreprocessorOptions&, clang::driver::ArgList&, clang::FileManager&, clang::DiagnosticsEngine&)in libclangFrontend.a(CompilerInvocation.o)
"clang::ASTDeserializationListener::~ASTDeserializationListener()", referenced from:
(anonymous namespace)::DelegatingDeserializationListener::~DelegatingDeserializationListener()in libclangFrontend.a(FrontendAction.o)
clang::MultiplexASTDeserializationListener::~MultiplexASTDeserializationListener()in libclangFrontend.a(MultiplexConsumer.o)
"vtable for clang::ASTDeserializationListener", referenced from:
clang::ASTDeserializationListener::ASTDeserializationListener()in libclangFrontend.a(FrontendAction.o)
clang::ASTDeserializationListener::ASTDeserializationListener()in libclangFrontend.a(MultiplexConsumer.o)
"clang::PCHGenerator::PCHGenerator(clang::Preprocessor const&, llvm::StringRef, clang::Module*, llvm::StringRef, llvm::raw_ostream*)", referenced from:
clang::GeneratePCHAction::CreateASTConsumer(clang::CompilerInstance&, llvm::StringRef) in libclangFrontend.a(FrontendActions.o)
clang::GenerateModuleAction::CreateASTConsumer(clang::CompilerInstance&, llvm::StringRef) in libclangFrontend.a(FrontendActions.o)
clang::ChainedIncludesSource::create(clang::CompilerInstance&) in libclangFrontend.a(ChainedIncludesSource.o)
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
I'd like to add that it occurs, when you add this clang::CompilerInstance compInst; line of code. Without this line it compiles normally.
Also I use clang/llvm 3.0, It was built using this tutorial http://clang.llvm.org/get_started.html
Any suggestions why it could fails?
You probably aren't listing the right libraries in the correct order. I don't know what the correct list is off the top of my head, but at the very least you're missing -lclangSerialization.
The order of libraries in the command line might be wrong. Try using the makefile given in the project - https://github.com/loarabia/Clang-tutorial/blob/master/makefile. Just copy the makefile to your directory and run make.

"symbol(s) not found for architecture x86_64" when trying to build using Make on Mac OS X Lion

I'm having problems to build the Robocup Soccer Server (rcssserver 15.0.1) on Mac OS X Lion.
I think the problem is with Boost.
The following is the output of the "make" (second try, to display just the errors) command:
make all-recursive
Making all in rcssbase
Making all in net
make[3]: Nothing to be done for `all'.
Making all in conf
make[3]: Nothing to be done for `all'.
Making all in gzip
make[3]: Nothing to be done for `all'.
make[3]: Nothing to be done for `all-am'.
Making all in src
make all-am
/bin/sh ../libtool --tag=CXX --mode=link g++ -W -Wall -g -O2 -L../rcssbase/conf -L../rcssbase/net -L../rcssbase/gzip -L/usr/local/lib64 -o rcssserver audio.o bodysender.o coach.o csvsaver.o dispsender.o field.o fullstatesender.o heteroplayer.o initsender.o initsendercoach.o initsenderlogger.o initsendermonitor.o initsenderonlinecoach.o initsenderplayer.o landmarkreader.o logger.o main.o monitor.o netif.o pcombuilder.o pcomparser.o player.o playerparam.o object.o referee.o remoteclient.o resultsaver.o serializer.o serializercoachstdv1.o serializercoachstdv7.o serializercoachstdv8.o serializercoachstdv13.o serializercoachstdv14.o serializercommonstdv1.o serializercommonstdv7.o serializercommonstdv8.o serializermonitor.o serializeronlinecoachstdv1.o serializeronlinecoachstdv6.o serializeronlinecoachstdv7.o serializeronlinecoachstdv8.o serializeronlinecoachstdv13.o serializeronlinecoachstdv14.o serializerplayerstdv1.o serializerplayerstdv7.o serializerplayerstdv8.o serializerplayerstdv13.o serializerplayerstdv14.o serverparam.o stadium.o stdoutsaver.o stdtimer.o synctimer.o team.o utility.o visualsendercoach.o visualsenderplayer.o weather.o xmlreader.o xpmholder.o player_command_parser.o player_command_tok.o -lrcssclangparser -lrcssconfparser -lrcssnet -lrcssgz -lz -lm
libtool: link: g++ -W -Wall -g -O2 -o .libs/rcssserver audio.o bodysender.o coach.o csvsaver.o dispsender.o field.o fullstatesender.o heteroplayer.o initsender.o initsendercoach.o initsenderlogger.o initsendermonitor.o initsenderonlinecoach.o initsenderplayer.o landmarkreader.o logger.o main.o monitor.o netif.o pcombuilder.o pcomparser.o player.o playerparam.o object.o referee.o remoteclient.o resultsaver.o serializer.o serializercoachstdv1.o serializercoachstdv7.o serializercoachstdv8.o serializercoachstdv13.o serializercoachstdv14.o serializercommonstdv1.o serializercommonstdv7.o serializercommonstdv8.o serializermonitor.o serializeronlinecoachstdv1.o serializeronlinecoachstdv6.o serializeronlinecoachstdv7.o serializeronlinecoachstdv8.o serializeronlinecoachstdv13.o serializeronlinecoachstdv14.o serializerplayerstdv1.o serializerplayerstdv7.o serializerplayerstdv8.o serializerplayerstdv13.o serializerplayerstdv14.o serverparam.o stadium.o stdoutsaver.o stdtimer.o synctimer.o team.o utility.o visualsendercoach.o visualsenderplayer.o weather.o xmlreader.o xpmholder.o player_command_parser.o player_command_tok.o -Wl,-bind_at_load -L/Users/samirkerbage/desenv/robocup/softwares/rcssserver-15.0.1/rcssbase/conf -L/Users/samirkerbage/desenv/robocup/softwares/rcssserver-15.0.1/rcssbase/net -L/Users/samirkerbage/desenv/robocup/softwares/rcssserver-15.0.1/rcssbase/gzip -L/usr/local/lib64 /Users/samirkerbage/desenv/robocup/softwares/rcssserver-15.0.1/src/.libs/librcssclangparser.dylib /Users/samirkerbage/desenv/robocup/softwares/rcssserver-15.0.1/rcssbase/conf/.libs/librcssconfparser.dylib /Users/samirkerbage/desenv/robocup/softwares/rcssserver-15.0.1/rcssbase/net/.libs/librcssnet.dylib /Users/samirkerbage/desenv/robocup/softwares/rcssserver-15.0.1/rcssbase/gzip/.libs/librcssgz.dylib -lz -lm
ld: warning: directory not found for option '-L/usr/local/lib64'
Undefined symbols for architecture x86_64:
"boost::system::generic_category()", referenced from:
__static_initialization_and_destruction_0(int, int)in audio.o
global constructors keyed to _ZN4rcss10BodySenderC2ERSoin bodysender.o
global constructors keyed to _ZN5CoachC2ER7Stadiumin coach.o
global constructors keyed to _ZN8CSVSaver4NAMEEin csvsaver.o
global constructors keyed to _ZN4rcss10DispSenderC2ERSoin dispsender.o
global constructors keyed to _ZN4rcss15FullStateSenderC2ERSoin fullstatesender.o
global constructors keyed to _ZN4rcss21InitSenderOnlineCoach7factoryEvin initsenderonlinecoach.o
...
"boost::system::system_category()", referenced from:
__static_initialization_and_destruction_0(int, int)in audio.o
global constructors keyed to _ZN4rcss10BodySenderC2ERSoin bodysender.o
global constructors keyed to _ZN5CoachC2ER7Stadiumin coach.o
global constructors keyed to _ZN8CSVSaver4NAMEEin csvsaver.o
global constructors keyed to _ZN4rcss10DispSenderC2ERSoin dispsender.o
global constructors keyed to _ZN4rcss15FullStateSenderC2ERSoin fullstatesender.o
global constructors keyed to _ZN4rcss21InitSenderOnlineCoach7factoryEvin initsenderonlinecoach.o
...
"boost::filesystem3::path::wchar_t_codecvt_facet()", referenced from:
CSVSaverParam::init(rcss::conf::Builder*) in csvsaver.o
boost::filesystem3::path::path<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::enable_if<boost::filesystem3::path_traits::is_pathable<boost::decay<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::type>, void>::type*)in csvsaver.o
boost::filesystem3::path::path<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::enable_if<boost::filesystem3::path_traits::is_pathable<boost::decay<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::type>, void>::type*)in logger.o
boost::enable_if<boost::filesystem3::path_traits::is_pathable<boost::decay<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::type>, boost::filesystem3::path&>::type boost::filesystem3::path::operator/=<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in logger.o
boost::filesystem3::path::path<char [31]>(char const (&) [31], boost::enable_if<boost::filesystem3::path_traits::is_pathable<boost::decay<char [31]>::type>, void>::type*)in playerparam.o
boost::filesystem3::path::path<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::enable_if<boost::filesystem3::path_traits::is_pathable<boost::decay<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::type>, void>::type*)in playerparam.o
boost::enable_if<boost::filesystem3::path_traits::is_pathable<boost::decay<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::type>, boost::filesystem3::path&>::type boost::filesystem3::path::operator/=<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in playerparam.o
...
"boost::filesystem3::path::m_append_separator_if_needed()", referenced from:
boost::filesystem3::path& boost::filesystem3::path::append<char [14]>(char const (&) [14], std::codecvt<wchar_t, char, __mbstate_t> const&)in csvsaver.o
boost::enable_if<boost::filesystem3::path_traits::is_pathable<boost::decay<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::type>, boost::filesystem3::path&>::type boost::filesystem3::path::operator/=<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in logger.o
boost::enable_if<boost::filesystem3::path_traits::is_pathable<boost::decay<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::type>, boost::filesystem3::path&>::type boost::filesystem3::path::operator/=<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in playerparam.o
boost::enable_if<boost::filesystem3::path_traits::is_pathable<boost::decay<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::type>, boost::filesystem3::path&>::type boost::filesystem3::path::operator/=<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in serverparam.o
"boost::filesystem3::path::m_erase_redundant_separator(unsigned long)", referenced from:
boost::filesystem3::path& boost::filesystem3::path::append<char [14]>(char const (&) [14], std::codecvt<wchar_t, char, __mbstate_t> const&)in csvsaver.o
boost::enable_if<boost::filesystem3::path_traits::is_pathable<boost::decay<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::type>, boost::filesystem3::path&>::type boost::filesystem3::path::operator/=<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in logger.o
boost::enable_if<boost::filesystem3::path_traits::is_pathable<boost::decay<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::type>, boost::filesystem3::path&>::type boost::filesystem3::path::operator/=<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in playerparam.o
boost::enable_if<boost::filesystem3::path_traits::is_pathable<boost::decay<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::type>, boost::filesystem3::path&>::type boost::filesystem3::path::operator/=<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in serverparam.o
"boost::filesystem3::detail::status(boost::filesystem3::path const&, boost::system::error_code*)", referenced from:
CSVSaver::openResultsFile() in csvsaver.o
Logger::openKawayLog() in logger.o
Logger::openTextLog() in logger.o
Logger::openGameLog() in logger.o
ServerParam::init(int const&, char const* const*)in serverparam.o
"boost::filesystem3::detail::create_directories(boost::filesystem3::path const&, boost::system::error_code*)", referenced from:
Logger::openKawayLog() in logger.o
Logger::openTextLog() in logger.o
Logger::openGameLog() in logger.o
ServerParam::init(int const&, char const* const*)in serverparam.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[3]: *** [rcssserver] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Does any of you guys have an idea to help me?
I just lost one night trying to figure this out!
Thanks!
It looks like either you failed to run ./configure or your makefiles are making Linux-specific assumptions about where 64-bit libraries are located, see in particular the error message:
ld: warning: directory not found for option '-L/usr/local/lib64'
Try running ./configure first and if that doesn't work then try doing a 32 bit build instead of 64 bit.