|
From: Tim V. <tim...@gm...> - 2007-02-20 17:46:52
|
On 2/20/07, Chris Morley <c.m...@ga...> wrote: > > forcefield.cpp will not compile for me. Declaring arrays with a > non-constant dimension seeems to be at the root of the difficulty. It > may be that g++ can somehow manage to do this but I don't think it's > standard. I realise that forcefield is work in progress, but I mention > this bug because correcting it may involve a significant change to > program structure. (Would std::vector be safer?) > > Chris > > ..\..\src\forcefield.cpp(401) : error C2057: expected constant expression > ..\..\src\forcefield.cpp(401) : error C2466: cannot allocate an array of > constant size 0 > ..\..\src\forcefield.cpp(401) : error C2133: 'rotorKey' : unknown size > ..\..\src\forcefield.cpp(425) : error C2057: expected constant expression > ..\..\src\forcefield.cpp(425) : error C2466: cannot allocate an array of > constant size 0 > ..\..\src\forcefield.cpp(425) : error C2133: 'energies' : unknown size > ..\..\src\forcefield.cpp(1349) : error C3861: 'isnan': identifier not > found > . Line 401 was taken from the documentation api so I expected it to work. But std::vector may indeed be more portable... isnan() is included in the C99 standard as far I know. If this is unavailable #define *isnan*(x) ((x) != (x)) would do the trick. Tim ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > OpenBabel-Devel mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-devel > |