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.sinusgear.com"

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

/DURL=\"http://georgik.sinusgear.com\"

It will transform into .vcproj file:

AdditionalOptions="/DURL=\"http://georgik.sinusgear.com\""

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.sinusgear.com"
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

23. November 2011

Mintty – resizable terminal for Windows

Update 4.11. 2012: Mintty/Cygwin Termina; has also support for transparency.

Update 31.12. 2011: new version of Mintty (see discussion).

Cygwin is great tool for Windows.

E.g. You can create shell script to access windows share via //computer/share_name. This saves a lot of time when you’re domain admin and you need to maintain many computers.

The only BIG drawback of Cygwin for Windows was terminal window. When you work on Mac or Linux you can resize terminal window as you need. Terminal (CMD) for Windows sucks. In default installation you can resize just in one direction. The other option would be to mix Cygwin with PowerShell, but then many things are not working at all.

Good news! Great news! There is new terminal window in Cygwin 1.7.x. It’s application mintty.

Installer will create link to this app with name Cygwin Terminal. It will launch mintty process and you can resize window without problem.

It works fantastic! After so many yeaars it is now possible to use full power of Windows and Linux together in one bundle. (Yes, I know about other terminals like rxvt or X-based stuff, but it required always some extra steps).

Some computers were complaining that /Cygwin-Terminal.ico was not found and I was not able to launch terminal. Solution was easy. Right click on launcher icon and remove icon parameters from Target. The result target command should look like: C:\cygwin\bin\mintty.exe

Hooray! BIG thank you goes to authors of mintty for Windows.

Follow Mintty T.

14. October 2011

_ITERATOR_DEBUG_LEVEL’: value ’0′ doesn’t match value ’2′

Update 16.10. 2011: new information added to article.

I was trying to compile an application with Visual Studio 2010 which has some dependency on GDAL open source library.

Everything went ok. GDAL compiled without problem from VS and also from command line:

nmake -f makefile.vc MSVC_VER=1600 DEBUG=1

Compilation of application based on GDAL was also ok. The only problem was when I switched project from Release mode to Debug mode. Linker was throwing a lot of messages like this:

'error LNK2038: mismatch detected for _ITERATOR_DEBUG_LEVEL': 
value '0' doesn't match value '2' in vrtizer.obj

I found some explanation that new version of VS has _ITERATOR_DEBUG_LEVEL set to 2 in Debug mode. It means that there are some extra security controls over iterators to detect memory leaks and other problematic stuff with iterators.

After longer research I came to realization that GDAL is compiled with /MD switch and my application wasn’t. The solution was easy. I just added /MD and Debug mode of app start working like a charm.

Quote from MSDN about /MD compiler switch:

Defines _MT and _DLL so that both multithread- and DLL-specific versions of the run-time routines are selected from the standard .h files. This option also causes the compiler to place the library name MSVCRT.lib into the .obj file.
Applications compiled with this option are statically linked to MSVCRT.lib. This library provides a layer of code that allows the linker to resolve external references. The actual working code is contained in MSVCR71.DLL, which must be available at run time to applications linked with MSVCRT.lib.

Update 16.10. 2011

/MD solved problem, but there was another warning: Command line warning D9025: overriding ‘/MDd’ with ‘/MD’.

To solve Iterator issue for GDAL you need to compile DEBUG version of gdal.lib with switch /MDd instead of default /MD.

Just open nmake.opt file and replace /MD in lines with DEBUG definition by /MDd.

There are two lines with MD:

OPTFLAGS= $(CXX_ANALYZE_FLAGS) /nologo /MDd /EHsc /Zi /W4 /D_CRT_SECURE_NO_DEPRECATE 
/D_CRT_NONSTDC_NO_DEPRECATE /Fd$(GDAL_ROOT)\gdal$(VERSION).pdb /DDEBUG
OPTFLAGS=   /nologo /MDd /EHsc /GR /Zi /W4 /Fd$(GDAL_ROOT)\gdal$(VERSION).pdb  /DDEBUG

Then rebuild GDAL:

nmake -f makefile.vc clean
nmake -f makefile.vc MSVC_VER=1600 DEBUG=1

29. August 2011

Managing LDAP with Apache Directory Studio

One of key downsides of LDAP in past was lack of cross-platform tools for managing directory structure.

Recently I found very good implementation of LDAP management tool based on Eclipse. It is Apache Directory Studio.

It is possible to connect it also to Microsoft Active Directory. Good work!

27. June 2011

The end of RIA era as we know it

RIA erra was annouced several years ago by companies like Adobe, Microsoft and Sun. Those companies had special software “fixtures” that move web behind static HTML. Flash player, Silverlight or JavaFX carried promise of more interactive future.

The only problem was that technologies like Flash Player and Silverlight were under control of companies. Yes, there were a lot of things that you could do with RIA tools. Building video player, complex enterprise apps and so on.

Adobe took even further step and made this technology available for Linux community. Unfortunately some managers took measures and decided that they won’t ship Eclipse based plugin for Linux and as a result this led company to cancelling support for Linux in Adobe AIR. The glorious promise of one code multiple platform was broken.

Flex/Flash/AIR and Silverlight are very advanced technology. They can do a lot. The price for that is hidden in their complexity. The web learned from mistakes of those technologies.

It happens that when you write code for the first time then you make a lot of mistakes. Once you do it again you can make it even more efficient. RIA era was great starting point for open technologies that we have today.

I would like to add further points to Flex, because I invested huge amount of my time into this technology. Flex is great piece of technology art. There is no question about that. Flex is even open source. Unfortunately it is complex. Complexity is good when you want to sell enterprise software. Let me formulate it in other way: It was good when you wanted to sell enterprise software. Complexity of projects were blocking Innovation. Take jQuery do some fancy stuff in 5 minutes and you won’t be able to do it in Flex in 4 days.

The primary trap of Flex was one big untrimmed framework. Adobe found out that Flex 3 is too big to fit on mobile devices and therefore Flex 4.5 has completely different architecture. It is so different that it took several days or weeks to port application. That is expensive and result is questionable. My advice is do not try to port app to Flex 4. Write a new one.

The last hope for Adobe Flash player was to promise something great. They promised wonders of 3D in Flash player “soon” at Adobe MAX 2010. Today is summer 2011. No 3D was launched in official version of Flash Player. Meanwhile WebGL and Canvas took off. Open technologies are taking over the ground of 3D and people are doing real creative stuff with great performance even without Flash.

Adobe focused Flex 4.5 on mobile development. I doubt that it was right step how they did it. In order to meet the promise of mobility they had to broke a lot of backward compatibility stuff and to be honest you have to rebuild apps from the scratch again. Another problem is that many good Flex/RIA developers left Adobe in last months. It’s a big challenge for Flex team to keep the ball rolling. I wish them good luck.

I do not regret time invested into Adobe technologies. It taught me a lot. The only thing that I saw as a weak point of Adobe is communication with community. Voices from Linux community were overlooked for many years. Even minor bugfixes took 2 years to implement. Adobe was not able to off-load this development and testing to community. jQuery and other JavaScript frameworks did this in much better fashion.

As far as I understand actual situation Adobe is now moving toward more “safer” enterprise world. Adobe bought Day software and other companies that are focused on enterprise world. But that is different story.

To tell long story short: This is the end of the RIA era as we know it. There are new challenges :-)

  • Babel fish

      Translate from:

      Translate to:

  • Where’s the fish?

  • Further info

  • Badges

  • Video channel

  • Learning

    Grow your brain.
  • Tags

  • Topics

  • May 2013
    M T W T F S S
    « Feb    
     12345
    6789101112
    13141516171819
    20212223242526
    2728293031  
  • Comments