Compiling libmodplug on windows - c++

I'm trying to compile a release version of love2d on windows. I got all the dependencies downloaded / compiled. However, I have one last problem that I cannot fix:
The object or library file
'lib\libmodplug.lib' was created with
an older compiler than other objects;
rebuild old objects and libraries
I had similar issues with other dependencies, however I was able to compile those dependencies. The libmodplug source does not provide a Visual Studio solution or project file, and I couldn't find any hints on how to compile this under windows.
By the way, I'm using Visual Studio C++ Express 2010.
Thanks in advance!

Related

Boost library file generation

I am trying to compile boost 1.52 library files with Visual studio 2013. To do so, run the file b2 with the visual studio prompt command.
Everything seems to run correctly . However, the lib files that I am getting in /stage/lib/ have no version of VC. For example, I have
libboost_date_time-vc-mt-1_52.lib
My dynamic libraries require
libboost_date_time-vc110-mt-1_52.lib
When I rename all files by substituing vc with vc110, it works as a charm, but it is a very fastidious process.
I made some researches and I could see that one could control the version of Boost with respect to the version of VS. I tried the following command
b2 toolset=msvc-12.0
Yet, I still get the versionless file.
How do I make it work ? Thanks.
boost 1.52 was released in 2012. At this time, Visual Studio 2013 was not an existing compiler.
You are compiling a library with a not officially supported compiler. You're actually even lucky that boost 1.52 compiled with Visual Studio 2013.
It's not surprising that b2 is unable to add vc110 to your libraries names. There may be a case statement somewhere in boost build system configuration files that has a version name for every "supported" compilers....and there may be no vc110 there...
You need either to take the first boost version supporting Visual Studio 2013 or use Visual Studio 2010 compiler (which is supported by 1.52)....or rename the files manually as you did.
By the way, note that renaming the libraries will make auto-link fail if you are plannign to use it. See boost\config\auto_link.hpp: this explicitely handle every compiler version....will only work with officially supported compilers.

Installing socket.io C++

I try to work with socket.io in C++ but I can't seem to get the example running.
First it asked me to convert the project to my visual studio (which is 2015). So I did that. Then it was missing libraries offcourse (boost, websocket++, rapidjson). So I added them to the additional libraries in the project settings. Then it was searching for boost.lib. Boost.lib doesnt exist in the boost library I installed on my pc, so I deleted it from the dependency list. I figured I already included boost, why would it search for a lib that doesn't exist. I ran bjam.exe and b2.exe etc from boost, so if there would be a boost.lib it should be there I guess and it isn't.
I then got this error: https://msdn.microsoft.com/en-us/library/f6xx1b1z.aspx
So I added msvcrt.lib and msvcmrt.lib to the linker's Additional Dependencies property. Which caused the errors in the included image..
Now all the steps seemed to fix the problems I had, but also create more errors in the process. I do not understand how to run a project like this and I can't find a good explanation of the steps I need to take.
Can anyone explain what I am doing wrong?
https://github.com/socketio/socket.io-client-cpp
That is what I try to run, the included SioChatExample
Thanks for any help in advance!
Current errors..... :(
i think many errors because of VC++ version.
creator of project Socket.io-c++, he used VC++ 11.0
if you use VC++ 14.0 to build it, you will get the error. for suggestion you should use VC++ 12.0
In cast you want to use prebuilt libraries:
i myself just try many solutions,
goodness i fix all
you can get them here Prebuilt-libraries-for-Socket.io-c++
for Visual Studio 2015, what u need are:
install more Visual Studio 2013 (i install Visual Studio 2013 community) to get VC++ 12.0 (prebuilt-lib is built in VC++ 12.0)
change your project Platform Toolset to Visaul Studio 2013 (v120)
link libraries to your project
libraries you need are:
libboost_date_time-vc120-mt-gd-1_50.lib
libboost_random-vc120-mt-gd-1_50.lib
libboost_system-vc120-mt-gd-1_50.lib
sioclient.lib
include folder of *.h (header of Socket.io-C++) to your project
build and run

MSVCR100D.dll is missing when build/running project from another PC/VS

I uploaded my (VS2013) project folder and provided it to the other members of my team, but when they tried to build/run it, using Visual Studio 2012 they got this error, it also happened on their version of Visual Studio 2013.
The program can't start because MSVCR100D.dll is missing from your computer. Try reinstalling the
program to fix this problem.
They reinstalled VS2010 but no go.
I also tried to statically link my project by using /MT in the Code Generation options but now I get:
Unresolved External Symbol __free_dbg libcmptd.lib cout.obj
....25 more...
How can I get it so my project can be build/ran on my team members pc? How do I resolve the unresolved externals? It seems to happen purely with regular Microsoft files.
You are mixing C++ libraries built with different versions of the compiler (and as we know some of them are linked against debug dynamic version of VC10 runtime library). This is not supported, as different compiler versions have different ABIs.
To fix the mess you need to find libraries built with parameters that match parameters of your project. They should be built:
with the same compiler version (ex. VS 2013)
with the same configuration (Debug/Release)
against the same platform (x86/x64/ARM)
against the same runtime library variant (static/dynamic + debug/release)
You could either try to find prebuilt versions on the web or to build libraries yourself from source codes. Often, you will want to have multiple configuration/platforms for your project and, thus, you will need multiple versions of your libraries.
If your search will not succeed (for example if there is no VS2013 build for a closed source library) you could roll back your project to another version of compiler and to start over.
Any attempts to link incompatible libraries even if somehow succeeded will lead to random crashes.
This message generally states that the dll is referred to directly or indirectly in your application and is missing.
The 'D' at the end show us this is the Debug version of the file, this is DLL file is provided with the Visual Studio 2010 installation. So the MSVCR100D.dll would be provided with the installation of Visual Studio 2010.
Of course, you could be missing other versions 2008 (MSVCR90D) 2010 (MSVCR100D) 2012 (MSVCR110D) or the 2013 (MSVCR120D), each dll is provided according to the Visual Studio version.
There are a few ways to solve this:
Check to be sure that you're compiling all the components of your
project in Release mode. If this does not solve the issue continue
to the next steps.
You could solve this locally by installing Visual Studio 2010 on your
machine. This is not what I would recommend, but it would surely
overcome the issue
You could also download the file from this third party website and
copy it to your projects bin:
http://www.dll-files.com/dllindex/dll-files.shtml?msvcr100d
This option is the LEAST recommended option.
Run dependency Walker and see what file depends on the MSVCR100D.dll
and the try and fix that file in order to break your dependency. You can download depends here: http://www.dependencywalker.com/
Check to be sure that you're project is linking the correct version of
the CRT and any other libraries you may be using (e.g., MFC, ATL,
etc.)
Note: Installing the redistributables alone will NOT solve this problem, since the redistributables only contain the release version of the file MSVCR100.dll (notice no 'D')
Would it be possible that in your project you are somehow using some component/library built with Visual Studio 2010, which requires the MSVCR100D DLL?

Can't Compile Solution in Debug Mode Because MSVCR100D.dll is Missing

I am running Microsoft Visual Studio Express 2012 for Windows Desktop on a 64 bit machine with windows 8.
I create a completely new Win32 Console Application (in C++) and accept the default options. I then build and run the solution in both debug and release modes and it works all find and dandy. Next I configure the include and library directories for the dynamic SFML library. I link to the debug and release .lib files and put the debug and release .dll files in the proper directories. I then add some simple code which uses the library, build and run the application in debug mode and I get this error: "The program can't start because MSVCR100D.dll is missing from your computer. Try reinstalling the program to fix this problem." If I build and run the application in release mode it works with no errors. (And yes I have the redistributables installed 32 and 64 bit.) Now from what I understand and according to this thread that .dll file is for debugging only and is not included in the redistributable package (which would explain why it doesn't work in debug mode). The answer says that developers have it installed with visual studio by default. This is obviously not the case as evidence from the error and I've reinstalled visual studio and restarted my computer twice now.
In conclusion, how do I simply compile my solution in debug mode without getting this error?
I'm afraid someone will mark this as a duplicate so here we go:
LINK - "...you appear to be linking to the debug version of the runtime, it is not normal to distribute apps linked against the debug version of the runtime."
Doesn't pertain to me because I'm not distributing this app, just trying to run it in debug mode.
LINK - "I compiled my program using Microsoft visual c++ 2010 Express Edition and tried to run it on another machine that did not have the same compiler."
This person get's the error when he runs what hes compiled on a different computer, not when actually compiling the application.
LINK - "If you get this error for your release build..."
I dont.
LINK - "You can compile your project in "Release"..."
My project is not ready to be released therefore I should compile my project in debug mode.
MSVCR100D.dll is the dll for Visual Studio 10, so somewhere something is depending on it (the SFML dlls?). Whatever you compile (in debug mode) with Visual Studio 2012 will require MSVCR110D.dll, which you should have available on your machine as part of the installation.
I suggest you build SFML yourself on your own version of Visual Studio, it's pretty easy. In fact, the binaries available on the site as part of the SFML 2.0 RC are rather old and you'll do yourself a huge favor by building from the latest sources, as a lot of fixes and improvement were applied in the meantime.
(Also, definitely use 2.0 instead of 1.6. The site is rather misleading, but on the SFML forums virtually everyone will recommend you use the last version)
This message generally states that the dll is referred to directly or indirectly in your application and is missing.
The 'D' at the end show us this is the Debug version of the file, this is DLL file is provided with the Visual Studio 2010 installation. So the MSVCR100D.dll would be provided with the installation of Visual Studio 2010.
Of course, you could be missing other versions 2008 (MSVCR90D) 2010 (MSVCR100D) 2012 (MSVCR110D) or the 2013 (MSVCR120D), each dll is provided according to the Visual Studio version.
There are a few ways to solve this:
Check to be sure that you're compiling all the components of your
project in Release mode. If this does not solve the issue continue
to the next steps.
You could solve this locally by installing Visual Studio 2010 on your
machine. This is not what I would recommend, but it would surely
overcome the issue
You could also download the file from this third party website and
copy it to your projects bin:
http://www.dll-files.com/dllindex/dll-files.shtml?msvcr100d
This option is the LEAST recommended option.
Run dependency Walker and see what file depends on the MSVCR100D.dll
and the try and fix that file in order to break your dependency. You can download depends here: http://www.dependencywalker.com/
Check to be sure that you're project is linking the correct version of
the CRT and any other libraries you may be using (e.g., MFC, ATL,
etc.)
Note: Installing the redistributables alone will NOT solve this problem, since the redistributables only contain the release version of the file MSVCR100.dll (notice no 'D')
MSVCR100D is part of the 2010 Visual Studio package - indicating that some components of your system are compiled with the older version of Visual Studio, so you will need to install the Visual Studio 2010 version - you can probably still develop with the 2012 version, just as long as [parts of] the 2010 is on the machine.
Or you need to recompile some components that your application depends on to use the 2012 (msvcr110d) libraries - if you have all the source code, that would be my preferrred method.

OpenGL: How to compile glew32.dll from source file

I download the glew source file from http://glew.sourceforge.net/.
In the readme file, it says I should use \build\vc6.0\glew.dsw to comple the DLL.
But there are four projects after I open it in VS 2010.
When I compile them, 2 of them failed to compile.
Thanks.
Ok.
I figured it out.
Just open the the file in glew.dsw in VS 2010.
There are four projects.
Compile glew_shared, you will get glew32d.dll.
Compile glew_static, you will get glew32d.lib.
just ignore the other two.
glew32d.dll and glew32d.lib works fine in VS 2010.
This also answer my own question in
Glew in VS 2010: unresolved external symbol __imp__glewInit
Just a guess but by the way that folder is labelled, it's probably meant to compile using Visual C++ 6.0, which came with Visual Studio 6. I just gave it a quick try and built without problems under that IDE. Of course, I don't believe Microsoft offers that product anymore. If you want to build it yourself, you'll probably have to upgrade the code base to Visual C++ 2010.
I ran into the same problem. I converted the original project to Visual Studio 2010 and placed the result in https://github.com/chrisoei/glew. See the downloads section for a zip file containing glew32.dll built using VS 2010.