-
Notifications
You must be signed in to change notification settings - Fork 937
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
Link error when building example with Conan #125
Comments
What does your |
|
OK, I've been able to replicate. Digging in now! |
And, compiling without Conan doesn't lead to this error. It looks like Conan is somehow not successfully linking in CPR under gcc 5.3. FWIW, your example works just fine in 4.9. I'm going to page @lasote on this one… |
There are some very interesting differences in the generated diff conanbuildinfo.cmake.gcc53 conanbuildinfo.cmake.gcc49 55a56,57
> set(CONAN_PACKAGE_NAME None)
> set(CONAN_PACKAGE_VERSION None)
82a85,88
> conan_set_find_paths()
> endmacro()
>
> macro(conan_set_find_paths)
84a91,93
>
> # Make find_package() to work
> set(CMAKE_PREFIX_PATH ${CONAN_CMAKE_MODULE_PATH} ${CMAKE_PREFIX_PATH})
88c97,101
< include_directories(SYSTEM ${CONAN_INCLUDE_DIRS})
---
> if(CONAN_SYSTEM_INCLUDES)
> include_directories(SYSTEM ${CONAN_INCLUDE_DIRS})
> else()
> include_directories(${CONAN_INCLUDE_DIRS})
> endif() |
Although those differences don't appear to actually be relevant. I merged them into the gcc4.9 |
@Pwera I have it figured out. The problem is that somewhere along the line, I'm not entirely sure where, something is getting compiled with an ABI-incompatible libstdc++. This should do the trick: conan install -s compiler=gcc -s compiler.libcxx=libstdc++11 --build=missing This will ensure that all dependencies, are compiled with the correct libstdc++ ABI (Alternately, you can update |
HI! sorry for the delay. I can see that you have already solve the issue. 👍 If the setting libcxx is not set to libstcd++11 it won't link with C++11 capabilities, so this setting is needed. |
This issue is already solved, right? |
This issue has been solved and the conan package is ready to be used without any problems. |
After successfully install cpr with Conan, i tried to compil an example.
I am using gcc 5.3.
main.cpp content:
TerminalOutput :
Where i did mistake?
The text was updated successfully, but these errors were encountered: