-
Notifications
You must be signed in to change notification settings - Fork 101
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
Has anyone have the below linking issue? #31
Comments
I have attached my code below, it's pretty simple. I also tried to remove the libredox.so from /usr/local/lib64/ and see if it was a lib issue, but when I do that I got this error (which proves that the linker is able to find the lib): /usr/bin/ld: cannot find -lredox #include using namespace std; int main(int argc, char* argv[]) {
} |
Hi Michael, did you try providing the directory of libredox.so with -L? |
Yes. I did. I even tried to remove the .so and it gave me a different On Mon, Oct 19, 2015 at 5:07 AM, Hayk Martirosyan notifications@github.com
|
Can you post your compile command? Did you compile w/ C++11? |
I am actually hitting this issue currently while trying to build the Hello World example. Below is my compile command:
|
@mjohnson138 I met same problem with g++ 5. Have you come up any idea on this issue? Thanks in advance. BTW, if I switch to g++ 4.9.2, there is no problem any more. Since I have to use std::put_time(), g++ 5 is necessary. |
@Yaoshicn Unfortunately I was not able to get past the issue. I chose to no longer use Redis for my software project. |
No need to dump redox (or redis) over a linker error. This may be related to the change of default ABI by gcc, see here: https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html.
|
Many apologies for the late response on this, but I was finally able to return to this library and solve the original issue. In CMake, the set(CMAKE_CXX_COMPILER, ...) option was being ignored (https://gitlab.kitware.com/cmake/community/-/wikis/FAQ#how-do-i-use-a-different-compiler) and so the redox library was being built with a pre-c++11 version of GCC while the project that was linking against redox was built using a new compiler. Good call on the dual_abi as that break was causing the issue. Ultimately, I set CC and CXX on the cmake line in the provided make.sh script. |
Hi,
I was able to compile my application cpp but when I tried to link, I have the below error:
/tmp/ccIM35WN.o: In function
main': MyApp.cpp:(.text+0x47f): undefined reference to
redox::Redox::connect(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, int, std::function<void (int)>)'collect2: error: ld returned 1 exit status
Thanks,
Mike
The text was updated successfully, but these errors were encountered: