ERROR LNK2001 / FATAL ERRORLNK1120



  • Hello again,

    I have more one question: When compiling the programme for test I am getting the following erros:

    error LNK2001: unresolved external symbol "__declspec(dllimport) class CTheData const * __cdecl GetTheData(void)" (__imp_?GetTheData@@YAPBVCGetTheData@@XZ)

    Debug/Test_TheData.exe : fatal error LNK1120: 1 unresolved externals

    Error executing link.exe.

    Thanks again :p



  • Where did you define the requested function 'GetTheData()' (this means: where do you have its function body) - the error message tells you, that the linker didn't find this definition.

    (ps: sorry for my poor english - I hope you understand)



  • Hello CStoll,

    Thanks for your reply and your English is very good.
    The function is defined in a DLL project (created as win32 dynamic link library with export functions) in cpp program as external function to be exported to another application.

    The link error is coming up in another project win32 consel application
    in the test program.cpp in its main function where the function GetTheData()is
    called for test to debug the dll program.cpp

    Thanks again for your help
    IKS


Anmelden zum Antworten