Conversion VC++ library to GNU (MinGW, GCC) format

Sometimes you have to use other compiler than VC++ (ok, be honest, in most cases 🙂 ), but what to do when your libs are in VC++ format? Solution is very easy, and it will be shown below on MySQL library case.

I assume you have mingw.

Download mingw-utils:
https://sourceforge.net/projects/mingw/files/MinGW/Extension/mingw-utils/mingw-utils-0.3/mingw-utils-0.3.tar.gz/download

reimp.exe -d libmysql.lib
dlltool.exe -k -d libmysql.def -l libmysql.a

That’s all folks 🙂

How to compile libjpeg using mingw

Downlaod latest MinGW from sourceforge: https://sourceforge.net/projects/mingw/files/ and install it to c:\MinGW

Download latest libjpeg sources from: http://www.ijg.org/files/ and untar it to c:\MinGW\msys\1.0\home\

Launch msys shell: c:\MinGW\msys\1.0\msys.bat
cd /home//libjpeg-
./configure
make
make install

now in .libs folder we will have files: libjpeg.a, libjpeg.dll.a and libjpeg-7.dll

How to generate C++ .h file with current SVN revision number

@ECHO OFF
for /f "delims=: tokens=1,2" %%a in ('svn info') do (
  if "%%a"=="Revision" (
    set /a RELEASE_REVISION=%%b
  )
)

set SVNVERSIONFILE="svn_current_version.h"
echo #ifndef SVN_CURRENT_VERSION_INFO_H > %SVNVERSIONFILE%
echo #define SVN_CURRENT_VERSION_INFO_H >> %SVNVERSIONFILE%
echo #define SVN_CURRENT_VERSION %RELEASE_REVISION% >> %SVNVERSIONFILE%
echo #endif >> %SVNVERSIONFILE%

How to set 24bit colors and antialiasing on WindowsXP client using rdesktop on Linux

Add Keys to Windows registry:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp]
“AllowFontAntiAlias”=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations]
"AllowFontAntiAlias"=dword:00000001

Run Group Policy Editor (exec gpedit.msc)
In the GPE:
Local Computer Policy > Computer Configuration > Administrative Templates > Windows Components > Terminal Services
Once you click on Terminal Services look in the right TAB and search for Limit Maximum Color Depth. It will probably have status Disabled by default. Right click on it and go Properties. The Properties window will open up. On the Setting TAB select Enable and at Color Depth select whatever you want (i.e. 24 bit)