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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Link Problems

Link Problems

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++helpvisual-studiowpf
2 Posts 2 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.
  • J Offline
    J Offline
    Jnewg5
    wrote on last edited by
    #1

    I have a project that was originally built in Visual Studio C++ 6.0. I have since upgraded to Visual Studio .NET and am encountering a link problem. The project is a (non-ATL generated)COM server that also employs templates that is built across 2 projects. The base class("PluginServ") implements the DllCanUnloadNow, DllGetClassObject, DllRegisterServer, and DllUnregisterServer. The .def file is in the aggregated class ("DerivedPlugin") project and declares the above exports. The link error is the following: ------ Build started: Project: DerivedPlugInServ, Configuration: Debug Win32 ------ Linking... LINK : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification DerivedPlugInServ.def : error LNK2001: unresolved external symbol DllRegisterServer DerivedPlugInServ.def : error LNK2001: unresolved external symbol DllUnregisterServer .\Debug/VPF.lib : fatal error LNK1120: 2 unresolved externals LINK : fatal error LNK1141: failure during build of exports file Build log was saved at "file://c:\projects\src\DerivedPlugInServ\Debug\BuildLog.htm" DerivedPlugInServ- 4 error(s), 1 warning(s) ---------------------- Done ---------------------- Build: 0 succeeded, 1 failed, 0 skipped" Anyone have any ideas as to how I may resolve this link error? I have looked online and have not come across a solution. Thank you!

    R 1 Reply Last reply
    0
    • J Jnewg5

      I have a project that was originally built in Visual Studio C++ 6.0. I have since upgraded to Visual Studio .NET and am encountering a link problem. The project is a (non-ATL generated)COM server that also employs templates that is built across 2 projects. The base class("PluginServ") implements the DllCanUnloadNow, DllGetClassObject, DllRegisterServer, and DllUnregisterServer. The .def file is in the aggregated class ("DerivedPlugin") project and declares the above exports. The link error is the following: ------ Build started: Project: DerivedPlugInServ, Configuration: Debug Win32 ------ Linking... LINK : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification DerivedPlugInServ.def : error LNK2001: unresolved external symbol DllRegisterServer DerivedPlugInServ.def : error LNK2001: unresolved external symbol DllUnregisterServer .\Debug/VPF.lib : fatal error LNK1120: 2 unresolved externals LINK : fatal error LNK1141: failure during build of exports file Build log was saved at "file://c:\projects\src\DerivedPlugInServ\Debug\BuildLog.htm" DerivedPlugInServ- 4 error(s), 1 warning(s) ---------------------- Done ---------------------- Build: 0 succeeded, 1 failed, 0 skipped" Anyone have any ideas as to how I may resolve this link error? I have looked online and have not come across a solution. Thank you!

      R Offline
      R Offline
      Ryan Binns
      wrote on last edited by
      #2

      Jnewg5 wrote: The base class("PluginServ") implements the DllCanUnloadNow, DllGetClassObject, DllRegisterServer, and DllUnregisterServer. So your definition of DllRegisterServer is PluginServ::DllRegisterServer, ie. it resides inside a class? These functions must be global, ie. not in a class, and they must be defined as __declspec(dllexport). Other than that, you'll have to give a bit more information.

      Ryan

      "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

      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