This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to fix H264HPVENC compile error (Command-line error #590: instantiation mode option can be used only when compiling C++)when using C++ compiler

I want to add some cpp file to H264HPVENC, but compile failed, promts: 

Command-line error #590: instantiation mode option can be used only when compiling C++

how to fix it , and how to add these cpp file?

Thanks

  • e-way said:
    I want to add some cpp file to H264HPVENC, but compile failed

    I am not familiar with this H264HPVENC source code.  But you should strongly consider the possibility it does not support being built with a C++ compiler.

    e-way said:
    Command-line error #590: instantiation mode option can be used only when compiling C++

    I need to see the error message in context to be sure.  I suspect you are using a build option which should only be used with C++ code, but you are using it with C code.

    Thanks and regards,

    -George

  • You get this error when you use the option --static_template_instantiation when compiling C. You cannot use this option at all when you are compiling a C file. You will need to have a distinct set of options for C files and for C++ files.