-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undefined reference to library function #185
Comments
I have fixed the issue. When conan is installed in the conan profile the compiler version should be changed to "compiler.libcxx=libstdc++11". This has to do with some compatibility issues with the conan compiler and cmake. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So I have created a very basic "hello world" kind of project which uses the LLA library. I exactly followed all the build and install tutorials, and now started with the C++ how to. For some reason while trying to compile it gives an "undefined reference" error when a library function is called even though the function does exist in that location. I can't seem to find any useful information. Seems to be a linker issue but how do I fix this?
main.cpp
Build output
Building project.. [100%] Linking CXX executable bin/project CMakeFiles/project.dir/main.cpp.o: In function 'main': main.cpp:(.text+0x1ae): undefined reference to 'logicalaccess::LibraryManager::getReaderProvider(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' collect2: error: ld returned 1 exit status CMakeFiles/project.dir/build.make:191: recipe for target 'bin/project' failed make[2]: *** [bin/project] Error 1 CMakeFiles/Makefile2:95: recipe for target 'CMakeFiles/project.dir/all' failed make[1]: *** [CMakeFiles/project.dir/all] Error 2 Makefile:103: recipe for target 'all' failed make: *** [all] Error 2
CmakeLists.txt
Any advice?
The text was updated successfully, but these errors were encountered: