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. COM
  4. Link Problem VS6.0 to VS.NET

Link Problem VS6.0 to VS.NET

Scheduled Pinned Locked Moved COM
csharpc++visual-studiohelpwpf
2 Posts 2 Posters 1 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!

    D 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!

      D Offline
      D Offline
      darkbyte
      wrote on last edited by
      #2

      This is probably because you now have Decorated names like DllRegisterServer@uukkfjsljf... kind of .. cant remember the option, but if i'm not crazy, there should be something like the following around your function definitions: extern "C" Ya, see the following page on MSDN: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/html/_core_export_c.2b2b_.functions_for_use_in_c.2d.language_executables.asp[^]

      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