I am trying to build a conan source with dependency, I am getting
Undefined symbols for architecture x86_64:
I am trying to use geolite2pp in a c++ project, But I am getting this error
Here is content of conanfile.py
class AppConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
requires = "geolite2pp/0.0.1-2561#avantize/stable"
generators = "cmake"
Got error, while running
conan install -s build_type=Release --build=missing
Undefined symbols for architecture x86_64:
"_MMDB_aget_value", referenced from:
GeoLite2PP::DB::get_field(MMDB_lookup_result_s*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<char const*, std::__1::allocator<char const*> > const&) in GeoLite2PP.cpp.o
"_MMDB_close", referenced from:
GeoLite2PP::DB::~DB() in GeoLite2PP.cpp.o
GeoLite2PP::DB::~DB() in GeoLite2PP.cpp.o
"_MMDB_free_entry_data_list", referenced from:
GeoLite2PP::DB::to_json(MMDB_entry_data_list_s*) in GeoLite2PP.cpp.o
"_MMDB_get_entry_data_list", referenced from:
GeoLite2PP::DB::lookup(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in GeoLite2PP.cpp.o
"_MMDB_get_metadata_as_entry_data_list", referenced from:
GeoLite2PP::DB::get_metadata() in GeoLite2PP.cpp.o
"_MMDB_lib_version", referenced from:
GeoLite2PP::DB::get_lib_version_mmdb() const in GeoLite2PP.cpp.o
"_MMDB_lookup_string", referenced from:
GeoLite2PP::DB::lookup_raw(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in GeoLite2PP.cpp.o
"_MMDB_open", referenced from:
GeoLite2PP::DB::DB(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in GeoLite2PP.cpp.o
"_MMDB_strerror", referenced from:
GeoLite2PP::ErrorCategory::message(int) const in GeoLite2PP_error_category.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)
gmake[2]: *** [src-lib/CMakeFiles/geolite2++s.dir/build.make:99: src-lib/libgeolite2++.dylib] Error 1
[ 75%] Built target geolite2++
gmake[1]: *** [CMakeFiles/Makefile2:93: src-lib/CMakeFiles/geolite2++s.dir/all] Error 2
Related
When I try to convert my program to run in netanim I get the following error.
Undefined symbols for architecture arm64:
"ns3::AnimationInterface::SetConstantPosition(ns3::Ptr<ns3::Node>, double, double, double)", referenced from:
experiment(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in wifi-hidden-terminal.cc.16.o
"ns3::AnimationInterface::AnimationInterface(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)", referenced from:
experiment(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in wifi-hidden-terminal.cc.16.o
"ns3::AnimationInterface::~AnimationInterface()", referenced from:
experiment(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in wifi-hidden-terminal.cc.16.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Waf: Leaving directory `/Users/nithindeepkumar/Mtech/Wireless/ns-allinone-3.35/ns-3.35/build'
Build failed
-> task in 'wifi-hidden-terminal' failed with exit status 1 (run with -v to display more information)
The code I try to run is :
anim.SetConstantPosition(nodes.Get(0),1.0, 2.0 );
anim.SetConstantPosition(nodes.Get(1), 3.0 , 2.0 );
anim.SetConstantPosition(nodes.Get(2), 4.0, 2.0);
I am running ns3-3.35.
I am trying to use the odin library (https://github.com/OpenImageDenoise/oidn/) within my project, but I am unable to get it to link successfully. When I include the library and use the example code from the documentation, my IDE does not flag any errors. However upon trying to compile it with cmake I get the following errors:
Undefined symbols for architecture x86_64:
"_oidnCommitDevice", referenced from:
data_denoise(std::__1::vector<float, std::__1::allocator<float> >&) in main.cpp.o
"_oidnCommitFilter", referenced from:
data_denoise(std::__1::vector<float, std::__1::allocator<float> >&) in main.cpp.o
"_oidnExecuteFilter", referenced from:
data_denoise(std::__1::vector<float, std::__1::allocator<float> >&) in main.cpp.o
"_oidnGetDeviceError", referenced from:
data_denoise(std::__1::vector<float, std::__1::allocator<float> >&) in main.cpp.o
"_oidnNewDevice", referenced from:
data_denoise(std::__1::vector<float, std::__1::allocator<float> >&) in main.cpp.o
_main in main.cpp.o
"_oidnNewFilter", referenced from:
data_denoise(std::__1::vector<float, std::__1::allocator<float> >&) in main.cpp.o
"_oidnReleaseDevice", referenced from:
data_denoise(std::__1::vector<float, std::__1::allocator<float> >&) in main.cpp.o
_main in main.cpp.o
"_oidnReleaseFilter", referenced from:
data_denoise(std::__1::vector<float, std::__1::allocator<float> >&) in main.cpp.o
"_oidnSetSharedFilterImage", referenced from:
data_denoise(std::__1::vector<float, std::__1::allocator<float> >&) in main.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)
I'm not sure if I need to link the library within the cmake file, since there is nothing related to that in the documentation.
Solved! I just needed to link the dylib to cmake.
OS -> OSX El Captain Version 10.11.6
Tried to install gRPC using the below commands:
git clone-b $(curl -L http://grpc.io/release) https://github.com/grpc/grpc
cd grpc
git submodule update --init
make
I got the below error:
[HOSTCXX] Compiling src/compiler/cpp_plugin.cc
[HOSTLD] Linking /<path>/grpc/bins/opt/grpc_cpp_plugin
ld: warning: directory not found for option '-L/<path>/grpc/libs/opt/c-ares'
Undefined symbols for architecture x86_64:
"google::protobuf::io::StringOutputStream::StringOutputStream(std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> >*)", referenced from:
ProtoBufFile::CreatePrinter(std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> >*) const in cpp_plugin.o
"google::protobuf::io::Printer::Print(std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > > const&, char const*)", referenced from:
ProtoBufPrinter::Print(std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > > const&, char const*) in cpp_plugin.o
"google::protobuf::FileDescriptor::GetSourceLocation(std::__1::vector<int, std::__1::allocator<int> > const&, google::protobuf::SourceLocation*) const", referenced from:
void grpc_generator::GetComment<google::protobuf::FileDescriptor>(google::protobuf::FileDescriptor const*, grpc_generator::CommentType, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >*) in cpp_plugin.o
"google::protobuf::compiler::CodeGenerator::GenerateAll(std::__1::vector<google::protobuf::FileDescriptor const*, std::__1::allocator<google::protobuf::FileDescriptor const*> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, google::protobuf::compiler::GeneratorContext*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) const", referenced from:
vtable for CppGrpcGenerator in cpp_plugin.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/<path>/grpc/bins/opt/grpc_cpp_plugin] Error 1
This is what I have in
/<path>/grpc/libs/opt/ directory :
- libares.a
- libgpr.a
- libgrpc_cronet.a
- libgrpc_unsecure.a
- libboringssl.a
- libgrpc.a
- libgrpc_plugin_support.a
- pkgconfig
[EDIT]
After uninstalling protobuf and running make again I get the below warnings :
[LD] Linking /<path>/grpc/libs/opt/libgpr.dylib
ld: warning: directory not found for option '-L/<path>/grpc/libs/opt/c-ares'
[LD] Linking /<path>/grpc/libs/opt/libgrpc.dylib
ld: warning: directory not found for option '-L/<path>/grpc/libs/opt/c-ares'
[LD] Linking /<path>/grpc/libs/opt/libgrpc_cronet.dylib
ld: warning: directory not found for option '-L/<path>/grpc/libs/opt/c-ares'
[LD] Linking /<path>/grpc/libs/opt/libgrpc_unsecure.dylib
ld: warning: directory not found for option '-L/<path>/grpc/libs/opt/c-ares'
[LD] Linking /<path>/grpc/libs/opt/libgrpc++.dylib
ld: warning: directory not found for option '-L/<path>/grpc/libs/opt/c-ares'
[LD] Linking /<path>/grpc/libs/opt/libgrpc++_cronet.dylib
ld: warning: directory not found for option '-L/<path>/grpc/libs/opt/c-ares'
[LD] Linking /<path>/grpc/libs/opt/libgrpc++_error_details.dylib
ld: warning: directory not found for option '-L/<path>/grpc/libs/opt/c-ares'
[LD] Linking /<path>/grpc/libs/opt/libgrpc++_reflection.dylib
ld: warning: directory not found for option '-L/<path>/grpc/libs/opt/c-ares'
[LD] Linking /<path>/grpc/libs/opt/libgrpc++_unsecure.dylib
ld: warning: directory not found for option '-L/<path>/grpc/libs/opt/c-ares'
If I proceed with the installation by executing 'sudo make install', protobuf doesn't get installed and grpc_cpp_plugin doesn't work (gives the below error).
grpc_cpp_plugin: program not found or is not executable
--grpc_out: protoc-gen-grpc: Plugin failed with status code 1.
[EDIT]
For the c-ares problem, i installed it using homebrew brew install c-ares. Then installed grpc grpc-1.3.0.tar.gz and protobuf libprotoc 3.2.0 without errors. But when i run make in the helloworld example, i'm getting the below error :
protoc -I ../../protos --cpp_out=. ../../protos/helloworld.proto
g++ -std=c++11 -I/usr/local/include -pthread -c -o helloworld.pb.o helloworld.pb.cc
protoc -I ../../protos --grpc_out=. --plugin=protoc-gen-grpc=`which grpc_cpp_plugin` ../../protos/helloworld.proto
g++ -std=c++11 -I/usr/local/include -pthread -c -o helloworld.grpc.pb.o helloworld.grpc.pb.cc
g++ -std=c++11 -I/usr/local/include -pthread -c -o greeter_client.o greeter_client.cc
g++ helloworld.pb.o helloworld.grpc.pb.o greeter_client.o -L/usr/local/lib `pkg-config --libs grpc++ grpc` -lgrpc++_reflection -lprotobuf -lpthread -ldl -o greeter_client
Undefined symbols for architecture x86_64:
"grpc::CreateChannel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<grpc::ChannelCredentials> const&)", referenced from:
_main in greeter_client.o
"google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const*, void (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&))", referenced from:
helloworld::protobuf_helloworld_2eproto::AddDescriptorsImpl() in helloworld.pb.o
"google::protobuf::io::CodedOutputStream::WriteStringWithSizeToArray(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned char*)", referenced from:
google::protobuf::internal::WireFormatLite::WriteStringToArray(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned char*) in helloworld.pb.o
"google::protobuf::internal::ArenaStringPtr::AssignWithDefault(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, google::protobuf::internal::ArenaStringPtr)", referenced from:
helloworld::HelloRequest::HelloRequest(helloworld::HelloRequest const&) in helloworld.pb.o
helloworld::HelloRequest::HelloRequest(helloworld::HelloRequest const&) in helloworld.pb.o
helloworld::HelloRequest::MergeFrom(helloworld::HelloRequest const&) in helloworld.pb.o
helloworld::HelloReply::HelloReply(helloworld::HelloReply const&) in helloworld.pb.o
helloworld::HelloReply::HelloReply(helloworld::HelloReply const&) in helloworld.pb.o
helloworld::HelloReply::MergeFrom(helloworld::HelloReply const&) in helloworld.pb.o
"google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::io::CodedOutputStream*)", referenced from:
helloworld::HelloRequest::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in helloworld.pb.o
helloworld::HelloReply::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const in helloworld.pb.o
"google::protobuf::internal::WireFormatLite::ReadBytes(google::protobuf::io::CodedInputStream*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)", referenced from:
google::protobuf::internal::WireFormatLite::ReadString(google::protobuf::io::CodedInputStream*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*) in helloworld.pb.o
"google::protobuf::internal::AssignDescriptors(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::internal::MigrationSchema const*, google::protobuf::Message const* const*, unsigned int const*, google::protobuf::MessageFactory*, google::protobuf::Metadata*, google::protobuf::EnumDescriptor const**, google::protobuf::ServiceDescriptor const**)", referenced from:
helloworld::protobuf_helloworld_2eproto::(anonymous namespace)::protobuf_AssignDescriptors() in helloworld.pb.o
"google::protobuf::internal::fixed_address_empty_string[abi:cxx11]", referenced from:
google::protobuf::internal::GetEmptyStringAlreadyInited[abi:cxx11]() in helloworld.pb.o
google::protobuf::internal::GetEmptyStringAlreadyInited[abi:cxx11]() in greeter_client.o
"google::protobuf::Message::GetTypeName[abi:cxx11]() const", referenced from:
vtable for helloworld::HelloReply in helloworld.pb.o
vtable for helloworld::HelloRequest in helloworld.pb.o
"google::protobuf::Message::InitializationErrorString[abi:cxx11]() const", referenced from:
vtable for helloworld::HelloReply in helloworld.pb.o
vtable for helloworld::HelloRequest in helloworld.pb.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make: *** [greeter_client] Error 1
Thanks
It could be related with wrong or corrupted version of installed ProtoBuf, because if protobuf is installed and has version more than 3.0, than gRPC building system uses system's protobuf, instread thrird-party-protobuf from subrepo. Try to remove or fix protobuf in your system.
UPDATE:
For new issues try to run "readelf -s lib???.so" for each grpc and protobuf library, and try to find this symbols in libraries. If in some library is specified "UND", than it is wrong library.
Second things that you should do, run "file lib???.so" for each grpc and protobuf library for check binary type: x86_64 or not.
I have read a few related answers and some articles online as well as the official Google Test documentation, but since I lack experience in this area I am very insecure about a few things and seek guidance.
I am starting a brand new pet project in c++ and I want to write proper tests as I code along, ran into Google Test and decided to give it a try.
Currently this is my folder structure:
/
/bin
/main.cpp
/lib
/lib/db
/lib/external/googletest
My idea is to have the tests and class files in their own folders, for example:
/lib/db/db.h
/lib/db/db.cpp
/lib/db/db.test
Question #1
Is there a naming convention or expectation for the file containing the tests? (/lib/db/db.test in that example above)
Question #2
I ran the following commands
cd lib/external/googletest/googletest
cmake .
make
make install
cp lib*.a /usr/local/lib
cp -r include/gtest/ /usr/local/include/
And seeing how it ended up creating a series of .h files in /usr/local/include/gtest, I expected to be able to #include <gtest/gtest.h> and be able to run tests, I added this to my main.cpp:
TEST(Param1, Param2) {
EXPECT_EQ(1, 1);
}
and when building the following error showed up:
Undefined symbols for architecture x86_64:
"testing::AssertionSuccess()", referenced from:
testing::AssertionResult testing::internal::CmpHelperEQ<int, int>(char const*, char const*, int const&, int const&) in main-230b96.o
"testing::Test::SetUp()", referenced from:
vtable for Param1_Param2_Test in main-230b96.o
"testing::Test::TearDown()", referenced from:
vtable for Param1_Param2_Test in main-230b96.o
"testing::Test::Test()", referenced from:
Param1_Param2_Test::Param1_Param2_Test() in main-230b96.o
"testing::Test::~Test()", referenced from:
Param1_Param2_Test::~Param1_Param2_Test() in main-230b96.o
"testing::Message::Message()", referenced from:
Param1_Param2_Test::TestBody() in main-230b96.o
"testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type, char const*, int, char const*)", referenced from:
Param1_Param2_Test::TestBody() in main-230b96.o
"testing::internal::AssertHelper::~AssertHelper()", referenced from:
Param1_Param2_Test::TestBody() in main-230b96.o
"testing::internal::GetTestTypeId()", referenced from:
___cxx_global_var_init in main-230b96.o
"testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeLocation, void const*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)", referenced from:
___cxx_global_var_init in main-230b96.o
"testing::internal::IsTrue(bool)", referenced from:
testing::internal::scoped_ptr<std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::reset(std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) in main-230b96.o
testing::internal::scoped_ptr<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::reset(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) in main-230b96.o
"testing::internal::EqFailure(char const*, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool)", referenced from:
testing::AssertionResult testing::internal::CmpHelperEQFailure<int, int>(char const*, char const*, int const&, int const&) in main-230b96.o
"testing::internal::AssertHelper::operator=(testing::Message const&) const", referenced from:
Param1_Param2_Test::TestBody() in main-230b96.o
"typeinfo for testing::Test", referenced from:
typeinfo for Param1_Param2_Test in main-230b96.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [all] Error 1
Solution
Thanks to trojanfoe I fixed my makefile to look like this:
CC=g++
target_folder=bin
all:
$(CC) *.cpp -o $(target_folder)/prod
./bin/prod
test:
$(CC) *.cpp -o $(target_folder)/test lib/external/googletest/googletest/libgtest.a lib/external/googletest/googletest/libgtest_main.a
./bin/test
clean:
rm -f $(target_folder)/* *.o
And now it works just fine, please keep in mind that this is a skeleton project and I need to structure the test files and entry point, so at this point its just compiling a basic test.
You have forgotten to link-in the google test library with your executable.
I just downloaded assimp 3.0 library and build the required make files with cmake, then compiled and build the library itself the process was successfull (with little modification to StepFile.h),
my assimp header folder is located in:
/usr/local/include
and my libassimp.a is located in:
/usr/local/lib
however when i specify library and header files in my command line project and try to test my project i get the following error:
Undefined symbols for architecture x86_64:
"Assimp::Importer::Importer()", referenced from:
_main in main.o
"Assimp::Importer::~Importer()", referenced from:
_main in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
and when i add -lassimp to Other Linker Flags i get the following errors:
Undefined symbols for architecture x86_64:
"_crc32", referenced from:
_unzReadCurrentFile in libassimp.a(unzip.c.o)
"_get_crc_table", referenced from:
_unzOpenCurrentFile3 in libassimp.a(unzip.c.o)
"_inflate", referenced from:
Assimp::XGLImporter::InternReadFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, aiScene*, Assimp::IOSystem*) in libassimp.a(XGLLoader.cpp.o)
Assimp::BlenderImporter::InternReadFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, aiScene*, Assimp::IOSystem*) in libassimp.a(BlenderLoader.cpp.o)
Assimp::XFileParser::XFileParser(std::__1::vector<char, std::__1::allocator<char> > const&) in libassimp.a(XFileParser.cpp.o)
_unzReadCurrentFile in libassimp.a(unzip.c.o)
"_inflateEnd", referenced from:
Assimp::XGLImporter::InternReadFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, aiScene*, Assimp::IOSystem*) in libassimp.a(XGLLoader.cpp.o)
Assimp::BlenderImporter::InternReadFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, aiScene*, Assimp::IOSystem*) in libassimp.a(BlenderLoader.cpp.o)
Assimp::XFileParser::XFileParser(std::__1::vector<char, std::__1::allocator<char> > const&) in libassimp.a(XFileParser.cpp.o)
_unzCloseCurrentFile in libassimp.a(unzip.c.o)
"_inflateInit2_", referenced from:
Assimp::XGLImporter::InternReadFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, aiScene*, Assimp::IOSystem*) in libassimp.a(XGLLoader.cpp.o)
Assimp::BlenderImporter::InternReadFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, aiScene*, Assimp::IOSystem*) in libassimp.a(BlenderLoader.cpp.o)
Assimp::XFileParser::XFileParser(std::__1::vector<char, std::__1::allocator<char> > const&) in libassimp.a(XFileParser.cpp.o)
_unzOpenCurrentFile3 in libassimp.a(unzip.c.o)
"_inflateReset", referenced from:
Assimp::XFileParser::XFileParser(std::__1::vector<char, std::__1::allocator<char> > const&) in libassimp.a(XFileParser.cpp.o)
"_inflateSetDictionary", referenced from:
Assimp::XFileParser::XFileParser(std::__1::vector<char, std::__1::allocator<char> > const&) in libassimp.a(XFileParser.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)
I had the same issue recently. The actual solution for me was to ensure that the project where I was using the compiled libassimp.a also linked to libz.dylib rather than turn assimp into a .dylib.
i rebuild assimp so that the makefile yields three library files namely libassimp.3.0.255.dylib libassimp.3.dylib libassimp.dylib, i included them in my project and it worked.