face3d icon indicating copy to clipboard operation
face3d copied to clipboard

ofstream compile issue

Open ieyer opened this issue 7 years ago • 3 comments

// ------------------------------------------------- write // obj write // Ref: https://github.com/patrikhuber/eos/blob/master/include/eos/core/Mesh.hpp void _write_obj_with_colors_texture(string filename, string mtl_name, float* vertices, int* triangles, float* colors, float* uv_coords, int nver, int ntri, int ntexver) { int i;

ofstream obj_file(filename);  

need to be changed to

ofstream obj_file(filename.c_str());

ieyer avatar Nov 26 '18 11:11 ieyer

Umm.. it depends on the C++ version you are using as mentioned here: https://stackoverflow.com/questions/35045781/no-matching-function-for-call-to-stdbasic-ofstreamchar-stdchar-traitscha

gsssrao avatar Jan 19 '19 02:01 gsssrao

How do I change the C++ version?

TychoKoster avatar Feb 26 '19 12:02 TychoKoster

How do I change the C++ version? change setup.py(add 'extra_compile_args=['-std=c++11']')

setup( name = 'mesh_core_cython', cmdclass={'build_ext': build_ext}, ext_modules=[Extension("mesh_core_cython", sources=["mesh_core_cython.pyx", "mesh_core.cpp"], language='c++', include_dirs=[numpy.get_include()], extra_compile_args=['-std=c++11']) ], )

wjnxjtu avatar Mar 06 '19 03:03 wjnxjtu