Link Problem VS6.0 to VS.NET
-
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!
-
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!
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[^]