How do I use libcurl in Visual C++ 2010? - visual-studio-2010

Hey guys, I was wondering if you would be able to help me use libcurl within Visual Studio to resolve the errors in the image below:

It looks like you need to update Visual Studio's configuration to include the directories where you've installed cURL. VS has directories for both Include files and libraries -- if memory serves, you'll have to add both.

I too ran into same issue. The problem is, i was pointing in additinal lib dirs to lib/LIB-Debug instead lib/DLL-Debug. Also the lib to add is libcurld_imp.lib and not libcurld.lib. Also you need to copy libcurld.dll into executable file location. I see that there are lib/LIB-Debug dir and lib file but dont know what they are for. You have to do use DLL-Release, libcurl_imp.lib etc for release mode.

Related

Install opencv on visual studio 2013

I have installed open cv and have configured all the path variables as mentioned in step by step procedure.
I tried a sample program to verify whether my installations are correct. I have mentioned all the path for include files, library files and additional path variables in visual studio 2013.
I am getting error "Cannot open opencv2/core.hpp no such file or directory"
When i check the location of the include file under opencv2 folder there is no such file. But i can see the same in github. If i branch out and download the same from github again in my local I cannot see the core.hpp.
Got answer for this issue... This is because from version 3 openCV needs only couple of lib files to be associated with additional library dependency.. Earlier we need to have multiple lib files for the same...

Error while Loading CMU sphinx in visual studio 2013

I am trying to load CMU sphinx in visual studio 2013 but getting some error.
The steps which i followed was
I downloaded sphinxbase-5prealpha and pocketsphinx-5prealpha and extracted to same folder.
Then i complied all the projects from both pocketsphinx and sphinxbase in visual studio(it asked me to upgrade the compliers so i did the upgrade)
now after cleaning the project, when i am trying to build all the project it is throwing a error that 'cannot open sphinxbase.lib' which it is showing in pocketsphinx project.
when i checked the 'sphinxbase.lib' file was already there in the linker of the project.
According to this document the 'sphinxbase.dll' file should be added to the bin files, but it is already added in the directory bot release and debug.
Similarly it is present in debug directory also.
Please help me, can anybody tell me what wrong i am doing here??
I am just a beginner only in this area.
Thanks !
You extracted files incorrectly. The layout must be the following:
root folder
\____pocketsphinx
\____ all files like README, src
\____sphinxbase
\____ all files like README, src
You need to download sources and unpack them into two folders - pocketsphinx and sphinxbase. Then open sphinxbase solution and compile everything. Then open pocketsphinx solution and compile everything. Please note that if you downloaded pocketsphinx-5prealpha you need to rename it to just pocketsphinx. Same for sphinxbase.
Please also note that pocketsphinx_5prealpha_win32 is a binary distribution, you can not compile it. Instead, you can include it directly into your projects.

Visual Studio 2010 can't see /bin library of OpenCV

I'm trying to use OpenCv 2.2 in Visual Studio 2010.
I've configured everything by instruction:
http://opencv.willowgarage.com/wiki/VisualC%2B%2B
and by instruction from the book:
So I've added all /lib and /include paths.
When I build project, it compiles and before starting app, VS displays an error message that opencv_core220d.dll is missing.
This file is in C:/OpenCV2.2/bin as all .dll files. If I add this file to my working directory - it will be fine. Then VS displays error about every .dll file that I added in Linker-Input configuration ( but with .lib extension ).
So, if I add all .dlls file that I've added as .lib in Linker configuration - to my working directory, project will start.
But why? Why VC doesn't see OpenCV2.2/bin folder? Where is this pointed?
Because it doesn't know to look there by default. However, it does know to check the current directory for the DLLs.
You can tell it where to look by adding C:/OpenCV2.2/bin to your Path variable, or if you would rather not muck up your global Path you can set the Environment variable local to the C++ project.
I think that is the syntax for appending to the Path in VS2010, but I'm not sure, so Google it if that doesn't work :)

Cannot open include file "d3dx9.h"

Edit: Of course, immediately after working on it for an hour then posting here, I found the stupid mistake...
I'm getting compiler errors when trying to #include <d3dx9.h> in a project. I'm receiving "fatal error C1083: Cannot open include file: 'd3dx9.h': No such file or directory".
I do have the DirectX SDK installed (I also just tried reinstalling it to no avail).
In the Project Properties:
VC++ Directories are set to "$(DXSDK_DIR)Include;$(IncludePath)" and "$(DXSDK_DIR)Lib\x86;$(LibraryPath)" for Include and Library directories respectively for all configurations—and the environment variable %DXSDK_DIR% points to C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\ as expected.
C/C++ > General settings has $(DXSDK_DIR)include listed in the Additional Include Directories
Linker > Input > Additional Dependencies has d3dx9d.lib included for Debug and d3dx9.lib included for Release configuration.
I am able to successfully compile and run tutorial projects from the DirectX Sample Browser.
Visual Studio's Intellisense/autocomplete will find d3dx9.h and suggest type and function names that are within the file (and not included through anything else I'm #includeing) so it seems that Intellisense can find it.
Any suggestions on what I'm forgetting or what else to try?
Thanks
you forgot one thing:
Go to VC++ Directories -> Library Directories
add $(DXSDK_DIR)LIB\x86
apply.
Done. Hope this helps
You should make sure you have ALL paths sorounded by quotes (").
Instead of $(DXSDK_DIR)include you should have "$(DXSDK_DIR)include"
I didn't realize that one of the other projects in the solution was #includeing a file that was #includeing a file that was #includeing d3dx9.h and I hadn't added those paths to that project.
/facepalm
Find the file on your computer, and add it's folder to the properties of your project.
Assuming you have visual studio: Properties/C/C++/General/Additional Include Libraries.
I tried all of these suggestions and none worked.
Turns out the $(DXSDK_DIR) variable doesn't work if you install DirectX while Visual Studio is still running. The solution for me was to restart Visual Studio (+ adding the paths in the solutions listed above, of course).

Compiling OpenCV

I opened up the solution file in the [InstallDir]\_make\opencv.vs2005 and modified one of the .cpp files in the highgui library.
While compiling, Visual Studio throws the error -
Unable to start progam
C:/Users/../AppData/Local/Temp/opencv.build/cv_Debug.Win32/cv.dll
The system cannot find the file specified.
I think I am missing something in it. What is the stepped procedure to change and recompile OpenCV library using Visual Studio.
I would appreciate any help!
Thank You..
Unless you downloaded the visual-studio specific version of the open cv distribution files, you need to follow the instructions on the OpenCV wiki, that is
download cmake
have cmake generate makefiles/solutions
build using the generated files
I guess you want to customize a function. You can do this, without recompiling OpenCV from scratch. You can simply copy the .cpp source file locally in your current working directory, and add it(click n drag or add existing file) in the "Source Files" in your project. You might need to copy some other headers as well. You will find everything in the opencv archive. (opencv/modules/highgui/src)

Resources