install cURLpp errors c++ - 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

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
}

LNK 2038 error after upgrading to visual studio 2015

i was working on a project in visual studio 2013 , then i upgraded to visual studio 2015 . the project was ok on earlier version but now i get these errors :
1>sfml-system-s-d.lib(String.cpp.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1900' in Aircraft.obj
1>sfml-graphics-s-d.lib(VertexArray.cpp.obj) : warning LNK4049: locally defined symbol ??0_Container_base12#std##QAE#XZ (public: __thiscall std::_Container_base12::_Container_base12(void)) imported
1>sfml-system-s-d.lib(String.cpp.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::bad_cast::bad_cast(char const *)" (__imp_??0bad_cast#std##QAE#PBD#Z) referenced in function "class std::ctype<wchar_t> const & __cdecl std::use_facet<class std::ctype<wchar_t> >(class std::locale const &)" (??$use_facet#V?$ctype#_W#std###std##YAABV?$ctype#_W#0#ABVlocale#0##Z)
1>sfml-graphics-s-d.lib(Shader.cpp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::bad_cast::bad_cast(char const *)" (__imp_??0bad_cast#std##QAE#PBD#Z)
there are too many of them , but i just included one of each .
i found similar questions , but none of them worked for me . i am using SFML library .
steps i've done to solve the problem are :
downloading sfml for vc14 .
rebuild sloution .
try to ignore _MSC_VER in preprocessor commands(there were no 2038 errors any more , but still i had other link errors) .
no success ...
There is a mismatch among version of Visual Studio used for libraries and project which you are try to compile. Some of them are compiled with Visual Studio 2013 while you're building the project with Visual Studio 2015.
If you want to use Visual Studio 2015 to compile your project, you must compile all the required libraries (e.g. SFML) with Visual Studio 2015 (or, in alternative, find pre-built libraries with VS2015 if available).

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

Unresolved external symbols in Visual Studio 2013 when using UHD

I can't seem to get a very simple program to compile in Visual Studio 2013. My goal is to incorporate UHD into a C++ program (UHD Driver and Libraries for Windows). I downloaded and installed the Windows UHD package.Since the library also depends on Boost, I also downloaded the appropriate Boost library. After that, I wrote a quick test program in Visual Studio 2013:
#include "stdafx.h"
#include <iostream>
#include <uhd\usrp\multi_usrp.hpp>
#include <uhd\types\device_addr.hpp>
using namespace uhd;
int main(void)
{
device_addr_t hint;
device_addrs_t dev_addrs = device::find(hint);
system("pause");
return 0;
}
In case anyone is interested, this program should locate any USRPs attached to a host PC. I defined the appropriate include paths in Visual Studio: . .
To be clear, I included two paths to the header files:
C:\Program Files (x86)\UHD\include and C:\Program Files (x86)\boost_1_55_0
and one path to the library:
C:\Program Files (x86)\UHD\lib
When I wrote the above program, Visual Studio recognized the additional include files, recognized device_addr_t as a typedef, and didn't throw any errors. However, when I built the program, I received these errors:
Error 3 error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class std::vector<class uhd::device_addr_t,class std::allocator<class uhd::device_addr_t> > __cdecl uhd::device::find(class uhd::device_addr_t const &)" (__imp_?find#device#uhd##SA?AV?$vector#Vdevice_addr_t#uhd##V?$allocator#Vdevice_addr_t#uhd###std###std##ABVdevice_addr_t#2##Z) referenced in function _main C:\Users\...\Documents\Visual Studio 2013\Projects\uhd_test\uhd_test\uhd_test.obj uhd_test
Error 2 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall uhd::device_addr_t::~device_addr_t(void)" (__imp_??1device_addr_t#uhd##QAE#XZ) referenced in function "public: void * __thiscall uhd::device_addr_t::`scalar deleting destructor'(unsigned int)" (??_Gdevice_addr_t#uhd##QAEPAXI#Z) C:\Users\...\Documents\Visual Studio 2013\Projects\uhd_test\uhd_test\uhd_test.obj uhd_test
Error 1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall uhd::device_addr_t::device_addr_t(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0device_addr_t#uhd##QAE#ABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z) referenced in function _main C:\Users\...\Documents\Visual Studio 2013\Projects\uhd_test\uhd_test\uhd_test.obj uhd_test
Error 4 error LNK1120: 3 unresolved externals C:\Users\...\Documents\Visual Studio 2013\Projects\uhd_test\Debug\uhd_test.exe uhd_test
I've encountered these errors before in other programs, but I was able to resolve them relatively easily; either I would misspell a crucial include, or there would be an issue with a template class. However, in this instance, I can't seem to resolve the issue.
Any constructive input would be appreciated.
NOTE: In addition to defining the library directory path, I've explicitly added the UHD library, and I receive the same errors.
I got your example working. Here's the software versions I used since you didn't mention much in your description:
Microsoft Visual Studio 2013
VC++ Redistributable Package for VS2013 (vcredist_x86)
UHD 003.007.002, VS2013, Win32
Boost 1.56, lib32-msvc-12.0 binary package
Here are the project configuration properties you need to set in your VS2013 applications:
C/C++ -> General -> Additional Include Directories
C:\local\boost_1_56_0
C:\Program Files (x86)\uhd\include
Linker -> General -> Additional Library Directories
C:\local\boost_1_56_0\lib32-msvc-12.0
C:\Program Files (x86)\uhd\lib
Linker -> Input -> Additional Dependencies
uhd.lib
I think the last step is what's tripping you up, good luck!
I followed exactly what David Greene said, and I ended up with the same errors. Eventually I figured out that I had downloaded the 64-bit UHD, but I was using Visual Studio 2013 Express, which was a 32-bit compiler. Downloading the 32-bit version of UHD for Visual Studio 2013 solved the problem. For anyone else having this problem, double check that the compiler matches which version of UHD you install.

fftw in Visual Studio?

I'm trying to link my project with fftw and so far, I've gotten it to compile, but not link. As the site said, I generated all the .lib files (even though I'm only using double precision), and copied them to C:\Program Files\Microsoft Visual Studio 9.0\VC\lib, the .h file to C:\Program Files\Microsoft Visual Studio 9.0\VC\include and the .dll to C:\windows\system32.
I've copied the tutorial program, and the exact error I am getting is:
1>hw10.obj : error LNK2019: unresolved external symbol __imp__fftw_free referenced in function "bool __cdecl test(void)" (?test##YA_NXZ)
1>hw10.obj : error LNK2019: unresolved external symbol __imp__fftw_destroy_plan referenced in function "bool __cdecl test(void)" (?test##YA_NXZ)
1>hw10.obj : error LNK2019: unresolved external symbol __imp__fftw_execute referenced in function "bool __cdecl test(void)" (?test##YA_NXZ)
1>hw10.obj : error LNK2019: unresolved external symbol __imp__fftw_plan_dft_1d referenced in function "bool __cdecl test(void)" (?test##YA_NXZ)
1>hw10.obj : error LNK2019: unresolved external symbol __imp__fftw_malloc referenced in function "bool __cdecl test(void)" (?test##YA_NXZ)
So, what could be wrong with my project setup? Thanks!
My case
Using FFTW in Visual Studio 2010
Precompiled FFTW 3.3.1 Windows DLLs install using fftw-3.2.1-dll.zip, on my Windows XP machine.
Open cmd window and go to lib.exe folder C:\Program Files\Microsoft Visual Studio 10.0\VC\bin>
Type lib /def:libfftw3-3.def
Type lib /def:libfftw3f-3.def
Type lib /def:libfftw3l-3.def
If you have a error on command, copy any mspdb80.dll or mspdb100.dll file to in bin directory.
You will get 6 files
libfftw3-3.exp, libfftw3-3.lib, libfftw3f-3.exp, libfftw3f-3.lib,
libfftw3l-3.exp and libfftw3l-3.lib
and copy it to programming directory.
Delete all mspdb80.dll or mspdb100.dll file from bin directory.
Closed Project and open again and rebuild it again.
Have you actually linked against the library in the project you're building?
Project -> Properties -> Linker -> Input -> Additional dependencies
You need to add the library's filename to that field.
Assuming you've actually linked your project against the lib and it doesn't work, use /verbose:lib and paste the output of that and the output of
dumpbin /exports fftw.lib | findstr fftw_free
I had similar problem. What helped was compiling the fftw libs with this help Compiling FFTW source in Visual studio. Actually more closely the problem was compiling my application Win 32 and trying to use x64 -libraries. So make sure the platform is same.