I've been trying to get curl linked to my project in Visual Studio 2013 and C++, however all tutorials online reference files that are not available anywhere in the archives you can download from their website. What I did was I went to http://curl.haxx.se/latest.cgi?curl=win32-ssl-devel-msvc and downloaded the package. All tutorials reference either a lib/Debug folder or some .dll or .lib files which just simply aren't there. The documentation on their website is from 2002, so that won't help either.
Could anyone explain which version I need to download and what I need to reference in my project properties and where? Thanks!
Ok fixed it, had to build the libcurl.lib file from source. Changed build type to LIB Release and it worked! Thanks.
Related
I have a Qt project with Visual Studio 2017. I tried to generate project files with premake and used the premake5.lua file from this page "https://wiki.qt.io/Premake_Project_Manager". this file uses a qt-support.lua module which is available on github. However, when I build my project with premake it shows the following error "qt-support.lua:707: action "qt" needs a description". Next, I download the example repository that is referenced in the official Qt documentation (https://github.com/annulen/qt-examples-premake) and tried to generate the project files for that. Even with their repository, it shows the same error. I haven’t used premake before and so I might probably be missing something obvious.
Try this one:
https://github.com/dcourtois/premake-qt
I've been using it for years and I'm very happy with it.
I'm trying to use the hidapi library on Visual Studio 2015 for a c++ console app.
I've included hidapi.h as a header file, but can't seem to figure out how to link the dll. I've scoured this site looking for solutions to including other libraries but they seem specific for each case.
Any help is greatly appreciated.
1.If you already have the hidapi.lib and hidapi.dll files, go to project->properties->configuration properties->linker->additional dependencies and add you .lib file's path
if your project is working under x64 ,add your hidapi.dll file in the C:\Windows\System32. Otherwise, add it in the C:\Windows\SysWOW64
I have been trying for days to get boost to work with my Visual Studio 2013 Premium install. I tried it with a zip install, and now with NuGet. Both methods have gotten me to same point of a linker error.
The error: 1>LINK : fatal error LNK1104: cannot open file 'libboost_system-vc120-mt-gd-1_57.lib'
I looked through the mailing list for boost and found someone posting of a similar issue, but that was from 2012 with boost_1_54_0 or something, so not relevant at all to VS2013 or boost 1_58_0.
I've also looked at a few forum posts, including SO, but none of them have the same issue I'm having. Either that, or they simply have no replies.
I can't really discern any of the flags that the error show because this is my first time ever using anything other than STL libraries or my own headers.
Any and all help would be appreciated, let me know if there's any other additional info that would be helpful.
I suspect you installed the NuGet package named simply "boost". This seems to contain all the Boost headers, but no compiled libraries. That's fine if you're interested in using only the header-only Boost libraries (i.e. most of them).
What you really want is the package named "boost-vc120" (vc120 refers to VC++ 12.0, which is the VC++ version that ships with VS2013). This has all the libraries as well. You'll notice that it'll take a lot longer to install.
In either case, NuGet will take care of setting up all the necessary VC++ Directories settings. No further configuration is needed.
The structure of Boost NuGet packages is here. You can use boost-vc120 but it will download ALL boost libraries to your project. So if you want to save disk space, then use boost package which gives you header files, and specific binary packages. In your case, it's boost_system-vc120.
You can't remove boost package because binary packages, such as boost-vc120/boost_system-vc120, depend on it.
Does the file libboost_system-vc120-mt-gd-1_57.lib exist on your hard drive?
If yes, did you add the .lib to the linker/input/Additional Dependencies?
Go to following web page:
https://github.com/sergey-shandar/getboost
From there you find "NuGet Packages for Boost." with multiple links.
If you pick first link - you will get to boost-includes nuget-package
instructions. Basically you need to open Package manager in Visual studio, select correct project, and type command "Install-Package boost -Version 1.69.0" - it will enable
boost includes automatic downloading to "packages" folder.
By following other links you can get boost static libraries for your specific Visual studio - follow "boost-vc141" to get Visual studio 2017 static libraries.
That boost package will get a lot of boost libraries - if you don't need all of them - make temporary project, get boost static libraries, and copy paste libraries which you need by yourself.
I'm fairly new to C++ and an trying to figure out to use the TagLib library for a project I am working on. I'm working with unmanaged C++ in Visual Studio 2010 on Windows 7 64bit. I've never used an external library before so I'm very confused on how to go about this.
From this blog entry I got the libtaglib.a and taglib.dll files. I ran across this SO question on how to use TagLib, but it deals with QT Creator, not Visual Studio and I'm not knowledgeable enough about the subject to understand what is being said to translate it into what needs done for Visual Studio.
So, some questions:
Is it even possible to do this with unmanaged code?
What exactly is the function of a .a file?
Most importantly, how do I go about using the taglib.dll in my program??
I've been all over Google looking for a way to do this, but my major problem is that everything I run across is over my head. Please let me know if more info is required. Any help is very much appreciated! Thanks!
I seem to have gotten it working successfully. Here's a rough outline of what I did:
1.) I used CMake to generate the Visual Studio solution.
2.) I attempted to build the tag project in the VS solution, but it failed.
3.) I made the corrections to a few source files as outlined here: http://old.nabble.com/taglib-fails-to-compile-with-MS-VC%2B%2B-2010-td29185593.html
4.) I built the tag project again in release mode. This time it was successful.
5.) I copied the resulting dll, def, and lib files to the same directory as the source files for my project.
6.) I copied the header files from the taglib source to a subdirectory in my project (not sure if this entirely good practice)
7.) In my project settings, I set the subdirectory with the header files as an additional include directory.
8.) I added the dll, exp, and lib files to my project by just going to Add>Existing Item.
9.) I added some code from the taglib examples and built it. Everything worked so I think I got it.
One caveat I ran into, since the DLL was built in release mode, my project had to be run in release mode or it would crash. I'm guessing that if I replaced the DLL with one built in debug mode I could run my program in debug mode, but I have not tried this.
You cannot use libraries specific to GCC (you can tell because they have .a extensions) with Visual Studio. You will have to build the library from source in order to use it with MSVC. Once you have done that it's a simple matter of adding the .lib generated from the build process to your project and things should work out of the box. (Note that it's a .lib you need whether you're compiling for dynamic linking or not -- doesn't matter in msvc land)
EDIT -- after looking at TagLib itself --
In order to compile TagLib you'll need to get the CMake build system, and TagLib itself, and have CMake build you a visual studio solution. Using that solution you'll be able to build the .libs and .dlls you need. Note that because TagLib is a KDE library, you'll probably need to also build some QT bits in order for everything work work successfully. However, I don't have specific experience with the library so I'm not going to be all that helpful here.
Yo do not have to recompile the source (to create the .lib file) if you have the .dll file. With dumpbin /exports and lib (both came with Visual Studio) yo can create a lib that you can link with your application. In this link you can see a nice explanation: http://www.coderetard.com/2009/01/21/generate-a-lib-from-a-dll-with-visual-studio/
But as Billy Said, probably you would need other parts of QT to use this library.
How do I build it? The documentation is really shady about this. It says you need to place scons.py into the directory, but I have no idea where this is. I have tried using the included prebuild, but it did not produce any .lib files.
No need to use scons.
After you download the jsoncpp source, like from https://github.com/mrtazz/json-cpp, unzip the sources. In this unzipped source tree, under /makefiles/vc71/ you will find several Visual Studio project files which you can up convert and build.
There is a visual studio solution file under makefiles. Did you try migrating that to VS2010 to see if it works?
.py? This is a python script, and has nothing to do with C++. Perhaps you are looking at the wrong instructions.