Coder Social home page Coder Social logo

czmqpp's People

Contributors

c-rack avatar evoskuil avatar genjix avatar hintjens avatar hughpowell avatar meprem avatar pmienk avatar swansontec avatar trevorbernard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

czmqpp's Issues

Build error

I'm attempting to create an ebuild that will compile czmq++ on Gentoo Linux, and it currently fails with the following when attempting to build the master branch:

make failed

CXX      src/authenticator.lo
In file included from ./include/czmq++/authenticator.hpp:24,
                 from src/authenticator.cpp:20:
./include/czmq++/context.hpp:35:5: error: ‘zctx_t’ does not name a type; did you mean ‘zrex_t’?
   35 |     zctx_t* self();
      |     ^~~~~~
      |     zrex_t
./include/czmq++/context.hpp:38:5: error: ‘zctx_t’ does not name a type; did you mean ‘zrex_t’?
   38 |     zctx_t* self_;
      |     ^~~~~~
      |     zrex_t
src/authenticator.cpp: In constructor ‘czmqpp::authenticator::authenticator(czmqpp::context&)’:
src/authenticator.cpp:27:27: error: ‘class czmqpp::context’ has no member named ‘self’
   27 |     : self_(zauth_new(ctx.self()))
      |                           ^~~~
src/authenticator.cpp:27:13: error: ‘zauth_new’ was not declared in this scope; did you mean ‘zauth_test’?
   27 |     : self_(zauth_new(ctx.self()))
      |             ^~~~~~~~~
      |             zauth_test
src/authenticator.cpp: In destructor ‘czmqpp::authenticator::~authenticator()’:
src/authenticator.cpp:33:5: error: ‘zauth_destroy’ was not declared in this scope; did you mean ‘zuuid_destroy’?
   33 |     zauth_destroy(&self_);
      |     ^~~~~~~~~~~~~
      |     zuuid_destroy
src/authenticator.cpp: In member function ‘void czmqpp::authenticator::allow(const string&)’:
src/authenticator.cpp:43:5: error: ‘zauth_allow’ was not declared in this scope
   43 |     zauth_allow(self_, address.c_str());
      |     ^~~~~~~~~~~
src/authenticator.cpp: In member function ‘void czmqpp::authenticator::deny(const string&)’:
src/authenticator.cpp:47:5: error: ‘zauth_deny’ was not declared in this scope; did you mean ‘zauth_test’?
   47 |     zauth_deny(self_, address.c_str());
      |     ^~~~~~~~~~
      |     zauth_test
src/authenticator.cpp: In member function ‘void czmqpp::authenticator::configure_plain(const string&, const string&)’:
src/authenticator.cpp:52:5: error: ‘zauth_configure_plain’ was not declared in this scope; did you mean ‘configure_plain’?
   52 |     zauth_configure_plain(self_, domain.c_str(), filename.c_str());
      |     ^~~~~~~~~~~~~~~~~~~~~
      |     configure_plain
src/authenticator.cpp: In member function ‘void czmqpp::authenticator::configure_curve(const string&, const string&)’:
src/authenticator.cpp:57:5: error: ‘zauth_configure_curve’ was not declared in this scope; did you mean ‘configure_curve’?
   57 |     zauth_configure_curve(self_, domain.c_str(), location.c_str());
      |     ^~~~~~~~~~~~~~~~~~~~~
      |     configure_curve
src/authenticator.cpp: In member function ‘void czmqpp::authenticator::set_verbose(bool)’:
src/authenticator.cpp:61:5: error: ‘zauth_set_verbose’ was not declared in this scope; did you mean ‘zloop_set_verbose’?
   61 |     zauth_set_verbose(self_, verbose);
      |     ^~~~~~~~~~~~~~~~~
      |     zloop_set_verbose
src/authenticator.cpp: At global scope:
src/authenticator.cpp:64:1: fatal error: opening dependency file src/.deps/authenticator.Tpo: Permission denied
   64 | } // namespace czmqpp
      | ^
compilation terminated.
Makefile:609: recipe for target 'src/authenticator.lo' failed
make: *** [src/authenticator.lo] Error 1

Dependencies?

What exactly does this library depend on? Is it simply libzmq.so/libzmq.dylib, or something else/additional?

FTBFS in Ubuntu 16.04

  CXX      src/certificate.lo
In file included from ./include/czmq++/socket.hpp:45:0,
                 from ./include/czmq++/certificate.hpp:26,
                 from src/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 zsocket_tos(self_);
                             ^
./include/czmq++/socket_opt.hpp: In member function ‘int czmqpp::socket::plain_server()’:
./include/czmq++/socket_opt.hpp:15:38: error: ‘zsocket_plain_server’ was not declared in this scope
     return zsocket_plain_server(self_);

...

Full log here: https://paste.ubuntu.com/16002609/

Release tag

I'm creating a Portfile for MacPorts. Would you mind tagging a release, even if it's preliminary? Thanks.

@evoskuil suggests a v1.1.0 tag for master HEAD.

Changes for VS2010

Hi,

I've made changes to be able to work with VS2010 (added project files and fixed compilation issues). As the VS2010 compiler doesn't implement all of the C++11 language features there's quite a few changes. The only way I can think to make it build for all platforms with be with liberal use of preprocessor definitions, making it quite a mess. Would this be better be kept as 2 separate projects?

Cheers,
Hugh

Unable to build Make error

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]
zauth_allow(self_, address.c_str());
^
authenticator.cpp: In member function 'void czmqpp::authenticator::deny(const string&)':
authenticator.cpp:47:37: error: invalid conversion from 'const char_' to 'char_' [-fpermissive]
zauth_deny(self_, address.c_str());
^
authenticator.cpp: In member function 'void czmqpp::authenticator::configure_plain(const string&, const string&)':
authenticator.cpp:52:47: error: invalid conversion from 'const char_' to 'char_' [-fpermissive]
zauth_configure_plain(self_, domain.c_str(), filename.c_str());
^
authenticator.cpp:52:65: error: invalid conversion from 'const char_' to 'char_' [-fpermissive]
zauth_configure_plain(self_, domain.c_str(), filename.c_str());
^
authenticator.cpp: In member function 'void czmqpp::authenticator::configure_curve(const string&, const string&)':
authenticator.cpp:57:47: error: invalid conversion from 'const char_' to 'char_' [-fpermissive]
zauth_configure_curve(self_, domain.c_str(), location.c_str());
^
authenticator.cpp:57:65: error: invalid conversion from 'const char_' to 'char_' [-fpermissive]
zauth_configure_curve(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 zsocket_tos(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 zsocket_mechanism(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 zsocket_immediate(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_set_tos(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_router_handover(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_probe_router(self_, probe_router);
^
certificate.cpp: In function 'zcert_t* czmqpp::load_cert(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::set_meta(const string&, const string&)':
certificate.cpp:66:38: error: invalid conversion from 'const char_' to 'char_' [-fpermissive]
zcert_set_meta(self_, name.c_str(), value.c_str());
^
certificate.cpp:66:53: error: invalid conversion from 'const char_' to 'char_' [-fpermissive]
zcert_set_meta(self_, name.c_str(), value.c_str());
^
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 zcert_save(self_, filename.c_str());
^
certificate.cpp: In member function 'int czmqpp::certificate::save_public(const string&)':
certificate.cpp:74:52: error: invalid conversion from 'const char_' to 'char_' [-fpermissive]
return zcert_save_public(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_save_secret(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

Port test to C++/czmqpp

I have a test case for czmq, that I wish to port to C++/czmqpp, for inclusion in a package specification (Homebrew formula). Is there any chance someone could help me out on this? My C++ is awfully rusty, and there doesn't exist any documentation for czmqpp it seems.

#include <czmq.h>

int main(void)
{
  zsock_t *push = zsock_new_push("inproc://hello-world");
  zsock_t *pull = zsock_new_pull("inproc://hello-world");

  zstr_send(push, "Hello, World!");
  char *string = zstr_recv(pull);
  puts(string);
  zstr_free(&string);

  zsock_destroy(&pull);
  zsock_destroy(&push);

  return 0;
}

error: format not a string literal and no format arguments

I'm getting this error trying to build:

src/socket.cpp: In member function 'int czmqpp::socket::bind(const string&)':
src/socket.cpp:63:47: error: format not a string literal and no format arguments [-Werror=format-security]
     return zsocket_bind(self_, address.c_str());
                                               ^
src/socket.cpp: In member function 'int czmqpp::socket::connect(const string&)':
src/socket.cpp:68:50: error: format not a string literal and no format arguments [-Werror=format-security]
     return zsocket_connect(self_, address.c_str());
                                                  ^
cc1plus: some warnings being treated as errors
make: *** [Makefile:608: src/socket.lo] Error 1

Versions:

  • czmqpp 1.2.0
  • czmq 3.0.2
  • g++ 5.4.0

Crash observed while running ironhouse2.cpp example

prem@prem-Vostro-2420:~/Code/czmqpp-master/examples$ g++ -std=c++11 ironhouse2.cpp -o ironhouse2 -lczmq++ -lczmq -lzmq -lpthread
prem@prem-Vostro-2420:~/Code/NewFWK/czmqpp-master/examples$ ./ironhouse2 
ironhouse2: src/certificate.cpp:45: czmqpp::certificate::certificate(czmqpp::certificate&&): Assertion `self_ == nullptr' failed.
Aborted (core dumped)
prem@prem-Vostro-2420:~/Code/czmqpp-master/examples$ pwd

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.