[Ffll-devel] FFLL example Problems and Linux portability
Brought to you by:
michaelz
|
From: Andreas V. <and...@br...> - 2003-11-23 00:34:59
|
Hi,
I try to use FFLL with Linux and after some Makefile and source
modifications it works. Later I'll send you my Linux Makefile and source
modifications if you like. First I'll improve it and perhaps try to
build a shared object library.
I could create the static library and compile the AIWisdom.cpp demo
source in Linux. But output is only:
AIWisdom: ../MemberFuncBase.cpp:490: int MemberFuncBase::set_value(int,
double): Assertion `val >= 0.0f' failed.
I looked at the source and there is:
int MemberFuncBase::set_value(int idx, RealType val)
{
// this version takes a value from 0 to 1 and maps it to a value
between 0 and DOM max
// mapp the float to the values[] array makeing sure it doen't
go over // the DOM max
assert(val >= 0.0f);
assert(val <= 1.0f);
// set it if it's out of range
if (val < 0.0f)
val = 0;
if (val > 1.0f)
val = 1;
So, I ask myself why is there an correction routine for val if there is
an assert before? If I comment out the assert commands it works great.
I've noticed also another porting problem. If I start the sample like I
downloaded the files I got:
Error Opening aiwisdom.fcl
After some time I found the solution. The fcl file has Window Line
Feed Format, but in Linux is another Line Feed Format. I could correct
this problem with the dos2unix and unix2dos tools, but I think this is a
great portability problem of the parser. Perhaps there's an easy
solution to correct this, but I hadn't yet the time to look into the
parser code.
thanks
Andreas
|