Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6211679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:22:49+00:00 2026-05-24T06:22:49+00:00

I’m having a problem trying to use ZeroMQ in my new application. Please note:

  • 0

I’m having a problem trying to use ZeroMQ in my new application. Please note: I have no problem downloading and building ZeroMQ itself. I downloaded the ZeroMQ ZIP file, opened the project/solution file in Visual Studio/C++ 2008 and built the ZeroMQ library just fine. The /lib directory of the ZeroMQ install folder contains the .lib, .dll, and other files, so all is well there as far as I know.

My problem is that I am trying to build a simple project consisting of the HelloWorld server example in the ZeroMQ user guide. I created the following file called helloserver.c.

//
// Hello World server
// Binds REP socket to tcp://*:5555
// Expects "Hello" from client, replies with "World"
//
#include <zmq.h>
#include <stdio.h>
#include <string.h>

int main (void)
{
zmq_msg_t request;
zmq_msg_t reply;

void *context = zmq_init (1);

// Socket to talk to clients
void *responder = zmq_socket (context, ZMQ_REP);
zmq_bind (responder, "tcp://*:5555");

while (1) {
// Wait for next request from client

    zmq_msg_init (&request);
    zmq_recvmsg (responder, &request, 0);
    printf ("Received Hello\n");
    zmq_msg_close (&request);

// Do some 'work'
    Sleep (1);

// Send reply back to client
    zmq_msg_init_size (&reply, 5);
    memcpy (zmq_msg_data (&reply), "World", 5);
    zmq_sendmsg (responder, &reply, 0);
    zmq_msg_close (&reply);
}
// We never get here but if we did, this would be how we end
zmq_close (responder);
zmq_term (context);
return 0;
}

I added the ZeroMQ installatiion include directory to the VC++2008 include path (Properties->Configuration Properties->C/C++->General->Additional Include Directories) and I also added the ZeroMQ lib directory to the project:
(Properties->Configuration Properties->C/C++->Code Generation->Runtime Library, selected Multithreaded Debug DLL /MDd).

I tried to build the project. Everything compiles fine butI get a bunch of unresolved externals like this when linking:

1>Linking…
1>helloserver.obj : error LNK2019: unresolved external symbol _imp_zmq_term referenced in function _main
1>helloserver.obj : error LNK2019: unresolved external symbol _imp_zmq_close referenced in function _main
1>helloserver.obj : error LNK2019: unresolved external symbol _imp_zmq_sendmsg referenced in function _main
1>helloserver.obj : error LNK2019: unresolved external symbol _imp_zmq_msg_data referenced in function _main
1>helloserver.obj : error LNK2019: unresolved external symbol _imp_zmq_msg_init_size referenced in function _main
1>helloserver.obj : error LNK2019: unresolved external symbol _imp_zmq_msg_close referenced in function _main
1>helloserver.obj : error LNK2019: unresolved external symbol _imp_zmq_recvmsg referenced in function _main
1>helloserver.obj : error LNK2019: unresolved external symbol _imp_zmq_msg_init referenced in function _main
1>helloserver.obj : error LNK2019: unresolved external symbol _imp_zmq_bind referenced in function _main
1>helloserver.obj : error LNK2019: unresolved external symbol _imp_zmq_socket referenced in function _main
1>helloserver.obj : error LNK2019: unresolved external symbol _imp_zmq_init referenced in function _main
1>C:\work\visualc++2008\projects\HelloZMQServer\Debug\HelloZMQServer.exe : fatal error LNK1120: 11 unresolved externals

I tried going back to the Code generation->Runtime library settings and tried changing the library switch to ?MD or /MT but nothing worked, I still get these linker errors.

Please note that when I created helloworld.c I used an empty windows console application project, and the only changes I made were to add the ZeroMQ include and lib directories as indicated above. I have not changed any other default project settings. I’m guessing I’m missing a project setting somewhere.

How can I fix this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T06:22:50+00:00Added an answer on May 24, 2026 at 6:22 am

    You didn’t mention that you also added the concrete lib to your project. Note that it doesn’t suffice to tell VS only the lib path, but you must also add the lib itself to your project. I don’t have Visual Studio at hand right now, but you will find this option within the project’s linker settings. There you can mention all libs you want to link against.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
We're building an app, our first using Rails 3, and we're having to build
I am trying to loop through a bunch of documents I have to put
this is what i have right now Drawing an RSS feed into the php,
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have just tried to save a simple *.rtf file with some websites and
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a bunch of posts stored in text files formatted in yaml/textile (from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.