18. November 2012

Allegro5.1 and Visual Studio 2012 – Unable to start examples – missing dll files

It’s easy to work with Allegro 5.1 project in Visual Studio 2012. Just clone the project from git repo. Invoke cmake-gui.

Note: Make sure that you have installed Windows SDK for Windows 8.

You can do it using following commands (use Developer Command Prompt for VS2012 or set proper variables):

git clone git://git.code.sf.net/p/alleg/allegro
cd allegro
mkdir Build
cd Build
cmake-gui ..

Click Configure and Generate. Then open solution in Visual Studio.

You can build whole solution. The only problem is that when you want to invoke any example then you’ll see something like this:

Those DLL files are located in Build\lib\RelWithDebInfo (or something like that). It is sufficient to update PATH environment variable. You can do it on per-project basis.

Press Alt+F7 (Right click – Properties) – Debugging – Environment – Set/Add:

PATH=$(ProjectDir)..\lib\RelWithDebInfo

Run the example again (F5):

25. September 2012

StarCube – Git, Jenkins and Chuck

New run of StarCube startup accelerator is here.

I prepared small presentation about Git and CI system Jenkins. You can find slides at SlideShare or download it as PDF.

Linus Torvalds talk about Git – 2007

18. May 2012

StarCube Show – demo day for projects participing in StarCube

StarCube Accelerator 2012 was great boost for new startups. There was cool event: StarCube Show in Observatory and Planetarium Brno.

StarCube team prepared for you recordings of this spectacular event. Check it out at: http://www.superlectures.com/starcube2012/.

7. February 2012

StarCube – New program for startups in Czech republic

Microsoft Innovation Center in Czech republic announced new program for startups – StarCube.

StarCube is continuation of MIC Akcelerator 2.0.

I will participate as member of mentors team. My primary focus will be: Software development in startup company. I’m looking forward to discuss new challenging topics. 🙂

15. December 2011

How to define C++ macro with string content and pass it to MSbuild

Imagine that we have C++ project e.g. for Visual Studio 2008. It is possible to build this project just by msbuild command:

msbuild MyProject.vcproj /p:Configuration="Release"

Let say that we want to use #define in the source code. It is necessary to define it in Configuration Properties > C++ > Command Line:

/DSIMPLE_DEFINE

This just pass SIMPLE_DEFINE as flag.

How to deal with string define which should behave like string? E.g.:

#define URL "http://georgik.rocks"

The trick is in escaping quotes. We can add following define to Command Line:

/DURL=\"http://georgik.rocks\"

It will transform into .vcproj file:

AdditionalOptions="/DURL=\"http://georgik.rocks\""

Let’s make one more step.

How to acquire such a define from environment variable? E.g. with following build.bat file:

set URL="http://georgik.rocks"
msbuild MyProject.vcproj /p:Configuration="Release"

It requires only small modification of .vcproj file:

AdditionalOptions="/DURL=\"$(URL)\""

😉

Small recap of flow: set env variable – pass it to XML – pass it compiler – pass it to code

  • Quick search

  • Links

  • Twitter

    Follow @jurajmichalek on twitter.

  • Comments

  • Tags

  • Topics