yfeng95 / face3d

Python tools for 3D face: 3DMM, Mesh processing(transform, camera, light, render), 3D face representations.
2.65k stars 611 forks source link

ofstream compile issue #17

Open ieyer opened 5 years ago

ieyer commented 5 years ago

// ------------------------------------------------- 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());

gsssrao commented 5 years ago

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

TychoKoster commented 5 years ago

How do I change the C++ version?

wjnxjtu commented 5 years ago

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']) ], )