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

  • Home
  • SEARCH
  • 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 9168535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:38:53+00:00 2026-06-17T15:38:53+00:00

In visual studio 2010, I get Error 1 error LNK2019: unresolved external symbol public:

  • 0

In visual studio 2010, I get

Error 1 error LNK2019: unresolved external symbol “public: __thiscall
Server::Server(class boost::asio::io_service &)”
(??0Server@@QAE@AAVio_service@asio@boost@@@Z) referenced in the
function _main C:\Users\Lucie\Documents\Visual Studio
2010\Projects\Expérimentation Serveur\Expérimentation
Serveur\Main_Serveur.obj

However, I have the class definition in the header file and the class implementation in the .cpp file both included in the solution, so I really don’t see why I’m getting this. Furthermore, I have checked, and the definition and declaration seem to match.

Here is Main_Serveur.cpp:

include <ctime>
#include <iostream>
#include <string>
#include <vector>
#include <hash_map>
#include <functional>
#include <boost/bind.hpp>
#include <algorithm>
#include <boost/shared_ptr.hpp>
#include <boost/enable_shared_from_this.hpp>
#include <boost/asio.hpp>
#include <hash_set>

#include "Connection.h"
#include "Server.h"

using boost::asio::ip::tcp;
int main()
{
    try
    {
        boost::asio::io_service io_service;
        Server server(io_service);
        io_service.run();
    }
    catch (std::exception& e)
    {
        std::cerr << e.what() << std::endl;
    }
    std::cin.get();
    return 0;
}

Here is Server.h:

#ifndef __SERVER_H__
#define __SERVER_H__
#include"Connection.h"
#include<boost\bind.hpp>
#include<boost\asio.hpp>
#include<boost\shared_ptr.hpp>
#include<boost\enable_shared_from_this.hpp>
#include<hash_set>
#include<string>
using boost::asio::ip::tcp;

class Connection;
class Server : public boost::enable_shared_from_this<Server>
{
public:
    Server(boost::asio::io_service & io_service);
    void removeSocketFromList(tcp::socket * socketToRemove);
    void sendToList(std::string message);
    void addSocketToList(tcp::socket * newSocket);

private:
    void start_accept();
    void handle_accept
    (
        boost::shared_ptr<Connection> new_connection,
        const boost::system::error_code& error
    );


    std::hash_set<tcp::socket*> sockets_;
    tcp::acceptor acceptor_;
};
#endif

And here is the relevant part of Server.cpp:

#include"Server.h"
#include"Connection.h"

#include<boost\asio.hpp>
#include<hash_set>
using boost::asio::ip::tcp;

Server::Server(boost::asio::io_service & io_service):
acceptor_(io_service, tcp::endpoint(tcp::v4(), 13))
{
    start_accept();
}

Any help would be greatly appreciated.

  • 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-06-17T15:38:54+00:00Added an answer on June 17, 2026 at 3:38 pm

    Ended up creating a new project and including the sources and headers, and the project compiled.
    Oh well.

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

Sidebar

Related Questions

I get an error, while compiling my C#-code with Visual Studio 2010 on Windows
In Visual Studio 2010 Pro, I get a compile error stating "expected an identifier"
Where can i get boost .lib for visual studio 2010?? I tried to rename
Lately with Visual Studio 2010 Ultimate, C#, in Win7 64bit, I get the error
when I am installing visual studio 2010 SP1 I get an error.read POSTS .
why do i get error: 'strcmp': identifier not found in visual studio 2010 C++
I was deploying an Azure instance using Visual Studio (2010) and i get this:
In Visual Studio 2010 C++, I am reading argv[0] to get the working directory.
I am trying to get started in Visual Studio (2010) extensions and I am
I've been working with Visual Studio 2010 Beta-2 to get some advanced learning on

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.