0

I am sure this question has been asked before, but I've searched the SO as much I could and still couldn't find the exact reason for the error. Thus posting a new one.

I am using a C++ library (txmpp) in my project. The library is added properly, but I am getting a lot of unresolved external symbol issue, mostly in constructor of the classes I am trying to use. For example, in the following class -

xmppthread.h

#ifndef _HELLO_XMPPTHREAD_H_
#define _HELLO_XMPPTHREAD_H_

#include "../../thread.h"
#include "../../xmppclientsettings.h"
#include "xmpppump.h"

namespace txmpp {

class XmppThread: public txmpp::Thread, XmppPumpNotify, txmpp::MessageHandler {
  public:
    XmppThread();
    ~XmppThread();

    XmppClient* client() { return pump_->client(); }

    void ProcessMessages(int cms);
    void Login(const txmpp::XmppClientSettings & xcs);
    void Disconnect();

  private:
    XmppPump* pump_;

    void OnStateChange(txmpp::XmppEngine::State state);
    void OnMessage(txmpp::Message* pmsg);
};

}  // namespace txmpp

#endif  // _HELLO_XMPPTHREAD_H_

xmppthread.cc

#include "xmppthread.h"

#include <assert.h>
#include "../../prexmppauthimpl.h"
#include "../../xmppasyncsocketimpl.h"
#include "../../xmppclientsettings.h"

namespace txmpp {
namespace {

const uint32 MSG_LOGIN = 1;
const uint32 MSG_DISCONNECT = 2;

struct LoginData : public MessageData {
  LoginData(const XmppClientSettings& s) : xcs(s) {}
  virtual ~LoginData() {}
  XmppClientSettings xcs;
};

} // namespace

XmppThread::XmppThread() {
  pump_ = new XmppPump(this);
}

XmppThread::~XmppThread() {
  delete pump_;
}

void XmppThread::ProcessMessages(int cms) {
  Thread::ProcessMessages(cms);
}

void XmppThread::Login(const XmppClientSettings& xcs) {
  Post(this, MSG_LOGIN, new LoginData(xcs));
}

void XmppThread::Disconnect() {
  Post(this, MSG_DISCONNECT);
}

void XmppThread::OnStateChange(XmppEngine::State state) {
}

void XmppThread::OnMessage(Message* pmsg) {
  switch (pmsg->message_id) {
    case MSG_LOGIN: {
      assert(pmsg->pdata);
      LoginData* data = reinterpret_cast<LoginData*>(pmsg->pdata);
      pump_->DoLogin(data->xcs, new XmppAsyncSocketImpl(true),
                     new PreXmppAuthImpl());
      delete data;
      }
      break;
    case MSG_DISCONNECT:
      pump_->DoDisconnect();
      break;
    default:
      assert(false);
  }
}

}  // namespace hello

I am getting the following error -

1>XMPPController.obj : error LNK2019: unresolved external symbol "public: __thiscall txmpp::XmppThread::XmppThread(void)" (??0XmppThread@txmpp@@QAE@XZ) referenced in function "public: void __thiscall XMPPController::Init(void)" (?Init@XMPPController@@QAEXXZ)
1>XMPPController.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall txmpp::XmppThread::~XmppThread(void)" (??1XmppThread@txmpp@@UAE@XZ) referenced in function "public: void __thiscall XMPPController::Init(void)" (?Init@XMPPController@@QAEXXZ)

I usually see this kinda linker error only when the definition of the function(constructor/destructor in this case) is not provided. However as you can see the definition is included. This error generates only when I do this in my project -

xmpp::XmppThread thread;

As soon as I remove the declaration statement, the linking error goes. The issue is none of this code is written by me and have been taken from the txmpp library. This particular class is from libjingle library of Google, so I am sure I am making some really silly mistake here.

I don't want this question to be a "Here's my code, solve it" one. Instead I want to know what could be the circumstances in which unresolved external symbol error can occur despite having declaration?(The code is there to provide proof that the implementation is there)

Any suggestion?

Update
Here's the exact output I am getting after turning off supress startup banner option -

 1>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/FORCE' specification
    1>AirPlaySystem.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:LBR' specification
    1>LIBCMTD.lib(sscanf.obj) : warning LNK4006: _vsscanf already defined in s3e_d.lib(iwcrt_win32.obj); second definition ignored
    1>LIBCMTD.lib(strtoq.obj) : warning LNK4006: _strtof already defined in s3e_d.lib(iwcrt_common.obj); second definition ignored
    1>     Creating library Debug_BarnC_vc12_x86\BarnC.lib and object Debug_BarnC_vc12_x86\BarnC.exp
    1>XMPPController.obj : error LNK2019: unresolved external symbol "public: __thiscall txmpp::XmppThread::XmppThread(void)" (??0XmppThread@txmpp@@QAE@XZ) referenced in function "public: void __thiscall XMPPController::Init(void)" (?Init@XMPPController@@QAEXXZ)
    1>XMPPController.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall txmpp::XmppThread::~XmppThread(void)" (??1XmppThread@txmpp@@UAE@XZ) referenced in function "public: void __thiscall XMPPController::Init(void)" (?Init@XMPPController@@QAEXXZ)
    1>Debug_BarnC_vc12_x86\BarnC.s86 : fatal error LNK1120: 2 unresolved externals
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Update 2: This is the detailed linker output after adding verbose linker command line option -

1>  Microsoft (R) Incremental Linker Version 12.00.31101.0
1>  Copyright (C) Microsoft Corporation.  All rights reserved.
1>  
1>  "/OUT:Debug_BarnC_vc12_x86\BarnC.s86" /INCREMENTAL /LIBPATH:d:/marmalade/7.4/modules/third_party/sqlite/lib/x86 /LIBPATH:d:/marmalade/7.4/modules/iwutil/lib/x86 /LIBPATH:d:/marmalade/7.4/modules/third_party/libjpeg/lib/x86 /LIBPATH:d:/marmalade/7.4/modules/third_party/zlib/lib/x86 /LIBPATH:d:/marmalade/7.4/modules/third_party/libpng/lib/x86 /LIBPATH:d:/marmalade/7.4/modules/iw2d/lib/x86 /LIBPATH:d:/marmalade/7.4/modules/iwgx/atitools /LIBPATH:d:/marmalade/7.4/modules/iwgx/lib/x86 /LIBPATH:d:/marmalade/7.4/modules/iwgl/lib/x86 /LIBPATH:d:/marmalade/7.4/modules/iwgeom/lib/x86 /LIBPATH:d:/marmalade/7.4/modules/iwresmanager/lib/x86 /LIBPATH:d:/marmalade/7.4/modules/iwgxfont/lib/x86 /LIBPATH:d:/marmalade/7.4/modules/third_party/tiniconv/lib/x86 /LIBPATH:d:/marmalade/7.4/modules/iwui/lib/x86 /LIBPATH:d:/marmalade/7.4/modules/iwhttp/lib/x86 /LIBPATH:d:/marmalade/7.4/extensions/s3etxmpp/lib/x86 /LIBPATH:d:/marmalade/7.4/s3e/lib/x86 vc6_compat.lib sqlite_d.lib iwutil_d.lib jpeg_d.lib z_d.lib png_d.lib iw2d_d.lib ATI_Compress_MT_VC7.lib iwgx_d.lib iwgl_d.lib iwgeom_d.lib iwresmanager_d.lib iwgxfont_ttf_d.lib tiniconv_d.lib iwui_d.lib iwhttp_d.lib s3eTxmpp_d.lib s3e_cpp_d.lib s3e_d.lib s3e_api_iwgl.lib /NODEFAULTLIB:libcmt /MANIFEST:NO /DEBUG "/PDB:Debug_BarnC_vc12_x86\BarnC.pdb" /SUBSYSTEM:WINDOWS /OPT:NOREF /OPT:NOICF /TLBID:1 "/ENTRY:DllEntryPoint" /DYNAMICBASE /NXCOMPAT "/IMPLIB:Debug_BarnC_vc12_x86\BarnC.lib" /MACHINE:X86 /include:_IwMain /include:_raise /include:_DllEntryPoint@12 /force:multiple /VERBOSE:LIB /DLL Debug_BarnC_vc12_x86\AirPlaySystem.obj 
1>  Debug_BarnC_vc12_x86\CTextField.obj 
1>  Debug_BarnC_vc12_x86\Chat.obj 
1>  Debug_BarnC_vc12_x86\ChatController.obj 
1>  Debug_BarnC_vc12_x86\ChatGroup.obj 
1>  Debug_BarnC_vc12_x86\ChatMenu.obj 
1>  Debug_BarnC_vc12_x86\Contact.obj 
1>  Debug_BarnC_vc12_x86\ContactController.obj 
1>  Debug_BarnC_vc12_x86\HttpManager.obj 
1>  Debug_BarnC_vc12_x86\LoginMenu.obj 
1>  Debug_BarnC_vc12_x86\Main.obj 
1>  Debug_BarnC_vc12_x86\MainMenu.obj 
1>  Debug_BarnC_vc12_x86\MenuBase.obj 
1>  Debug_BarnC_vc12_x86\MenuController.obj 
1>  Debug_BarnC_vc12_x86\PVRTexTool_interface.obj 
1>  Debug_BarnC_vc12_x86\SimpleTouch.obj 
1>  Debug_BarnC_vc12_x86\UnivApp.obj 
1>  Debug_BarnC_vc12_x86\XMPPController.obj 
1>  Debug_BarnC_vc12_x86\md5c.obj 
1>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/FORCE' specification
1>AirPlaySystem.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:LBR' specification
1>  
1>  Searching libraries
1>      Searching d:/marmalade/7.4/modules/third_party/sqlite/lib/x86\sqlite_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwutil/lib/x86\iwutil_d.lib:
1>      Searching d:/marmalade/7.4/modules/third_party/libjpeg/lib/x86\jpeg_d.lib:
1>      Searching d:/marmalade/7.4/modules/third_party/zlib/lib/x86\z_d.lib:
1>      Searching d:/marmalade/7.4/modules/third_party/libpng/lib/x86\png_d.lib:
1>      Searching d:/marmalade/7.4/modules/iw2d/lib/x86\iw2d_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwgx/atitools\ATI_Compress_MT_VC7.lib:
1>      Searching d:/marmalade/7.4/modules/iwgx/lib/x86\iwgx_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwgl/lib/x86\iwgl_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwgeom/lib/x86\iwgeom_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwresmanager/lib/x86\iwresmanager_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwgxfont/lib/x86\iwgxfont_ttf_d.lib:
1>      Searching d:/marmalade/7.4/modules/third_party/tiniconv/lib/x86\tiniconv_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwui/lib/x86\iwui_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwhttp/lib/x86\iwhttp_d.lib:
1>      Searching d:/marmalade/7.4/extensions/s3etxmpp/lib/x86\s3eTxmpp_d.lib:
1>      Searching d:/marmalade/7.4/s3e/lib/x86\s3e_cpp_d.lib:
1>      Searching d:/marmalade/7.4/s3e/lib/x86\s3e_d.lib:
1>      Searching d:/marmalade/7.4/s3e/lib/x86\s3e_api_iwgl.lib:
1>      Searching C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\OLDNAMES.lib:
1>      Searching C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\LIBCMTD.lib:
1>LIBCMTD.lib(sscanf.obj) : warning LNK4006: _vsscanf already defined in s3e_d.lib(iwcrt_win32.obj); second definition ignored
1>LIBCMTD.lib(strtoq.obj) : warning LNK4006: _strtof already defined in s3e_d.lib(iwcrt_common.obj); second definition ignored
1>      Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\uuid.lib:
1>      Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\kernel32.lib:
1>      Searching d:/marmalade/7.4/modules/third_party/sqlite/lib/x86\sqlite_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwutil/lib/x86\iwutil_d.lib:
1>      Searching d:/marmalade/7.4/modules/third_party/libjpeg/lib/x86\jpeg_d.lib:
1>      Searching d:/marmalade/7.4/modules/third_party/zlib/lib/x86\z_d.lib:
1>      Searching d:/marmalade/7.4/modules/third_party/libpng/lib/x86\png_d.lib:
1>      Searching d:/marmalade/7.4/modules/iw2d/lib/x86\iw2d_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwgx/atitools\ATI_Compress_MT_VC7.lib:
1>      Searching d:/marmalade/7.4/modules/iwgx/lib/x86\iwgx_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwgl/lib/x86\iwgl_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwgeom/lib/x86\iwgeom_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwresmanager/lib/x86\iwresmanager_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwgxfont/lib/x86\iwgxfont_ttf_d.lib:
1>      Searching d:/marmalade/7.4/modules/third_party/tiniconv/lib/x86\tiniconv_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwui/lib/x86\iwui_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwhttp/lib/x86\iwhttp_d.lib:
1>      Searching d:/marmalade/7.4/extensions/s3etxmpp/lib/x86\s3eTxmpp_d.lib:
1>      Searching d:/marmalade/7.4/s3e/lib/x86\s3e_cpp_d.lib:
1>      Searching d:/marmalade/7.4/s3e/lib/x86\s3e_d.lib:
1>      Searching d:/marmalade/7.4/s3e/lib/x86\s3e_api_iwgl.lib:
1>      Searching C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\OLDNAMES.lib:
1>      Searching C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\LIBCMTD.lib:
1>      Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\uuid.lib:
1>      Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\kernel32.lib:
1>      Searching d:/marmalade/7.4/modules/third_party/sqlite/lib/x86\sqlite_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwutil/lib/x86\iwutil_d.lib:
1>      Searching d:/marmalade/7.4/modules/third_party/libjpeg/lib/x86\jpeg_d.lib:
1>      Searching d:/marmalade/7.4/modules/third_party/zlib/lib/x86\z_d.lib:
1>      Searching d:/marmalade/7.4/modules/third_party/libpng/lib/x86\png_d.lib:
1>      Searching d:/marmalade/7.4/modules/iw2d/lib/x86\iw2d_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwgx/atitools\ATI_Compress_MT_VC7.lib:
1>      Searching d:/marmalade/7.4/modules/iwgx/lib/x86\iwgx_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwgl/lib/x86\iwgl_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwgeom/lib/x86\iwgeom_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwresmanager/lib/x86\iwresmanager_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwgxfont/lib/x86\iwgxfont_ttf_d.lib:
1>      Searching d:/marmalade/7.4/modules/third_party/tiniconv/lib/x86\tiniconv_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwui/lib/x86\iwui_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwhttp/lib/x86\iwhttp_d.lib:
1>      Searching d:/marmalade/7.4/extensions/s3etxmpp/lib/x86\s3eTxmpp_d.lib:
1>      Searching d:/marmalade/7.4/s3e/lib/x86\s3e_cpp_d.lib:
1>  
1>  Finished searching libraries
1>     Creating library Debug_BarnC_vc12_x86\BarnC.lib and object Debug_BarnC_vc12_x86\BarnC.exp
1>  
1>  Searching libraries
1>      Searching d:/marmalade/7.4/modules/third_party/sqlite/lib/x86\sqlite_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwutil/lib/x86\iwutil_d.lib:
1>      Searching d:/marmalade/7.4/modules/third_party/libjpeg/lib/x86\jpeg_d.lib:
1>      Searching d:/marmalade/7.4/modules/third_party/zlib/lib/x86\z_d.lib:
1>      Searching d:/marmalade/7.4/modules/third_party/libpng/lib/x86\png_d.lib:
1>      Searching d:/marmalade/7.4/modules/iw2d/lib/x86\iw2d_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwgx/atitools\ATI_Compress_MT_VC7.lib:
1>      Searching d:/marmalade/7.4/modules/iwgx/lib/x86\iwgx_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwgl/lib/x86\iwgl_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwgeom/lib/x86\iwgeom_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwresmanager/lib/x86\iwresmanager_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwgxfont/lib/x86\iwgxfont_ttf_d.lib:
1>      Searching d:/marmalade/7.4/modules/third_party/tiniconv/lib/x86\tiniconv_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwui/lib/x86\iwui_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwhttp/lib/x86\iwhttp_d.lib:
1>      Searching d:/marmalade/7.4/extensions/s3etxmpp/lib/x86\s3eTxmpp_d.lib:
1>      Searching d:/marmalade/7.4/s3e/lib/x86\s3e_cpp_d.lib:
1>      Searching d:/marmalade/7.4/s3e/lib/x86\s3e_d.lib:
1>      Searching d:/marmalade/7.4/s3e/lib/x86\s3e_api_iwgl.lib:
1>      Searching C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\OLDNAMES.lib:
1>      Searching C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\LIBCMTD.lib:
1>      Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\uuid.lib:
1>      Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\kernel32.lib:
1>  
1>  Finished searching libraries
1>  
1>  Searching libraries
1>      Searching d:/marmalade/7.4/modules/third_party/sqlite/lib/x86\sqlite_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwutil/lib/x86\iwutil_d.lib:
1>      Searching d:/marmalade/7.4/modules/third_party/libjpeg/lib/x86\jpeg_d.lib:
1>      Searching d:/marmalade/7.4/modules/third_party/zlib/lib/x86\z_d.lib:
1>      Searching d:/marmalade/7.4/modules/third_party/libpng/lib/x86\png_d.lib:
1>      Searching d:/marmalade/7.4/modules/iw2d/lib/x86\iw2d_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwgx/atitools\ATI_Compress_MT_VC7.lib:
1>      Searching d:/marmalade/7.4/modules/iwgx/lib/x86\iwgx_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwgl/lib/x86\iwgl_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwgeom/lib/x86\iwgeom_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwresmanager/lib/x86\iwresmanager_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwgxfont/lib/x86\iwgxfont_ttf_d.lib:
1>      Searching d:/marmalade/7.4/modules/third_party/tiniconv/lib/x86\tiniconv_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwui/lib/x86\iwui_d.lib:
1>      Searching d:/marmalade/7.4/modules/iwhttp/lib/x86\iwhttp_d.lib:
1>      Searching d:/marmalade/7.4/extensions/s3etxmpp/lib/x86\s3eTxmpp_d.lib:
1>      Searching d:/marmalade/7.4/s3e/lib/x86\s3e_cpp_d.lib:
1>      Searching d:/marmalade/7.4/s3e/lib/x86\s3e_d.lib:
1>      Searching d:/marmalade/7.4/s3e/lib/x86\s3e_api_iwgl.lib:
1>      Searching C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\OLDNAMES.lib:
1>      Searching C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\LIBCMTD.lib:
1>      Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\uuid.lib:
1>      Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\kernel32.lib:
1>  
1>  Finished searching libraries
1>XMPPController.obj : error LNK2019: unresolved external symbol "public: __thiscall txmpp::XmppThread::XmppThread(void)" (??0XmppThread@txmpp@@QAE@XZ) referenced in function "public: void __thiscall XMPPController::Init(void)" (?Init@XMPPController@@QAEXXZ)
1>XMPPController.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall txmpp::XmppThread::~XmppThread(void)" (??1XmppThread@txmpp@@UAE@XZ) referenced in function "public: void __thiscall XMPPController::Init(void)" (?Init@XMPPController@@QAEXXZ)
1>Debug_BarnC_vc12_x86\BarnC.s86 : fatal error LNK1120: 2 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
0xC0DED00D
  • 19,522
  • 20
  • 117
  • 184
  • 1
    Note that identifiers starting with underscore followed by uppercase letter, like `_HELLO_XMPPTHREAD_H_`, are reserved to the implementation. – Cheers and hth. - Alf Dec 03 '14 at 12:13
  • Hm, it sounds like you're not linking with the xmppthread.cc object code. Are you sure you're compiling it and linking it. Or that the object code is part of some library you're linking in. If that appears to be OK, consider *order* of linkables. It does matter with g++. Oh it's VIsual C++. Then order is not so important. – Cheers and hth. - Alf Dec 03 '14 at 12:20
  • Thanks for the reply. Yes I am under the same impression that the implementation is not getting linked at all. Though I am not sure, how can I check this? Is there any method to check the linking? – 0xC0DED00D Dec 03 '14 at 12:23
  • If you're using Visual Studio, as the LNK error indicates, in the general linker options turn off the suppress startup banner option. This displays the linker invocation in the build log in the output pane in Visual Studio. – Cheers and hth. - Alf Dec 03 '14 at 12:45
  • Did that, but it didn't affect anything in the output. – 0xC0DED00D Dec 03 '14 at 13:33
  • Here's an example: http://imgur.com/qo5rlt4 – Cheers and hth. - Alf Dec 03 '14 at 13:51
  • Thanks for that. I have posted the output in the question. – 0xC0DED00D Dec 04 '14 at 07:01
  • Please post the linker command line from the log as well. Maybe try adding "/VERBOSE:LIB" to the linker command line options to show exactly what libraries are searched for what names. In the VS properties page this would have to manually be added in `Linker | Command Line` field. You'll get an insane amount of spew; you'll need to `grep` to get anything interesting from this. – Michael Burr Dec 04 '14 at 07:24
  • @MichaelBurr Thanks for the reply. I've just added the command line option and posted the output in the question. I didn't know anything about grep though. – 0xC0DED00D Dec 04 '14 at 07:37
  • I don't see `txmpp.lib` in the list of libraries being passed to the linker. Or is that `s3eTxmpp_d.lib`? – Michael Burr Dec 04 '14 at 08:49
  • yeah, it's s3eTxmpp_d.lib. The library is hosted at https://github.com/Abhi347/s3eTxmpp if that helps. – 0xC0DED00D Dec 04 '14 at 10:35
  • Maybe you haven't pushed a change which includes it, but I don't see `xmppthread.cc` or `xmppthread.h` in that repo. – Michael Burr Dec 04 '14 at 15:32
  • @MichaelBurr Apology for that, I haven't included the examples. And these files are from the examples of txmpp library. I have pushed them now along with the compiled libs. – 0xC0DED00D Dec 05 '14 at 07:01
  • The compiled libs don't have anything in them regarding `class txmpp::XmppThread`. They only contain some MD5 related functions (at least as displayed by the `dumpbin` utility). I think your project to build the library isn't quite right. – Michael Burr Dec 05 '14 at 07:12
  • I suppose the compiled lib, just creates a base for subproject, since the source code is already included with the lib. Which means the compiled lib doesn't have any cpp file in them. As an experiment, I did include all the headers and cpp in the project directly, removing any need of the library, but it gave same error. So I suppose it's the fault of the source code, not the lib. – 0xC0DED00D Dec 05 '14 at 07:48

1 Answers1

0

Marmalade (the SDK tool chain I am using to build this project) is unable to recognize .cc files as source files. I changed them to .cpp and they're getting identified. However there's a lot of errors still present in the library, but at least I know how to solve them. Thanks for the help.

0xC0DED00D
  • 19,522
  • 20
  • 117
  • 184