[osg-users] Function Prototype Conflict for strcasecmp in osgDB/FieldReader

3 views
Skip to first unread message

Fred

unread,
Dec 12, 2008, 9:01:25 AM12/12/08
to osg-...@lists.openscenegraph.org
I'm not sure if this a defect with OSG or Delta3D.
To get past this defect I commented out the offending line as I believe
the extant declaration is correct.


[ 23%] Building CXX object src/dtAnim/CMakeFiles/dtAnim.dir/cal3dloader.o
In file included from /usr/local/include/osgDB/FieldReader:19,
from /usr/local/include/osgDB/FieldReaderIterator:25,
from /usr/local/include/osgDB/Input:24,
from /usr/local/include/osgDB/DotOsgWrapper:20,
from /usr/local/include/osgDB/Registry:23,
from /usr/local/include/osgDB/ReadFile:24,
from
/home/phreed/delta3d/tags/REL-2.2.0/src/dtAnim/cal3dloader.cpp:15:
/usr/include/xercesc/util/Compilers/GCCDefs.hpp:133: error: previous
declaration of 'int strcasecmp(const char*, const char*)' with 'C++'
linkage
/usr/include/string.h:332: error: conflicts with new declaration with
'C' linkage
make[2]: *** [src/dtAnim/CMakeFiles/dtAnim.dir/cal3dloader.o] Error 1
make[1]: *** [src/dtAnim/CMakeFiles/dtAnim.dir/all] Error 2
make: *** [all] Error 2
_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Robert Osfield

unread,
Dec 12, 2008, 11:46:57 AM12/12/08
to OpenSceneGraph Users
Hi Fred,

I've just looked at include/osgDB/FieldReader in svn/trunk and it
doesn't use strcasecmp, it does include string.h so perhaps this is
which is introducing the conflict. The OSG code is perfectly legal
so I can only guess that something else is happening in
Cal3D/osgCal/Delta3D code to introduce the conflict.

In the case of include/sgDB/FieldReader it doesn't actually need to
include string.h so I've removed it. But chances are that you'll
just come across another file that just happens to include string.h
which then causes problems like the one you are seeing. Bascially the
problem isn't on the OSG side, all I can do is clean up the OSG for
redundant includes, you'll need to fix the real problem at your end.

Robert.

Fred

unread,
Dec 15, 2008, 8:58:17 AM12/15/08
to osg-...@lists.openscenegraph.org, Erik Johnson
> I've just looked at include/osgDB/FieldReader in svn/trunk and it
> doesn't use strcasecmp, it does include string.h so perhaps this is
> which is introducing the conflict. The OSG code is perfectly legal
> so I can only guess that something else is happening in
> Cal3D/osgCal/Delta3D code to introduce the conflict.

> In the case of include/sgDB/FieldReader it doesn't actually need to
> include string.h so I've removed it. But chances are that you'll
> just come across another file that just happens to include string.h
> which then causes problems like the one you are seeing.

I though so too but for some reason this appeared to be the only such case.

> Bascially the problem isn't on the OSG side, all I can do is clean up the OSG for
> redundant includes, you'll need to fix the real problem at your end.

Thanks Robert.
I've copied this to someone more familiar with Delta3D.

Robert Osfield

unread,
Dec 15, 2008, 9:11:07 AM12/15/08
to OpenSceneGraph Users, Erik Johnson
Hi Fred,

On Mon, Dec 15, 2008 at 1:58 PM, Fred <phr...@gmail.com> wrote:
>> Bascially the problem isn't on the OSG side, all I can do is clean up the OSG for
>> redundant includes, you'll need to fix the real problem at your end.
>
> Thanks Robert.
> I've copied this to someone more familiar with Delta3D.

FYI, where possible I've removed places where stdlib.h and string.h
were included from OSG headers, I could do this for some headers as
the headers themselves were using functions from these headers. This
clean up in svn trunk and the 2.7.7 dev release, and will of course be
part of up coming stable 2.8 release.

Robert.

Reply all
Reply to author
Forward
0 new messages