error: ‘fileno’ was not declared in this scope

前端 未结 2 1249
旧时难觅i
旧时难觅i 2020-12-18 11:14

I am running Cygwin on windows 8, attempting to compile the source code for a game I would like to mod. Unfortunately I am running into some errors while building involving

相关标签:
2条回答
  • 2020-12-18 12:05

    For windows...

    fileno() is deprecated: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/posix-fileno?view=vs-2017

    use _fileno() instead: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/fileno?view=vs-2017

    0 讨论(0)
  • 2020-12-18 12:08

    Changing the -std=c*** in your makefile to -std=gnu++0x should fix your problem.

    If you don't know what c++11 is you're most likely not using it anyway.

    Also if you need c++11 support you can also do: -std=gnu++11 instead of -std=gnu++0x

    0 讨论(0)
提交回复
热议问题