Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. link error while load dll explicitly

link error while load dll explicitly

Scheduled Pinned Locked Moved C / C++ / MFC
helpdebugging
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sivakumar R
    wrote on last edited by
    #1

    hi all iam facing link error "unresolved externall symboll" while loading my dll explicitly, but it work i load implicitly, here i given the sample by which i tryed, and i defined all the virtual function in the derived class, which in the base class #include "stdafx.h" #include "windows.h" int main(int argc, char* argv[]) { typedef UINT (CALLBACK* LPFNDLLFUNC1)(DWORD,UINT); HINSTANCE hDLL; // Handle to DLL LPFNDLLFUNC1 lpfnDllFunc1; // Function pointer UINT uParam2, uReturnVal; DWORD dwParam1; //HMODULE dll_module = LoadLibrary("./../TestDll/Debug/TestDll.dll"); hDLL = LoadLibrary("./../TestDll/Debug/TestDll.dll"); if (hDLL != NULL) { lpfnDllFunc1 = (LPFNDLLFUNC1)GetProcAddress(hDLL, "MyAbsFunc1"); if (!lpfnDllFunc1) { // handle the error FreeLibrary(hDLL); return 0; } else { // call the function uReturnVal = lpfnDllFunc1(dwParam1, uParam2); } } return 0; } can any one help to solve this link error

    N M 2 Replies Last reply
    0
    • S Sivakumar R

      hi all iam facing link error "unresolved externall symboll" while loading my dll explicitly, but it work i load implicitly, here i given the sample by which i tryed, and i defined all the virtual function in the derived class, which in the base class #include "stdafx.h" #include "windows.h" int main(int argc, char* argv[]) { typedef UINT (CALLBACK* LPFNDLLFUNC1)(DWORD,UINT); HINSTANCE hDLL; // Handle to DLL LPFNDLLFUNC1 lpfnDllFunc1; // Function pointer UINT uParam2, uReturnVal; DWORD dwParam1; //HMODULE dll_module = LoadLibrary("./../TestDll/Debug/TestDll.dll"); hDLL = LoadLibrary("./../TestDll/Debug/TestDll.dll"); if (hDLL != NULL) { lpfnDllFunc1 = (LPFNDLLFUNC1)GetProcAddress(hDLL, "MyAbsFunc1"); if (!lpfnDllFunc1) { // handle the error FreeLibrary(hDLL); return 0; } else { // call the function uReturnVal = lpfnDllFunc1(dwParam1, uParam2); } } return 0; } can any one help to solve this link error

      N Offline
      N Offline
      Naveen
      wrote on last edited by
      #2

      you have to specify the lib name in the project setting. or atleat put #pragma comment(lib, "./../TestDll/Debug/TestDll.**lib**") in your code.

      nave [OpenedFileFinder]

      1 Reply Last reply
      0
      • S Sivakumar R

        hi all iam facing link error "unresolved externall symboll" while loading my dll explicitly, but it work i load implicitly, here i given the sample by which i tryed, and i defined all the virtual function in the derived class, which in the base class #include "stdafx.h" #include "windows.h" int main(int argc, char* argv[]) { typedef UINT (CALLBACK* LPFNDLLFUNC1)(DWORD,UINT); HINSTANCE hDLL; // Handle to DLL LPFNDLLFUNC1 lpfnDllFunc1; // Function pointer UINT uParam2, uReturnVal; DWORD dwParam1; //HMODULE dll_module = LoadLibrary("./../TestDll/Debug/TestDll.dll"); hDLL = LoadLibrary("./../TestDll/Debug/TestDll.dll"); if (hDLL != NULL) { lpfnDllFunc1 = (LPFNDLLFUNC1)GetProcAddress(hDLL, "MyAbsFunc1"); if (!lpfnDllFunc1) { // handle the error FreeLibrary(hDLL); return 0; } else { // call the function uReturnVal = lpfnDllFunc1(dwParam1, uParam2); } } return 0; } can any one help to solve this link error

        M Offline
        M Offline
        Mark Salsbery
        wrote on last edited by
        #3

        Sivakumar R wrote:

        iam facing link error "unresolved externall symboll"

        What's the symbol? Mark

        Mark Salsbery Microsoft MVP - Visual C++ "Go that way, really fast. If something gets in your way, turn."

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups