pebbe / zmq4

A Go interface to ZeroMQ version 4
BSD 2-Clause "Simplified" License
1.17k stars 163 forks source link

could not determine kind of name for C.zmq_msg_group #133

Closed anovv closed 5 years ago

anovv commented 6 years ago

Every time I try to build a binary depending on github.com/pebbe/zmq4/draft I get (see screenshots):

screen shot 2018-05-24 at 20 13 22

Code sample:

screen shot 2018-05-24 at 20 13 59

How do I fix this?

pebbe commented 6 years ago

What is the output of these commands?

go env
go version
anovv commented 6 years ago
screen shot 2018-05-24 at 20 56 54
pebbe commented 6 years ago

What about this command?

pkg-config --cflags libzmq
anovv commented 6 years ago
screen shot 2018-05-24 at 21 16 57
pebbe commented 6 years ago

You don't have ZeroMQ installed with draft enabled.

You should reinstall ZeroMQ with the config option --enable-drafts

After that, you should reinstall zmq4

anovv commented 6 years ago

Thanks Peter! Could you please elaborate on what --enable-drafts does and how it's related to the problem?

In general, I'm curious if there is a noob tutorial of installing zmq on Mac? So far I have been gathering bits and pieces all over the web, this is not very convenient for a first time framework user.

pebbe commented 6 years ago

ZeroMQ has some experimental features that are not built by default. To include these features, you need to build ZeroMQ with the configure option --enable-drafts.

Use github.com/pebbe/zmq4 if you only want to access the regular, stable version of ZeroMQ, without the experimental features.

Some experimental features are supported in Go if you use github.com/pebbe/zmq4/draft, but to use this, you also need ZeroMQ with these experimental features enabled.

The experimental features are subject to change. The ZeroMQ C API can change, and when that happens, github.com/pebbe/zmq4/draft will probably also change.

Any question about the experimental features, what they are for, how to use them, and questions about ZeroMQ in general are best directed to the mailing list at http://zeromq.org/docs:mailing-lists

tutengdihuang commented 4 years ago

You don't have ZeroMQ installed with draft enabled.

You should reinstall ZeroMQ with the config option --enable-drafts

After that, you should reinstall zmq4

How can i config the option --enable-drafts

tutengdihuang commented 4 years ago

··· You should reinstall ZeroMQ with the config option --enable-drafts ··· How can i open the feature of '--enable-drafts'