Box2D Forums

It is currently Mon May 20, 2013 6:02 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue Jan 19, 2010 7:37 pm 
Offline

Joined: Tue Jan 19, 2010 7:22 pm
Posts: 1
I download box2d 2.0.1,and "make"
It jump out an error,
Quote:
Dynamics/Contacts/b2PolyContact.cpp:53: error: ‘memcpy’ was not declared in this scope

So i looking into the include chain and add an include
Code:
#include <cstring>

in the common/b2math.h
and make again
the previous error have passed,but then another error jump out
Quote:
Common/b2BlockAllocator.cpp:202: error: ‘memset’ was not declared in this scope

again i add an include
Code:
#include <cstring>

in the Common/b2BlockAllocator.h
then everything is OK and build an static library and the example application(Both with fixed and float)

So,is that a bug?
That someone forgot to include <cstring> :)

===================================
By the way,the project file for the codeblock(workspace,cbp) in the build directory does't work too(under linux).
It seems that is did not include all the necessary files that should be included in this project.
So the build process got many error message like "undeclared XXX" something like that.


Top
 Profile  
 
PostPosted: Tue Feb 16, 2010 10:03 am 
Offline

Joined: Tue Feb 16, 2010 9:59 am
Posts: 1
It's not really a bug, but should be fixed non-the-less. Newer versions of GCC (4.3 and higher) do not automatically add dependencies (like <cstring>) when building. This was done to increase speed of compilation. See here for someone who seems to know more about this.

Result is that for some newer versions of GCC '#include <cstring>' should be added to those files.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Group