Skip to content
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

(Windows/MinGW) Undefined reference to jsonrpc::Client::CallMethod(...) #330

Open
LEOcab opened this issue Jan 9, 2024 · 0 comments
Open

Comments

@LEOcab
Copy link

LEOcab commented Jan 9, 2024

I can't get libjson-rpc-cpp to build in MinGW using the 32-bit toolchain and the pre-built Windows binaries. This is the current error I'm getting; long story short it's an undefined reference to jsonrpc::Client::CallMethod(...):

cmd.exe /C "cd . && C:\msys64\mingw32\bin\c++.exe -g  CMakeFiles/rpctest2.dir/main.cpp.obj -o rpctest2.exe -Wl,--out-implib,librpctest2.dll.a -Wl,--major-image-version,0,--minor-image-version,0 -LC:/PROGRA~2/LIBJSO~1.0/lib   -LC:/msys64/home/user/jsoncpp/build/debug/lib -llibjsoncpp  -llibjsonrpccpp-client  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/13.2.0/../../../../i686-w64-mingw32/bin/ld.exe: CMakeFiles/rpctest2.dir/main.cpp.obj: in function `main':
C:/Users/user/CLionProjects/rpctest2/main.cpp:16:(.text+0x4d): undefined reference to `jsonrpc::HttpClient::HttpClient(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/13.2.0/../../../../i686-w64-mingw32/bin/ld.exe: C:/Users/user/CLionProjects/rpctest2/main.cpp:23:(.text+0xdf): undefined reference to `jsonrpc::Client::CallMethod(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Json::Value const&)'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

This may or may not be the same issue as #327, but I'm starting a different issue since we're on different platforms and the undefined method is different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant