zeromq / czmqpp

C++ wrapper for czmq. Aims to be minimal, simple and consistent.
Other
45 stars 27 forks source link

Unable to build Make error #5

Closed Nevtep closed 10 years ago

Nevtep commented 10 years ago

I'm getting this error when trying to build this lib:

Making all in src CXX authenticator.lo CXX certificate.lo authenticator.cpp: In member function 'void czmqpp::authenticator::allow(const string&)': authenticator.cpp:43:38: error: invalid conversion from 'const char' to 'char' [-fpermissive] zauthallow(self, address.cstr()); ^ authenticator.cpp: In member function 'void czmqpp::authenticator::deny(const string&)': authenticator.cpp:47:37: error: invalid conversion from 'const char' to 'char_' [-fpermissive] zauthdeny(self, address.c_str()); ^ authenticator.cpp: In member function 'void czmqpp::authenticator::configureplain(const string&, const string&)': authenticator.cpp:52:47: error: invalid conversion from 'const char' to 'char_' [-fpermissive] zauth_configureplain(self, domain.c_str(), filename.cstr()); ^ authenticator.cpp:52:65: error: invalid conversion from 'const char' to 'char_' [-fpermissive] zauth_configureplain(self, domain.c_str(), filename.c_str()); ^ authenticator.cpp: In member function 'void czmqpp::authenticator::configurecurve(const string&, const string&)': authenticator.cpp:57:47: error: invalid conversion from 'const char' to 'char_' [-fpermissive] zauth_configurecurve(self, domain.c_str(), location.cstr()); ^ authenticator.cpp:57:65: error: invalid conversion from 'const char' to 'char_' [-fpermissive] zauth_configurecurve(self, domain.c_str(), location.c_str()); ^ In file included from ./../include/czmq++/socket.hpp:43:0, from ./../include/czmq++/certificate.hpp:25, from certificate.cpp:20: ./../include/czmq++/socket_opt.hpp: In member function 'int czmqpp::socket::tos()': ./../include/czmq++/socket_opt.hpp:12:29: error: 'zsocket_tos' was not declared in this scope return zsockettos(self); ^ ./../include/czmq++/socket_opt.hpp: In member function 'int czmqpp::socket::mechanism()': ./../include/czmq++/socket_opt.hpp:39:35: error: 'zsocket_mechanism' was not declared in this scope return zsocketmechanism(self); ^ ./../include/czmq++/socket_opt.hpp: In member function 'int czmqpp::socket::immediate()': ./../include/czmq++/socket_opt.hpp:45:35: error: 'zsocket_immediate' was not declared in this scope return zsocketimmediate(self); ^ ./../include/czmq++/socket_opt.hpp: In member function 'void czmqpp::socket::set_tos(int)': ./../include/czmq++/socket_opt.hpp:129:31: error: 'zsocket_set_tos' was not declared in this scope zsocket_settos(self, tos); ^ ./../include/czmq++/socket_opt.hpp: In member function 'void czmqpp::socket::set_router_handover(int)': ./../include/czmq++/socket_opt.hpp:132:55: error: 'zsocket_set_router_handover' was not declared in this scope zsocket_set_routerhandover(self, router_handover); ^ ./../include/czmq++/socket_opt.hpp: In member function 'void czmqpp::socket::set_probe_router(int)': ./../include/czmq++/socket_opt.hpp:138:49: error: 'zsocket_set_probe_router' was not declared in this scope zsocket_set_proberouter(self, probe_router); ^ certificate.cpp: In function 'zcert_t* czmqpp::loadcert(const string&)': certificate.cpp:32:38: error: invalid conversion from 'const char' to 'char_' [-fpermissive] return zcert_load(filename.c_str()); ^ certificate.cpp: In member function 'void czmqpp::certificate::setmeta(const string&, const string&)': certificate.cpp:66:38: error: invalid conversion from 'const char' to 'char_' [-fpermissive] zcert_setmeta(self, name.c_str(), value.cstr()); ^ certificate.cpp:66:53: error: invalid conversion from 'const char' to 'char_' [-fpermissive] zcert_setmeta(self, name.c_str(), value.cstr()); ^ certificate.cpp: In member function 'int czmqpp::certificate::save(const string&)': certificate.cpp:70:45: error: invalid conversion from 'const char' to 'char_' [-fpermissive] return zcertsave(self, filename.c_str()); ^ certificate.cpp: In member function 'int czmqpp::certificate::savepublic(const string&)': certificate.cpp:74:52: error: invalid conversion from 'const char' to 'char_' [-fpermissive] return zcert_savepublic(self, filename.c_str()); ^ certificate.cpp: In member function 'int czmqpp::certificate::save_secret(const string&)': certificate.cpp:78:53: error: 'zcert_save_secret' was not declared in this scope return zcert_savesecret(self, filename.c_str()); ^ make[1]: * [authenticator.lo] Error 1 make[1]: * Waiting for unfinished jobs.... certificate.cpp:79:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ make[1]: * [certificate.lo] Error 1 make: * [all-recursive] Error 1

PabloCastellano commented 10 years ago

I'm getting similar errors on master:

http://pastie.org/9312721

genjix commented 10 years ago

I'm not getting the same problem.

~/libczmqpp> git branch

If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following:

See any operating system documentation about shared libraries for

more information, such as the ld(1) and ld.so(8) manual pages.

make[2]: Leaving directory /home/genjix/libczmqpp/src' make[1]: Leaving directory/home/genjix/libczmqpp/src' make[1]: Entering directory /home/genjix/libczmqpp' make[2]: Entering directory/home/genjix/libczmqpp' make[2]: Nothing to be done for install-exec-am'. /bin/mkdir -p '/home/genjix/usr/share/doc/libczmqpp' /bin/mkdir -p '/home/genjix/usr/lib/pkgconfig' /usr/bin/install -c -m 644 README INSTALL COPYING '/home/genjix/usr/share/doc/libczmqpp' /usr/bin/install -c -m 644 libczmq++.pc '/home/genjix/usr/lib/pkgconfig' make[2]: Leaving directory/home/genjix/libczmqpp' make[1]: Leaving directory `/home/genjix/libczmqpp'

PabloCastellano commented 10 years ago

Weird... I was trying it in a Debian box, I will try on Ubuntu later...

PabloCastellano commented 10 years ago

It seems that I was missing the dependency libzmq. Installing it solved the problem.

praveensmile commented 7 years ago

In the make step, i have the following issue: CXX src/authenticator.lo In file included from ./include/czmq++/authenticator.hpp:24:0, from src/authenticator.cpp:20: ./include/czmq++/context.hpp:35:5: error: 'zctx_t' does not name a type zctx_t self(); ^ ./include/czmq++/context.hpp:38:5: error: 'zctx_t' does not name a type zctx_t self; ^ src/authenticator.cpp: In constructor 'czmqpp::authenticator::authenticator(czmqpp::context&)': src/authenticator.cpp:27:27: error: 'class czmqpp::context' has no member named 'self' : self(zauth_new(ctx.self())) ^ src/authenticator.cpp:27:33: error: 'zauthnew' was not declared in this scope : self(zauth_new(ctx.self())) ^ src/authenticator.cpp: In destructor 'czmqpp::authenticator::~authenticator()': src/authenticator.cpp:33:25: error: 'zauth_destroy' was not declared in this scope zauthdestroy(&self); ^ src/authenticator.cpp: In member function 'void czmqpp::authenticator::allow(const string&)': src/authenticator.cpp:43:39: error: 'zauth_allow' was not declared in this scope zauthallow(self, address.c_str()); ^ src/authenticator.cpp: In member function 'void czmqpp::authenticator::deny(const string&)': src/authenticator.cpp:47:38: error: 'zauth_deny' was not declared in this scope zauthdeny(self, address.c_str()); ^ src/authenticator.cpp: In member function 'void czmqpp::authenticator::configure_plain(const string&, const string&)': src/authenticator.cpp:52:66: error: 'zauth_configure_plain' was not declared in this scope zauth_configureplain(self, domain.c_str(), filename.c_str()); ^ src/authenticator.cpp: In member function 'void czmqpp::authenticator::configure_curve(const string&, const string&)': src/authenticator.cpp:57:66: error: 'zauth_configure_curve' was not declared in this scope zauth_configurecurve(self, domain.c_str(), location.c_str()); ^ src/authenticator.cpp: In member function 'void czmqpp::authenticator::set_verbose(bool)': src/authenticator.cpp:61:37: error: 'zauth_set_verbose' was not declared in this scope zauth_setverbose(self, verbose); ^ make: *** [src/authenticator.lo] Error 1

How to resolve this issue?