Upgrade C++ VS 2005 Project to VS 2010 Causes LNK2019 error - c++

I'm attempting to upgrade a project written in C++ in VS 2005 to VS 2010. After I run the upgrade wizard, I try and build the project and I get a bunch of LNK2019 errors.
For further clarification, this projects builds a DLL which is used by our Product Lifecycle Management system named Teamcenter.
At this point, I'm kind of stumped. The project compiles in VS 2005 in Debug without any issues.
Any ideas?
Here is a snippet of the error:
Error 16 error LNK2019: unresolved external symbol __imp__EMH_store_error_s1 referenced in function "int __cdecl AFCC_create_ai(struct EPM_action_message_s)" (?AFCC_create_ai##YAHUEPM_action_message_s###Z) C:\Users\kevmoo\Documents\Visual Studio 2010\Projects\AFCC\AFCC\AFCC\AFCC_action_handlers.obj AFCC
Error 17 error LNK2019: unresolved external symbol __imp__EPM_add_attachments referenced in function "int __cdecl AFCC_create_ai(struct EPM_action_message_s)" (?AFCC_create_ai##YAHUEPM_action_message_s###Z) C:\Users\kevmoo\Documents\Visual Studio 2010\Projects\AFCC\AFCC\AFCC\AFCC_action_handlers.obj AFCC

Related

install cURLpp errors c++

I recently installed cURLpp from NUGET in visual studio. Everything installed correctly and when I try to use cURLpp I get the following error:
Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol __imp__curl_easy_setopt referenced in function "public: void __thiscall curlpp::internal::CurlHandle::option<void *>(enum CURLoption,void *)" (??$option#PAX#CurlHandle#internal#curlpp##QAEXW4CURLoption##PAX#Z) Project1 C:\Users\Joel\documents\visual studio 2015\Projects\Project1\Project1\main.obj 1
This error stops happening when I remove #include Options.hpp
IDE: Visual Studio 2015, Compiling on Windows 10

Unresolved external symbol for imp_fputws, imp_towupper in visual studio

I am developing windows program, and got link error :
error LNK2001: unresolved external symbol __imp__wcsicmp
error LNK2001: unresolved external symbol __imp_fputws
error LNK2001: unresolved external symbol __imp_towupper
It seems like I need wide char version fputs() and toupper(), but I can't find it.
Could someone provide the library name or compile settings that will resolve the link error?
Environment : Win server 2008 + visual studio 2010 pro + WinDDK 7600.16385.1
Not sure if it was the case for you, but I was using the (lib file) meant for a MD runtime execution instead of a MT runtime execution.
Using the correct lib in:
Project Properties -> Configuration Properties -> Linker -> Input -> Additional Dependencies
helped me fix the issue

Linker errors while migrating from x32 to x64

I have recently migrated a project from x32 to x64 in VS professional 2008 and I'm getting this weird linker errors:
error LNK2001: unresolved external symbol __imp_PostMessageW
error LNK2001: unresolved external symbol __imp_FlushFileBuffers
error LNK2001: unresolved external symbol __imp_WriteFile
error LNK2001: unresolved external symbol __imp_WaitForSingleObject
error LNK2001: unresolved external symbol __imp_SetFilePointer
error LNK2001: unresolved external symbol __imp_EnterCriticalSection
...
And more of this nature.
I am including shlwapi.lib in the linker.
Running on Windows 7 x64.
Additional Dependencies:
The solution for my problem was setting Linker > General > Additional Library Directories with "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib\x64" instead of "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib".
Ensure that the x64 configuration is selected. Right-click your project in the Solution Explorer window, Properties, Linker, Input. Click on the Additional Dependencies box and click the button that appears.
This is what it should look like if the project is configured correctly. Note how the "Inherit" checkbox is ticked and how the inherited values list the standard SDK libraries. Like kernel32.lib, the link library that has the definition for __imp_FlushFileBuffers, etc. If it doesn't look like this in your project then you'll get these linker errors.

Installing GLFW 3.0 not working Visual Studio

I'm trying to create a GLFW project, but I'm getting LNK2019 errors with the basic setup.
I've downloaded the latest binary (glfw-3.0.bin.WIN32.zip) to a folder.
I've created a new, empty console project.
Within VC++ Directories, I've added the following line to include directories:
C:\C++Libraries\glfw-3.0.bin.WIN32\include
I've added the following line to the Library Directories:
C:\C++Libraries\glfw-3.0.bin.WIN32\lib-msvc110
I've linked the following libraries:
opengl32.lib, glfw3.lib, glfw3dll.lib
From the latest tutorial, I paste into my project (no visible syntax errors) to test, but I get four LNK2019 errors after trying to run it.
Here are the errors:
Error 2 error LNK2019: unresolved external symbol __imp__joyGetPosEx#8
referenced in function __glfwPlatformGetJoystickAxes
c:\Users\Spicy Weenie\documents\visual studio 2012\
Projects\Beta\Beta\glfw3.lib(win32_joystick.obj)
Error 3 error LNK2019: unresolved external symbol __imp__joyGetDevCapsW#12
referenced in function __glfwPlatformGetJoystickAxes
c:\Users\Spicy Weenie\documents\visual studio
2012\Projects\Beta\Beta\glfw3.lib(win32_joystick.obj)
Error 4 error LNK2019: unresolved external symbol __imp__joyGetPos#8
referenced in function __glfwPlatformJoystickPresent
c:\Users\Spicy Weenie\documents\visual studio
2012\Projects\Beta\Beta\glfw3.lib(win32_joystick.obj)
Error 1 error LNK2019: unresolved external symbol __imp__timeGetTime#0
referenced in function __glfwInitTimer c:\Users\Spicy Weenie\documents\visual
studio 2012\Projects\Beta\Beta\glfw3.lib(win32_time.obj)
You need to link in at least winmm.lib for timeGetTime. The joystick code is probably in there to.

Migration from IBM VisualAge C++ 3.6.5 to VS 2010

We're in the process of migrating 32-bit C++ application to 64-bit application (VS 2010). This application was developed 10 years back with IBM VisualAge C++ 3.6.5 for Windows. Since IBM has stopped support of this compiler, we're facing issues while migrating it to VS 2010.
This is mostly because of some missing libraries.
Sample errors:
error LNK2019: unresolved external symbol __uopen referenced in function "int __cdecl allocate_heap_storage_(void)" (?allocate_heap_storage##YAHXZ)
error LNK2019: unresolved external symbol __ucreate referenced in function "int __cdecl allocate_heap_storage_(void)" (?allocate_heap_storage##YAHXZ)
error LNK2019: unresolved external symbol __udestory referenced in function "int __cdecl deallocate_heap_storage_(void)" (?deallocate_heap_storage##YAHXXZ)
error LNK2019: unresolved external symbol __uclose referenced in function "int __cdecl deallocate_heap_storage_(void)" (?deallocate_heap_storage##YAHXXZ)
error LNK2019: unresolved external symbol __umalloc referenced in function "int __cdecl alloc_share_mem_(int,int)" (?alloc_share_mem#YAPAXHH#Z)
The above functions are defined in umalloc.h but we are missing the definitions.
How can we resolve this?
For the errors above, these function "_ucreate",_udestory , _uclose,_umalloc" are not found when linking, I think these functions were in the run time libraries provided by Visual Age. if you can find the lib files of the these run time libraries, you can put them in the input of link, it may pass the compiling phase, but may fail to launch.
One suggestion here is to replace the functions above with windows functions. All the functions above are related with memory allocations.