Getting error using libcurl in visual studio 2017 - c++

I have linked libcurl for linker still getting below error:
Error LNK2019 unresolved external symbol curl_global_init referenced in function "void _cdecl getRequest(void)"

Related

Got LNK2019 Error in VS 2015 but not in VS2013

i am having a solution with multiple projects in C++.
when I compile this solution in Visual Studio 2013 I get no errors
when I try to compile the same solution file in visual studio 2015 I got the linker error LNK2019 error image Attached
{Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "public: void __cdecl adl::SJobs::addAdf(struct adl::SObjects const &,class TAc<int>)" (?addAdf#SJobs#adl##QEAAXAEBUSObjects#2#V?$TAc#H###Z) referenced in function "private: void __cdecl CDialogRun::getJobs(struct adl::SJobs &)" (?getJobs#CDialogRun##AEAAXAEAUSJobs#adl###Z) acad_daylight E:\New Volume\Haseeb\Light Vidia\Lightvidia ACAD 2017\Testing in VS2015\Source Code - Copy\acad_daylight\adl_dlg_run.obj 1
}

Problems when trying to add libcurl as a Reference [duplicate]

This question already has answers here:
What is an undefined reference/unresolved external symbol error and how do I fix it?
(39 answers)
Closed 6 years ago.
I'm trying to include libcurl into my C++ Project, therefore i built the .lib file placed it in a folder called "curl/lib" and then i copied the included folder from the curl folder i downloaded into "Curl/" (i got that from a tutorial online...). Then i copied that "curl" folder i created into the directory where my program is located, then i added the curl path to "Additional Include Directories" und "C++/General" and "Linker/General" in my Project Properties. Then i created a piece of code that uses stuff from that uses code from curl.h (i included that). And the codingg looked fine and there were no errors, but then i built my Project and i got a "fatal error LNK1120: 6 unresolved externals" error and a bunch of "LNK 2019"-errors, told me where the unresolved symbols are:
1>dll_load.obj : error LNK2019: unresolved external symbol curl_easy_cleanup referenced in function "void __cdecl lel(void)" (?lel##YAXXZ)
1>dll_load.obj : error LNK2019: unresolved external symbol curl_easy_strerror referenced in function "void __cdecl lel(void)" (?lel##YAXXZ)
1>dll_load.obj : error LNK2019: unresolved external symbol curl_easy_perform referenced in function "void __cdecl lel(void)" (?lel##YAXXZ)
1>dll_load.obj : error LNK2019: unresolved external symbol curl_easy_setopt referenced in function "void __cdecl lel(void)" (?lel##YAXXZ)
1>dll_load.obj : error LNK2019: unresolved external symbol curl_easy_init referenced in function "void __cdecl lel(void)" (?lel##YAXXZ)
1>dll_load.obj : error LNK2019: unresolved external symbol curl_global_init referenced in function "void __cdecl lel(void)" (?lel##YAXXZ)
anyone knows what i'm missing or how i can fix this, because it's really annoying and stops me from finishing my project! Any help is greatly appreciated!
It sounds like visual studio (windows), but the same thing applies to any compiler. You tell it where to look for a library file, but you didn't tell it to actually use libcurl, so it didn't look for it.
In visual studio, try Linker, Input, Additional Dependencies
add "libcurl.lib" (or whatever the actual name is).

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

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

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.

error LNK2019: unresolved external symbol _Direct3DCreate9Ex#8 referenced in function "protected: XYX()"

I am getting the following LINK error while compiling my C++ solution:
error LNK2019: unresolved external symbol _Direct3DCreate9Ex#8
referenced in function "protected: XYX()
The symbol "Direct3DCreate9Ex' is defined in "ddraw.h" header file found in "C:\Program Files\Microsoft SDKs\Windows\v7.0\Include". And verified that the header file "ddraw.h" is present in this location. Also I have included this path in VS settings "Tools-->Options-->VC++ Directories -> Includes".
But still I am getting the link error as "error LNK2019: unresolved external symbol _Direct3DCreate9Ex#8 referenced in function "protected: XYX()" ".
Can anyone kindly help me in getting rid of this link error while compiling my C++ solution.
I am using VS 2008 on 64 bit Win7.
Thanks in advance.
Based on reference page for Direct3DCreate9Ex you need to link with D3D9.lib.