-
Notifications
You must be signed in to change notification settings - Fork 63
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
Missing compilation conditionals #13
Comments
Hello, What have you tried? try running the tests, there's a project file in the tests folder. regards |
I will try again and will document the process this time. :) |
The current version of the binding should work with fpc 2.6.0, but i will give a try with the 2.6.4.
git clone https://github.com/cpicanco/delphizmq.git
zmq_proxy from zmq.pas depends on a defined zmq3 in zmq.inc {$ifdef zmq3}
{* Built-in message proxy (3-way) *}
function zmq_proxy( frontend, backend, capture: Pointer ): Integer; cdecl; external libzmq;
{$endif} GenerateConsoleCtrlEvent(CTRL_C_EVENT... is windows only, isn't it?. Honestly I don't know if it is included in lazarus, but I found a thread with people talking about it. What should I do?? |
So... from this report i think zmq_proxy is not available at all in 2.2.0. So, I think I should restrict it to the zmq3. |
yeap, zmq_proxy is not available in 2.2, a conditional directive is missing there. you can omit ZMQTerminate too, it's just for generating a Ctrl+C signal, not crutial. |
Thank you man!! I have made this two small changes that I think could be a pull request. What do you think??
procedure ZMQTerminate;
begin
{$ifndef UNIX}
GenerateConsoleCtrlEvent( CTRL_C_EVENT, 0 );
{$endif}
end; and procedure ZMQProxy( frontend, backend, capture: TZMQSocket );
var
p: Pointer;
begin
if capture <> nil then
p := capture.SocketPtr
else
p := nil;
{$ifdef zmq3}
if zmq_proxy( frontend.SocketPtr, backend.SocketPtr, p ) <> -1 then
raise EZMQException.Create( 'Proxy does not return -1' );
{$endif}
//raise EZMQException.Create;
end; I think this is good... |
thanks |
For instance, I was able to run zmq 3.5 as well, well done @bvarga !! |
👍 |
Hi everyone,
Is there any chance I get some help to fork this binding to use it with linux and lazarus?
Best
Rafael
The text was updated successfully, but these errors were encountered: