Page 1 of 1

Free compiler for housebot plugins

Posted: Sun Feb 06, 2005 6:48 am
by eijckron
Hi,



I'm looking for info to compile the housebot examples with a free compiler like MingW (GCC for windows) or the freely downloadable set from Microsoft.



The free download from microsoft does not support stdafx and only offers commandline compilation.



Any tips are apreciated.

Posted: Sun Feb 06, 2005 9:54 pm
by ScottBot
The samples and helper classes do all specify stdafx.h, but that's only to take advantage of the pre-compiled header feature. There are no MFC requirements for plugin development. The API is strictly "C".



The sample apps are built with MS C++, but don't reference any MFC to my knowledge. With a little work it should be possible to build these samples with a non-MS compiler, although I've never done this.

Posted: Mon Feb 07, 2005 3:08 am
by eijckron
Can you export a makefile from the example project, that would be a good starting point to get things compiled with the free version of the microsoft compiler.

Posted: Mon Feb 07, 2005 12:21 pm
by ScottBot
Sure. I've attached the exported makefile for the Device and Hardware Interface samples.

Posted: Mon Feb 07, 2005 5:59 pm
by eijckron
Thanx for the info. I've compiled the template examples with GCC for windows (MinGW). The dll's are still untested, will check them tomorrow.



Some things in de SDK that were not compatible with GCC:

* In both AddData methods in CDataPack the nLoop variable is

used outside of its scope according to the most recent C/C++ standards.

* #pragma once is not supported by GCC, replacing them with

oldfashioned include once guards with ifdef, define & endif should

work for all compilers.