Closed GoogleCodeExporter closed 9 years ago
I just recompiled latest trunk, without any modifications, using Visual Studio
2005 SP1 and got no error.
Without reproduction it is hard to fix such error.
Are you sure this is an unmodified version of Bullet, using latest trunk?
Original comment by erwin.coumans
on 7 Dec 2012 at 7:07
Can you try if changing
btAlignedObjectArray<Point32> points;
to
btAlignedObjectArray<btConvexHullInternal::Point32> points;
fixes your compile error?
Original comment by erwin.coumans
on 7 Dec 2012 at 9:03
I just downloaded the 2627 using svn checkout and the problem unfortunately
persists. No modifications, just trying to compile (either debug or release -
no matter). Also the change you suggested didn't help.
Please take a look at www.silden.eu/misc/bt.jpg
Now I understand it does compile for you, but since it doesn't for me I'd
really appreciate help with this issue.
Original comment by anwilew...@gmail.com
on 8 Dec 2012 at 7:25
Or can someone just please e-mail me the compiled LinearMath.lib? VS 2005,
release, please? The e-mail is andrzej@silden eu. Thank you!
Might help me quite a bit, and the other libs compile just fine.
Original comment by anwilew...@gmail.com
on 10 Dec 2012 at 10:33
It is best if you can help fixing the problem, by testing some modifications.
It is likely some compiler bug in Visual Studio 2005 we have to work around.
2005 without SP1, 2008, 2010 and 2012, Xcode, gcc, llvm all work fine.
I'll try to make some workaround and get back to you.
Original comment by erwin.coumans
on 14 Dec 2012 at 8:37
All right, if you have any ideas just let me know - I'll be glad to test them
out.
Original comment by anwilew...@gmail.com
on 15 Dec 2012 at 5:30
Can you try to move the Point32 into global namespace?
Original comment by erwin.coumans
on 15 Dec 2012 at 5:57
Yeah, I moved Point64 and Point32 into the global namespace and
btConvexHullComputer.cpp compiles with exactly the same effect.
I had to change pointCmp declaration to
static bool pointCmp(const Point32& p, const Point32& q)
- obviously, but the template argument still cannot be deduced.
Original comment by anwilew...@gmail.com
on 15 Dec 2012 at 6:14
can you move the compare func inside a class? please checkout other places that
use quickSort in the Bullet source code.
(while keeping Point32 in global namespace)
thanks for helping
Original comment by erwin.coumans
on 15 Dec 2012 at 6:49
Right.
When I moved the compare func (I assume you meant the pointCmp) inside a class,
the compiler started to treat it as an explicite function and demanded a
pointer to it, operators... Or I misunderstood you about which function should
be moved.
Still I checked other uses of quickSort in source code and all of them have a
class with () operator defined as a compare function. Hence I replaced function
pointCmp with
class pointCmp
{
public:
bool operator() ( const Point32& p, const Point32& q ) const
{
return (p.y < q.y) || ((p.y == q.y) && ((p.x < q.x) || ((p.x == q.x) && (p.z < q.z))));
}
};
and changed the call to:
points.quickSort(pointCmp());
This compiles cleanly, but I have no idea if it's ok from your point of view as
it's more of a hack. In fact the whole LinearMath compiles cleanly now, with
exception of only one warning:
1>btVector3.obj : warning LNK4221: no public symbols found; archive member will
be inaccessible
I hope it helps, please let me know if it is an acceptable solution.
Original comment by anwilew...@gmail.com
on 15 Dec 2012 at 7:10
great, can you please share a working version of that file, or a patch?
does it still work if you move the Point32 class back in the original location,
and make your new compareClass compile again?
Original comment by erwin.coumans
on 15 Dec 2012 at 1:23
It does, as long as I change the compare class to:
class pointCmp
{
public:
bool operator() ( const btConvexHullInternal::Point32& p, const btConvexHullInternal::Point32& q ) const
{
return (p.y < q.y) || ((p.y == q.y) && ((p.x < q.x) || ((p.x == q.x) && (p.z < q.z))));
}
};
File attached.
Thanks for your help!
Original comment by anwilew...@gmail.com
on 15 Dec 2012 at 1:30
Attachments:
There are a few other places using quickSort without a compareClass.
does the full Bullet sdk compile, including the default demos?
did you try premake generated visual studio projects
(Bullet/build/vs2005.bat) and cmake version?
Thanks,
Erwin
Original comment by erwin.coumans
on 15 Dec 2012 at 1:46
App_VoronoiFractureDemo doesn't compile for exactly the some reasons the
LinearMath didn't. Everything else compiles just fine, except for a few
warnings here and there.
I used premake generated projects, I don't use cmake.
I have attached full rebuild output log and that Voronoi BuildLog.html, hope
this helps.
Original comment by anwilew...@gmail.com
on 15 Dec 2012 at 2:09
Attachments:
The App_VoronoiFractureDemo uses a struct, not a global compare function.
Can you send a fixed version for the App_VoronoiFractureDemo?
Thanks a lot,
Erwin
Original comment by erwin.coumans
on 17 Dec 2012 at 8:33
Unfortunately I don't have it - I didn't debug nor fix the Voronoi Demo. I just
recompiled everything to check things out and Voronoi is the only thing that
doesn't compile, but I didn't look into it in details. I noticed it gives the
same error output, but that's it so far.
Since the libraries compiled I have other issues (outside bullet) to address,
but if you want me to test something specific, just let me know - I'll be glad
to help.
Original comment by anwilew...@gmail.com
on 18 Dec 2012 at 7:54
thanks a lot for the report and help,
both issues are fixed now:
https://code.google.com/p/bullet/source/detail?r=2635
https://code.google.com/p/bullet/source/detail?r=2632
Original comment by erwin.coumans
on 20 Dec 2012 at 10:48
Original issue reported on code.google.com by
anwilew...@gmail.com
on 6 Dec 2012 at 9:26Attachments: