Undefined symbols for architecture x86_64:
"operator<<(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, __mpq_struct const*)", referenced from:
SymEngine::StrPrinter::bvisit(SymEngine::Rational const&) in libsymengine.a(printer.cpp.o)
SymEngine::StrPrinter::bvisit(SymEngine::Complex const&) in libsymengine.a(printer.cpp.o)
"operator<<(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, __mpz_struct const*)", referenced from:
SymEngine::UnivariateSeries::__str__() const in libsymengine.a(series_generic.cpp.o)
SymEngine::StrPrinter::bvisit(SymEngine::Integer const&) in libsymengine.a(printer.cpp.o)
SymEngine::StrPrinter::bvisit(SymEngine::UnivariatePolynomial const&) in libsymengine.a(printer.cpp.o)
operator<<(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, std::__1::map<std::__1::vector<int, std::__1::allocator<int> >, __gmp_expr<__mpz_struct [1], __mpz_struct [1]>, std::__1::less<std::__1::vector<int, std::__1::allocator<int> > >, std::__1::allocator<std::__1::pair<std::__1::vector<int, std::__1::allocator<int> > const, __gmp_expr<__mpz_struct [1], __mpz_struct [1]> > > > const&) in libsymengine.a(dict.cpp.o)
operator<<(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, std::__1::unordered_map<std::__1::vector<int, std::__1::allocator<int> >, __gmp_expr<__mpz_struct [1], __mpz_struct [1]>, SymEngine::vec_int_hash, std::__1::equal_to<std::__1::vector<int, std::__1::allocator<int> > >, std::__1::allocator<std::__1::pair<std::__1::vector<int, std::__1::allocator<int> > const, __gmp_expr<__mpz_struct [1], __mpz_struct [1]> > > > const&) in libsymengine.a(dict.cpp.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This is how I compile: g++ -std=c++11 -I/usr/local/include test2.cpp ~/symengine/symengine/libsymengine.a ~/symengine/symengine/utilities/teuchos/libteuchos.a /usr/local/Cellar/gmp/6.1.0/lib/libgmp.dylib
Any ideas on how to resolve? I only have the following line along with the necessary include guards:
RCP<Symbol> x(new Symbol("x"));--
You received this message because you are subscribed to the Google Groups "symengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to symengine+...@googlegroups.com.
To post to this group, send email to syme...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/symengine/f97b68f3-1238-4909-8f65-5d4555277ff9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/symengine/4f164449-3085-499f-84d1-62983fd53697%40googlegroups.com.
-- The C compiler identification is AppleClang 7.0.2.7000181
-- The CXX compiler identification is AppleClang 7.0.2.7000181
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 3.4)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/Charles/symengine/symengine
g++ --version:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/c++/4.2.1
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.3.0
Thread model: posix
Yes it's using clang. However that should not be a problem.
To view this discussion on the web visit https://groups.google.com/d/msgid/symengine/2965986c-69dd-41c3-9dcd-cbe27a82b34d%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/symengine/76f6e8bf-1977-454d-9a3b-076997bd64c1%40googlegroups.com.