I'm trying to build this simple ZeroMQ server in C++ on Visual Studio 2013.
#include "stdafx.h"
#include "zmq.hpp"
#include <string>
#include <iostream>
#include <windows.h>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
// Prepare context and socket
zmq::context_t ctx(1);
zmq::socket_t sckt(ctx, ZMQ_REP);
sckt.bind("tcp://*:5555");
while (true) {
zmq::message_t request;
// Wait for next request from client
sckt.recv(&request);
std::cout << "Received Hello" << endl;
Sleep(1);
// Send reply back to client
zmq::message_t reply(5);
memcpy((void*)reply.data(), "World", 5);
sckt.send(reply);
}
return EXIT_SUCCESS;
}
However, I'm getting error LNK2019 when I try to build the VS project. Below is the compiler output:
1>ZeroMQServer.obj : error LNK2019: unresolved external symbol __imp__zmq_errno referenced in function "public: __thiscall zmq::error_t::error_t(void)" (??0error_t#zmq##QAE#XZ)
1>ZeroMQServer.obj : error LNK2019: unresolved external symbol __imp__zmq_strerror referenced in function "public: virtual char const * __thiscall zmq::error_t::what(void)const " (?what#error_t#zmq##UBEPBDXZ)
1>ZeroMQServer.obj : error LNK2019: unresolved external symbol __imp__zmq_ctx_new referenced in function "public: __thiscall zmq::context_t::context_t(int,int)" (??0context_t#zmq##QAE#HH#Z)
1>ZeroMQServer.obj : error LNK2019: unresolved external symbol __imp__zmq_ctx_set referenced in function "public: __thiscall zmq::context_t::context_t(int,int)" (??0context_t#zmq##QAE#HH#Z)
1>ZeroMQServer.obj : error LNK2019: unresolved external symbol __imp__zmq_ctx_destroy referenced in function "public: void __thiscall zmq::context_t::close(void)" (?close#context_t#zmq##QAEXXZ)
1>ZeroMQServer.obj : error LNK2019: unresolved external symbol __imp__zmq_msg_init referenced in function "public: __thiscall zmq::message_t::message_t(void)" (??0message_t#zmq##QAE#XZ)
1>ZeroMQServer.obj : error LNK2019: unresolved external symbol __imp__zmq_msg_init_size referenced in function "public: __thiscall zmq::message_t::message_t(unsigned int)" (??0message_t#zmq##QAE#I#Z)
1>ZeroMQServer.obj : error LNK2019: unresolved external symbol __imp__zmq_msg_send referenced in function "public: bool __thiscall zmq::socket_t::send(class zmq::message_t &,int)" (?send#socket_t#zmq##QAE_NAAVmessage_t#2#H#Z)
1>ZeroMQServer.obj : error LNK2019: unresolved external symbol __imp__zmq_msg_recv referenced in function "public: bool __thiscall zmq::socket_t::recv(class zmq::message_t *,int)" (?recv#socket_t#zmq##QAE_NPAVmessage_t#2#H#Z)
1>ZeroMQServer.obj : error LNK2019: unresolved external symbol __imp__zmq_msg_close referenced in function "public: __thiscall zmq::message_t::~message_t(void)" (??1message_t#zmq##QAE#XZ)
1>ZeroMQServer.obj : error LNK2019: unresolved external symbol __imp__zmq_msg_data referenced in function "public: void * __thiscall zmq::message_t::data(void)" (?data#message_t#zmq##QAEPAXXZ)
1>ZeroMQServer.obj : error LNK2019: unresolved external symbol __imp__zmq_socket referenced in function "public: __thiscall zmq::socket_t::socket_t(class zmq::context_t &,int)" (??0socket_t#zmq##QAE#AAVcontext_t#1#H#Z)
1>ZeroMQServer.obj : error LNK2019: unresolved external symbol __imp__zmq_close referenced in function "public: void __thiscall zmq::socket_t::close(void)" (?close#socket_t#zmq##QAEXXZ)
1>ZeroMQServer.obj : error LNK2019: unresolved external symbol __imp__zmq_bind referenced in function "public: void __thiscall zmq::socket_t::bind(char const *)" (?bind#socket_t#zmq##QAEXPBD#Z)
1>D:\[ Source Code ]\C++\ZeroMQServer\Debug\ZeroMQServer.exe : fatal error LNK1120: 14 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I have installed the ZeroMQ binary v4.0.4 and updated the VS project properties to point to ZeroMQ's include and lib paths. Specifically, this is what I have updated in the project properties (I suspect some of these settings may be redundant):
Configuration Properties > VC++ Directories > Include Directories: Added '$(ZEROMQ_HOME)\include'
Configuration Properties > VC++ Directories > Library Directories: Added '$(ZEROMQ_HOME)\lib'
Configuration Properties > C/C++ > General > Additional Include Directories: Added '$(ZEROMQ_HOME)\include'
Configuration Properties > Linker > Input > Additional Dependencies: Added 'libzmq-v120-mt-4_0_4.lib;libzmq-v120-mt-gd-4_0_4.lib'
I'm on Win 7, 64-bit Edition.
Please help me resolve this.
According to the library names on zeromq.org, you are trying to link the same library twice: first with the release version, and then with the debug versions.
Remove libzmq-v120-mt-gd-4_0_4.lib from your Release configuration, and remove libzmq-v120-mt-4_0_4.lib from your Debug configuration.
[edit]
Your application probably is 32bit, and the library you are trying to link with is 64bit. (You can use dumpbin to determine what architecture a .lib file is for, see this answer for an example. Please use the 32bit library, or change your application to 64bit.
I had to define ZMQ_STATIC since I wanted to link zmq statically.
By default all these functions defined as
elif defined DLL_EXPORT
define ZMQ_EXPORT __declspec(dllexport)
I had the same errors. But for me they were produced by a wrong set calling convention.
(Just wanted to mention it here because it cost me more than a hour to track it.)
Related
I've been following a development tutorial for foobar2000 components, but keep getting build errors with only minimal code. My VS solution includes these projects from the foobar2000 SDK: foobar2000_component_client, foobar200_SDK, and pfc.
foo_playlists_tag.cpp:
#include "U:\SDK\Foobar2000-music-player\foobar2000\SDK\foobar2000.h"
DECLARE_COMPONENT_VERSION("Playlists tagger","0.0.1","About text here");
VALIDATE_COMPONENT_FILENAME("foo_playlists_tag.dll");
Build ouput:
1>------ Build started: Project: foo_playlists_tag, Configuration: Debug x64 ------
1> foo_playlists_tag.cpp
1>u:\sdk\foobar2000-music-player\foobar2000\shared\fb2kdebug.h(80): warning C4838: conversion from 'int' to 'const ULONG_PTR' requires a narrowing conversion
1>foo_playlists_tag.obj : error LNK2019: unresolved external symbol "void __cdecl pfc::myassert_win32(wchar_t const *,wchar_t const *,unsigned int)" (?myassert_win32#pfc##YAXPEB_W0I#Z) referenced in function __catch$??$service_add_ref_safe#Vcomponent_installation_validator####YAXPEAVcomponent_installation_validator###Z$0
1>foo_playlists_tag.obj : error LNK2019: unresolved external symbol "char const * __cdecl core_api::get_my_file_name(void)" (?get_my_file_name#core_api##YAPEBDXZ) referenced in function "public: virtual void __cdecl `anonymous namespace'::componentversion_myimpl::get_file_name(class pfc::string_base &)" (?get_file_name#componentversion_myimpl#?A0xa2c48e39##UEAAXAEAVstring_base#pfc###Z)
1>foo_playlists_tag.obj : error LNK2019: unresolved external symbol "bool __cdecl core_api::are_services_available(void)" (?are_services_available#core_api##YA_NXZ) referenced in function "protected: __cdecl service_factory_base::service_factory_base(struct _GUID const &,class service_factory_base * &)" (??0service_factory_base##IEAA#AEBU_GUID##AEAPEAV0##Z)
1>foo_playlists_tag.obj : error LNK2019: unresolved external symbol "public: static bool __cdecl component_installation_validator::test_my_name(char const *)" (?test_my_name#component_installation_validator##SA_NPEBD#Z) referenced in function "public: virtual bool __cdecl component_installation_validator_filename::is_installed_correctly(void)" (?is_installed_correctly#component_installation_validator_filename##UEAA_NXZ)
1>foo_playlists_tag.obj : error LNK2001: unresolved external symbol "public: static class service_factory_base * service_factory_base::__internal__list" (?__internal__list#service_factory_base##2PEAV1#EA)
1>foo_playlists_tag.obj : error LNK2001: unresolved external symbol "public: static struct _GUID const componentversion::class_guid" (?class_guid#componentversion##2U_GUID##B)
1>foo_playlists_tag.obj : error LNK2001: unresolved external symbol "public: static struct _GUID const component_installation_validator::class_guid" (?class_guid#component_installation_validator##2U_GUID##B)
1>U:\Repositories\foo_playlists_tag\x64\Debug\foo_playlists_tag.dll : fatal error LNK1120: 7 unresolved externals
========== Build: 0 succeeded, 1 failed, 3 up-to-date, 0 skipped ==========
Where are these errors coming from? and how can I resovle them?
Any assistance is greatly appreciated.
Found my answer on hydrogenaud.io by user kode54:
In Visual Studio 2010, you must add all dependencies directly to the project you are trying to link, as references. You may find the references list in the Properties dialog for the project, under Common Properties, Frameworks and References. The old style Dependencies dialog doesn't seem to function for that purpose past Visual Studio 2008.
Thank you for your assistance; helped me find that lib file.
I recently started again on a C++ application. I am using NetLink for Sockets and Visual Studio for developing.
I made a small code but I got some errors. I've included the files from NetLink and I added ws2_32.lib (in linker/general & as pragma comment), but I still got these errors:
Error 1 error LNK2019: unresolved external symbol "void __cdecl NL::init(void)" (?init#NL##YAXXZ) referenced in function _main c:\Users\Joshua\documents\visual studio 2012\Projects\OBPP\OBPP\Main.obj
Error 4 error LNK2019: unresolved external symbol "public: class NL::Socket * __thiscall NL::Socket::accept(void)" (?accept#Socket#NL##QAEPAV12#XZ) referenced in function "private: virtual void __thiscall OnAccept::exec(class NL::Socket *,class NL::SocketGroup *,void *)" (?exec#OnAccept##EAEXPAVSocket#NL##PAVSocketGroup#3#PAX#Z) c:\Users\Joshua\documents\visual studio 2012\Projects\OBPP\OBPP\Main.obj
Error 6 error LNK2019: unresolved external symbol "public: bool __thiscall NL::SocketGroup::listen(unsigned int,void *)" (?listen#SocketGroup#NL##QAE_NIPAX#Z) referenced in function _main c:\Users\Joshua\documents\visual studio 2012\Projects\OBPP\OBPP\Main.obj
Error 5 error LNK2019: unresolved external symbol "public: __thiscall NL::SocketGroup::SocketGroup(void)" (??0SocketGroup#NL##QAE#XZ) referenced in function _main c:\Users\Joshua\documents\visual studio 2012\Projects\OBPP\OBPP\Main.obj
Error 2 error LNK2019: unresolved external symbol "public: __thiscall NL::Socket::Socket(unsigned int,enum NL::Protocol,enum NL::IPVer,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned int)" (??0Socket#NL##QAE#IW4Protocol#1#W4IPVer#1#ABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##I#Z) referenced in function _main c:\Users\Joshua\documents\visual studio 2012\Projects\OBPP\OBPP\Main.obj
Error 3 error LNK2019: unresolved external symbol "public: __thiscall NL::Socket::~Socket(void)" (??1Socket#NL##QAE#XZ) referenced in function _main c:\Users\Joshua\documents\visual studio 2012\Projects\OBPP\OBPP\Main.obj
Error 7 error LNK1120: 6 unresolved externals c:\users\joshua\documents\visual studio 2012\Projects\OBPP\Debug\OBPP.exe
Code I'm using (just wanted to try out accepting):
#include <iostream>
#include "netlink\socket.h"
#include "netlink\socket_group.h"
#pragma comment(lib, "Ws2_32.lib")
#define PORT 30000
class OnAccept: public NL::SocketGroupCmd {
void exec(NL::Socket* socket, NL::SocketGroup* group, void* reference) {
NL::Socket* newConnection = socket->accept();
group->add(newConnection);
std::cout << "\nConnection " << newConnection->hostTo() << ":" << newConnection->portTo() << " added...";
std::cout.flush();
}
};
int main()
{
NL::init();
NL::Socket s(PORT);
NL::SocketGroup group;
group.setCmdOnAccept(&OnAccept());
group.add(&s);
if (group.listen(2000))
{
std::cout << "Listening on Sockets, port " << PORT << std::endl;
}
getchar();
}
I am the developer of the library. It can't be used with the headers only, you need to link the static/dynamic compiled library.
You have to build the library first, to generate the .lib file. Once you have the netLink.lib file built (or whatever you name it) you have to add that dependency to the linker.
I am not visual studio developer, But error message says unresolved external symbol means linker is not able to find some symbols.
Look at you linking command does it include Netlink library?
This question already has answers here:
What is an undefined reference/unresolved external symbol error and how do I fix it?
(39 answers)
Closed 6 years ago.
I'm a beginner C++ programmer. I'm trying Google Test in Visual Studio 2012 and have problem starting a demo source code I got from internet.
int CompareChar(char* ch1, char* ch2)
{
if (ch1 == NULL || ch2 == NULL)
return 88;
return strcmp(ch1, ch2);
}
TEST(CompareCharTest, InputChar) {
// Expect equal
EXPECT_EQ(0, CompareChar("hello", "hello"));
// Expect not equal
EXPECT_NE(0, CompareChar("hello", "world"));
}
TEST(SampleClassTest, InputNumber) {
SampleClass sample(10);
EXPECT_EQ(1, sample.CompareValue(10)); // Expect equal
}
int _tmain(int argc, _TCHAR* argv[])
{
::testing::InitGoogleTest(&argc, argv);
int i = RUN_ALL_TESTS();
getchar();
return i;
}
So, when I try to build the code, it generates dozens of linking errors which I couldn't sort out. I tried to include .lib files in the property of the project but couldn't solve it.
The error:
>1>------ Build started: Project: GTestSample, Configuration: Release Win32 ------
>1> stdafx.cpp
1> GTestSample.cpp
1>GTestSample.obj : error LNK2001: unresolved external symbol "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall testing::Message::GetString(void)const " (?GetString#Message#testing##QBE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##XZ)
1>GTestSample.obj : error LNK2001: unresolved external symbol "public: __thiscall testing::Message::Message(void)" (??0Message#testing##QAE#XZ)
1>GTestSample.obj : error LNK2001: unresolved external symbol "public: static class testing::UnitTest * __cdecl testing::UnitTest::GetInstance(void)" (?GetInstance#UnitTest#testing##SAPAV12#XZ)
1>GTestSample.obj : error LNK2001: unresolved external symbol "public: int __thiscall testing::UnitTest::Run(void)" (?Run#UnitTest#testing##QAEHXZ)
1>GTestSample.obj : error LNK2001: unresolved external symbol "protected: __thiscall testing::Test::Test(void)" (??0Test#testing##IAE#XZ)
1>GTestSample.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall testing::Test::~Test(void)" (??1Test#testing##UAE#XZ)
1>GTestSample.obj : error LNK2001: unresolved external symbol "class testing::TestInfo * __cdecl testing::internal::MakeAndRegisterTestInfo(char const *,char const *,char const *,char const *,void const *,void (__cdecl*)(void),void (__cdecl*)(void),class testing::internal::TestFactoryBase *)" (?MakeAndRegisterTestInfo#internal#testing##YAPAVTestInfo#2#PBD000PBXP6AXXZ2PAVTestFactoryBase#12##Z)
1>GTestSample.obj : error LNK2001: unresolved external symbol "void const * __cdecl testing::internal::GetTestTypeId(void)" (?GetTestTypeId#internal#testing##YAPBXXZ)
1>GTestSample.obj : error LNK2001: unresolved external symbol "public: void __thiscall testing::internal::AssertHelper::operator=(class testing::Message const &)const " (??4AssertHelper#internal#testing##QBEXABVMessage#2##Z)
1>GTestSample.obj : error LNK2001: unresolved external symbol "public: __thiscall testing::internal::AssertHelper::AssertHelper(enum testing::TestPartResult::Type,char const *,int,char const *)" (??0AssertHelper#internal#testing##QAE#W4Type#TestPartResult#2#PBDH1#Z)
1>GTestSample.obj : error LNK2001: unresolved external symbol "public: __thiscall testing::internal::AssertHelper::~AssertHelper(void)" (??1AssertHelper#internal#testing##QAE#XZ)
1>GTestSample.obj : error LNK2001: unresolved external symbol "void __cdecl testing::InitGoogleTest(int *,wchar_t * *)" (?InitGoogleTest#testing##YAXPAHPAPA_W#Z)
1>GTestSample.obj : error LNK2001: unresolved external symbol "bool __cdecl testing::internal::IsTrue(bool)" (?IsTrue#internal#testing##YA_N_N#Z)
1>GTestSample.obj : error LNK2001: unresolved external symbol "class testing::AssertionResult __cdecl testing::AssertionSuccess(void)" (?AssertionSuccess#testing##YA?AVAssertionResult#1#XZ)
1>GTestSample.obj : error LNK2001: unresolved external symbol "public: __thiscall testing::AssertionResult::AssertionResult(class testing::AssertionResult const &)" (??0AssertionResult#testing##QAE#ABV01##Z)
1>GTestSample.obj : error LNK2001: unresolved external symbol "class testing::AssertionResult __cdecl testing::AssertionFailure(void)" (?AssertionFailure#testing##YA?AVAssertionResult#1#XZ)
1>GTestSample.obj : error LNK2001: unresolved external symbol "class testing::AssertionResult __cdecl testing::internal::EqFailure(char const *,char const *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool)" (?EqFailure#internal#testing##YA?AVAssertionResult#2#PBD0ABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##1_N#Z)
1>GTestSample.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall testing::Test::SetUp(void)" (?SetUp#Test#testing##MAEXXZ)
1>GTestSample.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall testing::Test::TearDown(void)" (?TearDown#Test#testing##MAEXXZ)
1>D:\VisualStudioProj\GTestSample\Release\GTestSample.exe : fatal error LNK1120: 19 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I had the same issue. Make sure that in your test project's properties, you go into Project->Linker->General settings and add the msvc/Release directory to Additional Directories. Furthermore, under Linker->Input, add gtest.lib into Additional Dependencies. Then you should be good to go!
I know this post is old, but it could still help anyone out. A quick Google search for "LNK2019 unresolved external symbol "bool __cdecl testing::internal::IsTrue ..." as stated above gives this stackoverflow and several sites with the same answers.
For those that tried Oleg Vaskevich solution or similar and failed, try this. If you are using Visual Studio, C/C++ -> General -> Additional Include Directories and make sure that the gtest is included. Secondly, (which will likely be your answer), copy the gtest-all.cc in the gtest/scr/ folder and paste in your project directory (wherever your .cpp/.h files are saved), then go back to Visual Studio and include it in your project. You will have to unhide files/folders to view it. 'Include to project'.
I know that copying and pasting this isn't ideal for every project, but the point is to at least get it working and making sure this is the true problem and not something else.
Because I never complied my version, I never had any lib files to begin with.
I'm trying to use Task Schedule throulg Visual c++. I'm using Ctask.h (from here)
to do the task. However, when I build the solution (using Visual Studio 11), it says
fatal error C1189: #error : Please use the /MD switch for _AFXDLL builds
When I switch to /MD, it gives this error
ConsoleApplication12.obj : error LNK2019: unresolved external symbol "public: __thiscall CTask::CTask(void)" (??0CTask##QAE#XZ) referenced in function _wmain
1>ConsoleApplication12.obj : error LNK2019: unresolved external symbol "public: void __thiscall CTask::SetStartDateTime(class ATL::CTime const &)" (?SetStartDateTime#CTask##QAEXABVCTime#ATL###Z) referenced in function _wmain
1>ConsoleApplication12.obj : error LNK2019: unresolved external symbol "public: void __thiscall CTask::SetFrequency(enum CTask::ETaskFrequency)" (?SetFrequency#CTask##QAEXW4ETaskFrequency#1##Z) referenced in function _wmain
1>ConsoleApplication12.obj : error LNK2019: unresolved external symbol "public: void __thiscall CTask::SetProgram(wchar_t const *)" (?SetProgram#CTask##QAEXPB_W#Z) referenced in function _wmain
1>ConsoleApplication12.obj : error LNK2019: unresolved external symbol "public: void __thiscall CTask::SetAccountName(wchar_t const *)" (?SetAccountName#CTask##QAEXPB_W#Z) referenced in function _wmain
1>ConsoleApplication12.obj : error LNK2019: unresolved external symbol "public: long __thiscall CTask::SaveTask(wchar_t const *,int)const " (?SaveTask#CTask##QBEJPB_WH#Z) referenced in function _wmain
1>ConsoleApplication12.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall CTask::~CTask(void)" (??1CTask##UAE#XZ) referenced in function _wmain
same is the case with other linking option. This is thecode I've typed:
#include "stdafx.h"
#include "CTask.h"
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
CTask task;
CTime time(2013, 03, 15, 7, 11, 0);
LPCTSTR sTaskName( L"Task Name" );
BOOL replace = TRUE;
task.SetProgram( L"E:\\aaa.txt" );
task.SetAccountName( L"harshilsharma63" );
task.SetStartDateTime( time );
task.SetFrequency( CTask::freqOnce );
if( S_OK == task.SaveTask( sTaskName, replace))
{
cout << "task successfully created!";
return 0;
}
else
{
cout << "task creation failed!";
return 1;
}
return 0;
}
I have already set "Use MFC in" to "Use MFC in shared DLL".
I don't see any indication that you actually have put the CTask.cpp into your project. Including the header only will result in the linker errors you see, you need the .cpp, too.
You need add to your project the CTask.cpp as well as CTask.h. The original project http://www.codeproject.com/Articles/13089/Harnessing-the-task-scheduler can be compiled without any trouble - I just checked it!
I am quite new to C++ so I downloaded a sample C++ program. The sample program seems to hit the following error when it is compiling :-
Error 22 error LNK2019: unresolved external symbol _acsEnumServerNames#12 referenced in function "protected: virtual int __thiscall COpenTsrv::OnInitDialog(void)" (?OnInitDialog#COpenTsrv##MAEHXZ) Opentsrv.obj
I traced it to the referred function but I do not know anything wrong with it ?
BOOL COpenTsrv::OnInitDialog()
{
CDialog::OnInitDialog();
CenterWindow();
acsEnumServerNames(ST_CSTA, AddToList, (unsigned long) (CComboBox*)&m_TserverListControl);
UpdateData(FALSE);
The following is the build log. Apparently there are still other errors but would like to start with the first one.
1>Generating Code...
1>Compiling resources...
1>Compiling manifest to resources...
1>Linking...
1>Opentsrv.obj : error LNK2019: unresolved external symbol _acsEnumServerNames#12 referenced in function "protected: virtual int __thiscall COpenTsrv::OnInitDialog(void)" (? OnInitDialog#COpenTsrv##MAEHXZ)
1>Opentsrv.obj : error LNK2019: unresolved external symbol _acsQueryAuthInfo#8 referenced in function "protected: void __thiscall COpenTsrv::OnSelchangeTserverlist(void)" (?OnSelchangeTserverlist#COpenTsrv##IAEXXZ)
1>Opentsrv.obj : error LNK2019: unresolved external symbol _acsAbortStream#8 referenced in function "protected: virtual void __thiscall COpenTsrv::OnOK(void)" (?OnOK#COpenTsrv##MAEXXZ)
1>Tsapi.obj : error LNK2001: unresolved external symbol _acsAbortStream#8
1>Opentsrv.obj : error LNK2019: unresolved external symbol _acsEventNotify#16 referenced in function "protected: virtual void __thiscall COpenTsrv::OnOK(void)" (?OnOK#COpenTsrv##MAEXXZ)
1>Opentsrv.obj : error LNK2019: unresolved external symbol _acsOpenStream#60 referenced in function "protected: virtual void __thiscall COpenTsrv::OnOK(void)" (?OnOK#COpenTsrv##MAEXXZ)
1>Opentsrv.obj : error LNK2019: unresolved external symbol _cstaMonitorDevice#20 referenced in function "protected: long __thiscall COpenTsrv::OnTsapiAcsConfirmation(unsigned int,long)" (?OnTsapiAcsConfirmation#COpenTsrv##IAEJIJ#Z)
1>Sampldlg.obj : error LNK2019: unresolved external symbol _cstaMakeCall#20 referenced in function "protected: void __thiscall CSampleDlg::OnCall(void)" (?OnCall#CSampleDlg##IAEXXZ)
1>Sampldlg.obj : error LNK2019: unresolved external symbol _cstaClearConnection#16 referenced in function "protected: void __thiscall CSampleDlg::OnHangup(void)" (?OnHangup#CSampleDlg##IAEXXZ)
1>Sampldlg.obj : error LNK2019: unresolved external symbol _cstaAnswerCall#16 referenced in function "protected: void __thiscall CSampleDlg::OnAnswer(void)" (?OnAnswer#CSampleDlg##IAEXXZ)
1>Tsapi.obj : error LNK2019: unresolved external symbol _acsGetEventPoll#20 referenced in function "protected: long __thiscall CTsapiWnd::OnTsapiMsg(unsigned int,long)" (?OnTsapiMsg#CTsapiWnd##IAEJIJ#Z)
1>C:\Users\steventang\Documents\Visual Studio 2005\Projects\TSAPINEW\Debug\TSAPINEW.exe : fatal error LNK1120: 10 unresolved externals
1>Build log was saved at "file://c:\Users\steventang\Documents\Visual Studio 2005\Projects\TSAPINEW\TSAPINEW\Debug\BuildLog.htm"
1>TSAPINEW - 12 error(s), 21 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
Any help to point me to the right direction would very much be appreciated.
Thanks
Seems like your compilation was sucessfull. Only the linking did not work.
Probably the linker is complaining because you defined the header of the method "acsEnumServerNames" but you did not provide an implementation of the method.
Maybe you used a header-file but you did not provide the library to which the header belongs ?
Find out to which pakage "acsEnumServerNames" belongs and check if you have the implementation of the method in some .c/.cpp file, or if the implementation should be provided by some library on which you do rely.