View mode: basic / threaded / horizontal-split · Log in · Help
August 19, 2012
import libzmq_d.dll for zmq3.2.0
1、use vs2010 build zmq3.2.0

get libzmq_d.dll file, libzmq_d.dll extern "C" void zmq_version 
(int *major, int *minor, int *patch);

2、implib libzmq_d.lib libzmq_d.dll

get libzmq_d.lib file

3、create zmq.d
module zmq

version (Windows)
{
	pragma (lib, "libzmq_d.lib");
}

extern (C):
void zmq_version (int *major, int *minor, int *patch);

4、dmd -lib zmq.d or dmd -lib zmq.d libzmq_d.lib

get zmq.lib file

5、create main.d file
import zmq;
void main()
{
    int major, minor, patch;
    zmq_version(&major, &minor, &patch);
    printf("Current ZMQ version is %d.%d.%d\n", major, minor, 
patch);
}

6、An Error:
	 Symbol Undefined _zmq_version

Why is that?
help me!
Do not reference dll? bug?
August 19, 2012
Re: import libzmq_d.dll for zmq3.2.0
I'm not a windows user but since nobody has answered yet, I'll give you
my 50 cents.

It requires a reference "_zmq_version" while the original function is
called "zmq_version". You'll need some kind of linker file. But don't
quote me on that!
August 19, 2012
Re: import libzmq_d.dll for zmq3.2.0
On 8/19/12, "拖狗散步" <djj@shumtn.com> wrote:
> 1、use vs2010 build zmq3.2.0
>
> get libzmq_d.dll file, libzmq_d.dll extern "C" void zmq_version
> (int *major, int *minor, int *patch);
>
> 2、implib libzmq_d.lib libzmq_d.dll

Try:
implib libzmq_d.lib libzmq_d.dll /system
August 19, 2012
Re: import libzmq_d.dll for zmq3.2.0
On Sunday, 19 August 2012 at 18:52:37 UTC, mta`chrono wrote:
> I'm not a windows user but since nobody has answered yet, I'll 
> give you
> my 50 cents.
>
> It requires a reference "_zmq_version" while the original 
> function is
> called "zmq_version". You'll need some kind of linker file. But 
> don't
> quote me on that!

I do not slow connection, brothers!
August 19, 2012
Re: import libzmq_d.dll for zmq3.2.0
On Sunday, 19 August 2012 at 19:14:43 UTC, Andrej Mitrovic wrote:
> On 8/19/12, "拖狗散步" <djj@shumtn.com> wrote:
>> 1、use vs2010 build zmq3.2.0
>>
>> get libzmq_d.dll file, libzmq_d.dll extern "C" void zmq_version
>> (int *major, int *minor, int *patch);
>>
>> 2、implib libzmq_d.lib libzmq_d.dll
>
> Try:
> implib libzmq_d.lib libzmq_d.dll /system

I went home to try it, I will timely feedback!Thank you, brother!
August 20, 2012
Re: import libzmq_d.dll for zmq3.2.0
On Sunday, 19 August 2012 at 19:14:43 UTC, Andrej Mitrovic wrote:
> On 8/19/12, "拖狗散步" <djj@shumtn.com> wrote:
>> 1、use vs2010 build zmq3.2.0
>>
>> get libzmq_d.dll file, libzmq_d.dll extern "C" void zmq_version
>> (int *major, int *minor, int *patch);
>>
>> 2、implib libzmq_d.lib libzmq_d.dll
>
> Try:
> implib libzmq_d.lib libzmq_d.dll /system

Thank you, brothers, to determine is your reason! Thank you very 
much! Hey!I was awkward!
Forget to add /System Parameters!
Top | Discussion index | About this forum | D home