Thread: error LNK2001: unresolved external symbol

  1. #1
    Registered User
    Join Date
    Jul 2011
    Posts
    10

    Post error LNK2001: unresolved external symbol

    [tag]
    When i compile my C++ program i am getting the following error.
    Code:
    Linking...
       Creating library ..\..\..\Build\bin\Release\ProdAuf01.lib and object ..\..\..\Build\bin\Release\ProdAuf01.exp
    abmabthread.obj : error LNK2001: unresolved external symbol "public: __thiscall OrderProdController::~OrderProdController(void)" (??1OrderProdController@@QAE@XZ)
    abmabthread.obj : error LNK2001: unresolved external symbol "public: int __thiscall OrderController::Archiv(class RWCString)" (?Archiv@OrderController@@QAEHVRWCString@@@Z)
    abmabthread.obj : error LNK2001: unresolved external symbol "public: int __thiscall OrderController::Account(class RWCString)" (?Account@OrderController@@QAEHVRWCString@@@Z)
    abmabthread.obj : error LNK2001: unresolved external symbol "public: int __thiscall OrderProdController::ExecuteNextPackage(void)" (?ExecuteNextPackage@OrderProdController@@QAEHXZ)
    abmabthread.obj : error LNK2001: unresolved external symbol "public: __thiscall OrderProdController::OrderProdController(class RWDBDatabase &,class RWCString &)" (??0OrderProdController@@QAE@AAVRWDBDatabase@@AAVRWCString@@@Z)
    ..\..\..\Build\bin\Release\ProdAuf01.exe : fatal error LNK1120: 5 unresolved externals
    Error executing link.exe.
    Creating browse info file...
    
    ProdAuf01.exe - 6 error(s), 0 warning(s)
    In my project they have included the header file for that OrderProdController.h file.
    #include "prodsys/OrderProdController.h"

    My project directory structure is as follows

    Projects
    |---->ProdAuf_n //Project Module Folder which i need to compile
    |---->... //Other projects Modules Folder
    |---->prodsys // Folder Which contains the .h and .cpp Files which my project is using(OrderProdController.h,OrderProdController.cp p,OrderController.h,OrderController.cpp,etc..)


    The OrderProdController.h contains a class
    Code:
    #include "prodsys/OrderController.h"
    class OrderProdController : public OrderController
    {
    }
    where OrderController class is defined in OrderController.h
    The OrderProdController.cpp and OrderController.cpp is present same folder with .h file.

    Please help me to solve this Linking problem.....
    [/tag]

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    You've included the header file, which is wonderful. Did you bother to include the source file as well? And note, I'm using include not in the sense of #include, but rather did you make sure you have the OrderProdController.cpp in your project (not the project folder, the actual project itself)?

  3. #3
    Registered User
    Join Date
    Jul 2011
    Posts
    10
    I have added the required files to my project.
    After adding all the files. I compiled it. It is showing me lot of errors
    Code:
    Linking...
       Creating library ..\..\..\BUILD\BIN\Debug\ProdAuf01.lib and object ..\..\..\BUILD\BIN\Debug\ProdAuf01.exp
    OrderProdController.obj : error LNK2001: unresolved external symbol "class RWCString __cdecl FormatDBStatus(char *,long)" (?FormatDBStatus@@YA?AVRWCString@@PADJ@Z)
    ProdLine.obj : error LNK2001: unresolved external symbol "class RWCString __cdecl FormatDBStatus(char *,long)" (?FormatDBStatus@@YA?AVRWCString@@PADJ@Z)
    AccountOrder.obj : error LNK2001: unresolved external symbol "class RWCString __cdecl FormatDBStatus(char *,long)" (?FormatDBStatus@@YA?AVRWCString@@PADJ@Z)
    DocCont.obj : error LNK2001: unresolved external symbol "class RWCString __cdecl FormatDBStatus(char *,long)" (?FormatDBStatus@@YA?AVRWCString@@PADJ@Z)
    LineA.obj : error LNK2001: unresolved external symbol "class RWCString __cdecl FormatDBStatus(char *,long)" (?FormatDBStatus@@YA?AVRWCString@@PADJ@Z)
    OrderController.obj : error LNK2001: unresolved external symbol "class RWCString __cdecl FormatDBStatus(char *,long)" (?FormatDBStatus@@YA?AVRWCString@@PADJ@Z)
    CreateASCIIZOB.obj : error LNK2001: unresolved external symbol _Text2PS
    ProdLine.obj : error LNK2001: unresolved external symbol "public: __thiscall ConnectionGuard::~ConnectionGuard(void)" (??1ConnectionGuard@@QAE@XZ)
    ProdLineReport.obj : error LNK2001: unresolved external symbol "public: __thiscall ConnectionGuard::~ConnectionGuard(void)" (??1ConnectionGuard@@QAE@XZ)
    LineL.obj : error LNK2001: unresolved external symbol "public: __thiscall ConnectionGuard::~ConnectionGuard(void)" (??1ConnectionGuard@@QAE@XZ)
    LineLink.obj : error LNK2001: unresolved external symbol "public: __thiscall ConnectionGuard::~ConnectionGuard(void)" (??1ConnectionGuard@@QAE@XZ)
    lineshop.obj : error LNK2001: unresolved external symbol "public: __thiscall ConnectionGuard::~ConnectionGuard(void)" (??1ConnectionGuard@@QAE@XZ)
    OrderProdController.obj : error LNK2001: unresolved external symbol "public: __thiscall ConnectionGuard::~ConnectionGuard(void)" (??1ConnectionGuard@@QAE@XZ)
    DocAmountStore.obj : error LNK2001: unresolved external symbol "public: __thiscall ConnectionGuard::~ConnectionGuard(void)" (??1ConnectionGuard@@QAE@XZ)
    DocCont.obj : error LNK2001: unresolved external symbol "public: __thiscall ConnectionGuard::~ConnectionGuard(void)" (??1ConnectionGuard@@QAE@XZ)
    HilfsCont.obj : error LNK2001: unresolved external symbol "public: __thiscall ConnectionGuard::~ConnectionGuard(void)" (??1ConnectionGuard@@QAE@XZ)
    KennSuffix.obj : error LNK2001: unresolved external symbol "public: __thiscall ConnectionGuard::~ConnectionGuard(void)" (??1ConnectionGuard@@QAE@XZ)
    ProdLine.obj : error LNK2001: unresolved external symbol "public: class RWDBConnection & __thiscall ConnectionGuard::Get(void)" (?Get@ConnectionGuard@@QAEAAVRWDBConnection@@XZ)
    ProdLineReport.obj : error LNK2001: unresolved external symbol "public: class RWDBConnection & __thiscall ConnectionGuard::Get(void)" (?Get@ConnectionGuard@@QAEAAVRWDBConnection@@XZ)
    LineL.obj : error LNK2001: unresolved external symbol "public: class RWDBConnection & __thiscall ConnectionGuard::Get(void)" (?Get@ConnectionGuard@@QAEAAVRWDBConnection@@XZ)
    LineLink.obj : error LNK2001: unresolved external symbol "public: class RWDBConnection & __thiscall ConnectionGuard::Get(void)" (?Get@ConnectionGuard@@QAEAAVRWDBConnection@@XZ)
    lineshop.obj : error LNK2001: unresolved external symbol "public: class RWDBConnection & __thiscall ConnectionGuard::Get(void)" (?Get@ConnectionGuard@@QAEAAVRWDBConnection@@XZ)
    OrderProdController.obj : error LNK2001: unresolved external symbol "public: class RWDBConnection & __thiscall ConnectionGuard::Get(void)" (?Get@ConnectionGuard@@QAEAAVRWDBConnection@@XZ)
    DocAmountStore.obj : error LNK2001: unresolved external symbol "public: class RWDBConnection & __thiscall ConnectionGuard::Get(void)" (?Get@ConnectionGuard@@QAEAAVRWDBConnection@@XZ)
    DocCont.obj : error LNK2001: unresolved external symbol "public: class RWDBConnection & __thiscall ConnectionGuard::Get(void)" (?Get@ConnectionGuard@@QAEAAVRWDBConnection@@XZ)
    HilfsCont.obj : error LNK2001: unresolved external symbol "public: class RWDBConnection & __thiscall ConnectionGuard::Get(void)" (?Get@ConnectionGuard@@QAEAAVRWDBConnection@@XZ)
    KennSuffix.obj : error LNK2001: unresolved external symbol "public: class RWDBConnection & __thiscall ConnectionGuard::Get(void)" (?Get@ConnectionGuard@@QAEAAVRWDBConnection@@XZ)
    ProdLine.obj : error LNK2001: unresolved external symbol "public: __thiscall ConnectionGuard::ConnectionGuard(class RWDBDatabase const &)" (??0ConnectionGuard@@QAE@ABVRWDBDatabase@@@Z)
    ProdLineReport.obj : error LNK2001: unresolved external symbol "public: __thiscall ConnectionGuard::ConnectionGuard(class RWDBDatabase const &)" (??0ConnectionGuard@@QAE@ABVRWDBDatabase@@@Z)
    LineL.obj : error LNK2001: unresolved external symbol "public: __thiscall ConnectionGuard::ConnectionGuard(class RWDBDatabase const &)" (??0ConnectionGuard@@QAE@ABVRWDBDatabase@@@Z)
    LineLink.obj : error LNK2001: unresolved external symbol "public: __thiscall ConnectionGuard::ConnectionGuard(class RWDBDatabase const &)" (??0ConnectionGuard@@QAE@ABVRWDBDatabase@@@Z)
    lineshop.obj : error LNK2001: unresolved external symbol "public: __thiscall ConnectionGuard::ConnectionGuard(class RWDBDatabase const &)" (??0ConnectionGuard@@QAE@ABVRWDBDatabase@@@Z)
    OrderProdController.obj : error LNK2001: unresolved external symbol "public: __thiscall ConnectionGuard::ConnectionGuard(class RWDBDatabase const &)" (??0ConnectionGuard@@QAE@ABVRWDBDatabase@@@Z)
    DocAmountStore.obj : error LNK2001: unresolved external symbol "public: __thiscall ConnectionGuard::ConnectionGuard(class RWDBDatabase const &)" (??0ConnectionGuard@@QAE@ABVRWDBDatabase@@@Z)
    DocCont.obj : error LNK2001: unresolved external symbol "public: __thiscall ConnectionGuard::ConnectionGuard(class RWDBDatabase const &)" (??0ConnectionGuard@@QAE@ABVRWDBDatabase@@@Z)
    HilfsCont.obj : error LNK2001: unresolved external symbol "public: __thiscall ConnectionGuard::ConnectionGuard(class RWDBDatabase const &)" (??0ConnectionGuard@@QAE@ABVRWDBDatabase@@@Z)
    KennSuffix.obj : error LNK2001: unresolved external symbol "public: __thiscall ConnectionGuard::ConnectionGuard(class RWDBDatabase const &)" (??0ConnectionGuard@@QAE@ABVRWDBDatabase@@@Z)
    DocCont.obj : error LNK2001: unresolved external symbol "class RWCString __cdecl FormatDBStatus(long)" (?FormatDBStatus@@YA?AVRWCString@@J@Z)
    ProdLine.obj : error LNK2001: unresolved external symbol "class RWCString __cdecl FormatDBStatus(long)" (?FormatDBStatus@@YA?AVRWCString@@J@Z)
    OrderController.obj : error LNK2001: unresolved external symbol "class RWCString __cdecl FormatDBStatus(char *,class RWCString)" (?FormatDBStatus@@YA?AVRWCString@@PADV1@@Z)
    ProdLine.obj : error LNK2001: unresolved external symbol "class RWCString __cdecl FormatDBStatus(char *,class RWCString)" (?FormatDBStatus@@YA?AVRWCString@@PADV1@@Z)
    ..\..\..\BUILD\BIN\Debug\ProdAuf01.exe : fatal error LNK1120: 7 unresolved externals
    Error executing link.exe.
    Creating browse info file...
    
    ProdAuf01.exe - 42 error(s), 0 warning(s)
    The function which it is showing is rogwave library.
    I have added the library include path in Tools-->Options-->Directories Tab also.
    what else i need to do to get ride of all these errors..
    Please help me regarding this ............

  4. #4
    Novice
    Join Date
    Jul 2009
    Posts
    568
    Disregard me.
    Last edited by msh; 07-02-2011 at 01:56 AM.
    Disclaimer: This post shows my ignorance at the time of its making. I claim ownership of but not responsibility for all errors in it. Reference at your own peril.

  5. #5
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Where does ConnectionGuard come from? Wherever that stuff is defined needs to be in the project. If it's yours, then make sure the .cpp file is in the project. If it's a library, make sure that library is included by the linker. (Note that setting Tools->Options->Directories has nothing to do with this, or at the most very little to do with this.)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 10-02-2007, 09:12 PM
  2. Replies: 14
    Last Post: 11-08-2006, 11:30 PM
  3. error LNK2001: unresolved external symbol
    By matth in forum C++ Programming
    Replies: 1
    Last Post: 01-19-2006, 04:42 PM
  4. error LNK2001: unresolved external symbol
    By Unregistered in forum C Programming
    Replies: 12
    Last Post: 07-12-2002, 08:45 PM
  5. error LNK2001: unresolved external symbol _main
    By Hydro in forum Game Programming
    Replies: 14
    Last Post: 02-27-2002, 02:26 PM