www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - VisualD + ZeroMQ

reply Chuck Moore <chuckmoore55 hotmail.com> writes:
Hi Everyone,

Preamble: We're a Win7+VisualStudio development environment. This 
question involves integrating the GitHub-based 
'D-Programming-Deimos/ZeroMQ' package in a 'D' solution.

Short form of issue: If anyone has compiled a D program using 
(say) zmq_ctx_new(), then I'd appreciate knowing how the 
library-paths and such were configured. I've tried all kinds of 
options (and yes I've read the read the documentatio), but still 
have 'Error 42: Symbol undefined _zmq_socket' errors.

Explanation and long form of question:
1) The GitHub package is at 'C:\D\zeromq-master'.
2) The file 'zeromq.lib' was installed as expected within the 
'C:\D\zeromq-master' directory.
3) The LIB variable has 'C:\D\zeromq-master' within it.
4) Within VisualStudio, the VisualD DMD directories' library 
paths has 'C:\D\zeromq-master' as its setting.
5) The command generated by VisualD, as shown on the solution's 
Properties' Configuration Properties' Command Line is :
"$(VisualDInstallDir)pipedmd.exe" dmd -debug 
-IC:\D\zmq-d-0.3.0\source -IC:\D\zeromq-master 
-deps="$(OutDir)\$(ProjectName).dep" 
-of"$(OutDir)\$(ProjectName).exe" -map 
"$(INTDIR)\$(SAFEPROJECTNAME).map" -L/NOMAP zeromq.lib
6) I can create an OBJ file without any errors/issues, but the 
linking part ain't happening.

I'd appreciate any suggestions or thoughts.

Chuck
Apr 20 2016
parent Chuck Moore <chuckmoore55 hotmail.com> writes:
On Thursday, 21 April 2016 at 00:15:03 UTC, Chuck Moore wrote:
 Hi Everyone,

 Preamble: We're a Win7+VisualStudio development environment. 
 This question involves integrating the GitHub-based
.....
 Chuck
Hi Everyone, I finally got my compilation+linking to work using VisualD. In the event others might find my results useful, here are my notes: 1) It turns out that when using VisualD, the safest/guaranteed-way-to-make-things-visible-to-DMD is to load everything (as in anything one imports-from, or references with the linker) into the 'solution' using the Add > Existing Items option found by right-clicking the solution's name in 'Solution Explorer'. 2) So what I ended up having as additional items alongside 'main.d' : libsodium.lib, libzmq-v110_xp_mt-4_0_4.lib, zeromq.lib, zmqd.d, and zmqd.lib. There is certainly some duplication of functions in this list, but VisualD wasn't happy until I had all of these items added. 3) Finally, prior to adding the 'lib' files, I also had to (download and) use the 'coffimpllib' utility on ALL the lib files. My thanks to the author of zmqd for his quick response and encouragement. Chuck
Apr 22 2016