Command line unknown options '-std=c++11', '-fPIC'

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Nick74044

Hi,

I’m trying to compile Godot using Visual Studio 2017 compiler, cl. I am copying the tutorial and keep getting the error 1>cl : Command line warning D9002: ignoring unknown option for ‘-std=c++11’ and ‘-fPIC’. Does anyone know what the issue may be?

I can compile Godot without using ‘-std=c++11’ or ‘-fPIC’, and it works fine, but I can’t setup my module as a shared library.

:bust_in_silhouette: Reply From: anomalocaris

Those are command line arguments for the GNU compiler (gcc). You’ll have to change them to whatever arguments cl takes to use C++11 and output position-independent code (generate a DLL?). I don’t know how to do this off the top of my head because I haven’t used Visual Studio in a long time.