shogun icon indicating copy to clipboard operation
shogun copied to clipboard

Error while compiling C++ files using local spdlog

Open krutikabapat opened this issue 4 years ago • 5 comments

Compilation errors while compiling C++ examples in shogun/src/shogun/any c++example file while using local installation of spdlog.
The following errors are displayed:

/usr/local/include/shogun/io/SGIO.h:286:44: error: expected unqualified-id before ‘&’ token
        const fmt::experimental::string_view& msg) const;
                                            ^
/usr/local/include/shogun/io/SGIO.h:286:44: error: expected ‘)’ before ‘&’ token
/usr/local/include/shogun/io/SGIO.h:286:44: error: expected ‘;’ at end of member declaration
/usr/local/include/shogun/io/SGIO.h:286:46: error: ‘msg’ does not name a type
        const fmt::experimental::string_view& msg) const;

krutikabapat avatar Mar 07 '20 14:03 krutikabapat

Which version of spdlog did you use? Is this from the spdlog master branch?

gf712 avatar Mar 07 '20 18:03 gf712

@gf712 Yes it is from the spdlog master branch. I am using spdlog version 1.5.0

krutikabapat avatar Mar 09 '20 05:03 krutikabapat

@krutikabapat did it work with the 1.5.0 version then?

gf712 avatar Mar 10 '20 18:03 gf712

@gf712 I tried it with 1.5.0 only but It did not work. :'(

krutikabapat avatar Mar 16 '20 11:03 krutikabapat

@krutikabapat I seem to be able to compile it with a local 1.5.0 version. What error do you get with 1.5.0? If it is a linking issue, you need recompile your local spdlog with -fPIC (cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON)

gf712 avatar Mar 16 '20 12:03 gf712