favreau / bullet

Automatically exported from code.google.com/p/bullet
0 stars 0 forks source link

Demo AppOpenCLClothDemo_NVidia does not compile #435

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. try to build the demo
2. build fails

What is the expected output? What do you see instead?

In file included from 
/usr/src/sbo_tmp/bullet-2.77/Demos/OpenCLClothDemo/cl_cloth_demo.cpp:22:
/usr/src/sbo_tmp/bullet-2.77/Demos/OpenCLClothDemo/cloth.h: In member function 
‘void piece_of_cloth::create_texture(std::string)’:
/usr/src/sbo_tmp/bullet-2.77/Demos/OpenCLClothDemo/cloth.h:103: error: 
‘sprintf’ was not declared in this scope
make[2]: *** 
[Demos/OpenCLClothDemo/NVidia/CMakeFiles/AppOpenCLClothDemo_NVidia.dir/__/cl_clo
th_demo.o] Error 1
make[1]: *** 
[Demos/OpenCLClothDemo/NVidia/CMakeFiles/AppOpenCLClothDemo_NVidia.dir/all] 
Error 2
make: *** [all] Error 2

What version of the product are you using? On what operating system?

bullet-2.77 on Slackware64-13.1

Please provide any additional information below.

Using nvidia driver version 256.44 with accompanied libOpenCL.so

Original issue reported on code.google.com by ppr...@liwjatan.at on 2 Oct 2010 at 3:43

GoogleCodeExporter commented 9 years ago
The compilation of the OpenCL cloth demo isn't enabled by default under Linux, 
right?

Did you manually enable it?

We are happy to fix it, if you can test it and provide a patch.
Thanks,
Erwin

Original comment by erwin.coumans on 4 Oct 2010 at 6:25

GoogleCodeExporter commented 9 years ago

Should be fixed in latest trunk.

See http://code.google.com/p/bullet/source/detail?r=2222
Thanks for the report!

Original comment by erwin.coumans on 4 Oct 2010 at 7:09

GoogleCodeExporter commented 9 years ago

Original comment by erwin.coumans on 4 Oct 2010 at 7:09

GoogleCodeExporter commented 9 years ago
I tested r2222 and it is indeed fixed.

I looked at ccmake output and it looks like BUILD_NVIDIA_OPENCL_DEMOS is 
enabled if libOpenCL.so is found (maybe requires the includes as well, didn't 
look at the cmake config).

Anyway, thanks for fixing the issue!

Original comment by ppr...@liwjatan.at on 4 Oct 2010 at 7:41

GoogleCodeExporter commented 9 years ago
To make thinks perfectly clean, you are supposed to write in C++:
#include <cstdio>
instead of
#include <stdio.h>

Original comment by laurent....@gmail.com on 5 Oct 2010 at 2:28