Setting up Kyoto Cabinet in Visual Studio - visual-studio

I am trying to setup Kyoto Cabinet in Visual Studio (VC++). I added the source files and the static library kyotocabinet.lib
However, it is giving me a link error LINK2005
By default, the library is built with linking to LIBCMT.LIB' by the/MT' option. I also tried rebuilding the library with the `/MD' option. I am still unable to do it.
Has someone tried to use it in Visual Studio?

I found the solution.
We just have to create a new empty C++ project in Visual Studio.
Add the header files and the static library from Kyoto Cabinet Win32 Package
Set the Runtime Library from Properties -> Configuration Properties -> Code Generation to [/MT]

Related

Assimp linker error Visual Studio 2013 - invalid or corrupt file

I am trying to make assimp work with Visual Studio 2013, but I always get this error:
Error 1 LNK1107: invalid or corrupt file: cannot read at 0x2F0
I followed all the steps here -> Assimp model loading library install/linking troubles
Built assimp from source using cmake, Visual Studio 12 2013 and put the includes and generated dll file in the solution folder. Added the paths in visual studio VC++ Directories (Include, library), C++ (Additional include dirs), Linker (Additional Library dirs, Additional Dependencies).
Am I missing something?
In addition, can someone suggest some other tools to read obj files and load vertex/index/texture buffers directly from the file?
You need to link against the assimp.lib, not against the assimp.dll. The lib is used to say your aplication that it has to load the dll when starting your application.

How to add boost library 1_65 or 1_64 to Visual Studio 2017 project?

I am trying to add boost 1_64 (boost 1_65 will also work) to my Visual Studio 2017 project which includes boost/array.hpp and boost/asio.hpp and used various methods of the same.
I have used the following method https://studiofreya.com/2017/04/23/building-boost-1-64-with-visual-studio-2017/ but I am getting error: cannot open source file "boost/array.hpp" and cannot open source file "boost/asio.hpp" and other errors on the methods of boost.
The error implies that you haven't added boost to the VC++ Directories.
To add them:
Open the Property Manager from the View -> Other Windows menu.
Click on the project and navigate down to Microsoft.Cpp.x64.user.
Right click and select Properties.
Open Common Properties and select VC++ Directories
Add the directory where you installed boost to Include Directories
Add the directory where you builtboost libraries to Library Directories
Also see Boost Getting Started on Windows in case you get stuck elsewhere.

Linkage error with glui32.lib and libcd.lib on Visual Studio

I am trying to port a (very) old project of mine from Visual Studio 6 to Visual Studio 2010.
The project is an OpenGL application, and as such, it uses the following libraries (amongst others):
glu32.lib
glui32.lib
glut32.lib
opengl32.lib
The glui32.lib library links the libcd.lib library, which is not supported on Visual Studio 2010.
So I need to find a version of the glui32.lib library, which links the libcmtd.lib library instead.
My questions are:
Is there any such version of the glui32.lib library?
If yes - where can I download it?
If no - can I use the libcd.lib library on Visual Studio 2010?
If yes - where can I download it?
If no - is there any other way for me to solve this linkage error?
UPDATE
I'm leaving the answer below as the accepted one, but here is a workaround for porting an OpenGL project from Visual Studio 6 to Visual Studio 2010 (after creating the project in Visual Studio 2010):
Right click the project and choose Properties.
Open Configuration Properties --> C/C++ --> Preprocessor.
In the Preprocessor Definitions entry, add GLUT_BUILDING_LIB.
In the Runtime Library entry, choose Multi-threaded (/MT) or Multi-threaded Debug (/MTd).
Open Configuration Properties --> Linker -->Input.
In the Additional Dependencies entry, add glu32.lib;glui32.lib;glut32.lib;opengl32.lib.
In the Ignore Specific Default Libraries entry, add libcd.lib.
You can rebuild GLUI. The MSVS project they ship converts without issue to VS2010.
You will have to point it at your GLUT build though.

Using Gloox with Visual Studio 2010

I am trying to use the gloox library (C++) to create a Windows XMPP application. It seems simple enough, except I don't know how to import gloox into Visual Studio 2010 so I can include it in my application project.
I've looked at the instructions provided in the read-me (shown below), but when I try to compile the library, I get this error:
Cannot open source file: 'src\tlsgnutlsserver.cpp': No such file or directory
Instructions provided in the read-me file:
Building gloox on MSVC++
use the included project file or create your own
adjust include + library paths if necessary
to receive any debug output you should use the LogSink facilities (this is not win32-specific)
build
Does anyone have experience using Gloox with VS10? If yes, can you please help me out? Thanks!
I assume you're using the official 1.0 tarball? I had the same problem (missing source file) and had to acquire the source from SVN instead. I used the 1.0 branch.
I encountered a few other build problems, namely
the release build configuration was set to build an Application (.exe) instead of Dynamic library (.dll) (Project->Properties->General->Configuration Type)
I needed to add DLL_EXPORT to the preprocessor definitions (Project->Properties->Configuration Properties->C/C++ ->Properties->Preprocessor)
src\atomicrefcount.cpp needed to be added to the project's source files. (Project->Add Existing Item)
This worked for me in express editions of both VC++ 2010 and VC++ 2008.
Hopefully it helps you as well.

How to build MFC library from source with Visual Studio 2010

Visual Studio has historically always included the MFC library as source so you can build it yourself with the supplied makefile. But in Visual Studio 2010 there is no makefile for MFC. So, how can you rebuild it?
There is documentation on MS implying the makefile should be there:
http://msdn.microsoft.com/en-us/library/bs046sh0.aspx
.. so perhaps its an oversight, or perhaps they migrated it to msbuild but forgot to include the mfc msbuild project file.
If anyone has succesfully built a custom MFC based on that in VS2010 how did you build it?
Can the makefile from VS2008 be used with minimal tweaks? Or does anyone have an msbuild script for it?
I'm only interested in a statically linked library to be used with a specific app.
since in the end MFC is a library as any other, you can just create a new project in visual studio and add all MFC source files to it. Set the options to create a static library, set compilation/linker options as desired (eventually based on the 2008 makefile) and you're ready to go.

Resources