[TRE-general] config

skaller skaller at users.sourceforge.net
Wed Aug 30 17:01:10 EEST 2006


On Wed, 2006-08-30 at 15:19 +0300, Ville Laurikari wrote:
> On Tue, Aug 29, 2006 at 06:09:46AM +1000, skaller wrote:

BTW: one more issue: to use TRE on Felix, the config
has to be modifed to include this:

#include "flx_target_tre_config.hpp"

which says this:

#ifdef BUILD_TRE
#define TRE_EXTERN FLX_EXPORT
#else
#define TRE_EXTERN FLX_IMPORT
#endif

and in turn, every public routine must be edited
to be declared like this:

TRE_EXTERN int regcomp(regex_t *preg, const char *regex, int cflags);

Here FLX_EXPORT will be defined to _dllexport on Windows
and FLX_IMPORT to _dllimport on Windows when using dynamic linkage. 
Both gcc and MSVC++ recognize this directive to export the symbol.

The macro BUILD_TRE is defined on the command line
when building TRE.

This is mandatory for building Windows DLLs. In order for us
to build with TRE sources unaltered, this hackery or something
similar will have to added.


-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net



More information about the TRE-general mailing list