DarioSamo / sm64rt

Fork of https://github.com/sm64pc/sm64ex with raytracing support.
274 stars 13 forks source link

Windows fails to compile #50

Closed ryzendew closed 2 years ago

ryzendew commented 2 years ago
make: Entering directory '/home/mattc/sm64rt/tools'
make[1]: Entering directory '/home/mattc/sm64rt/tools/audiofile'
g++ -std=c++11 -DNDEBUG -fno-rtti -fno-exceptions -fvisibility-inlines-hidden -O2 -I. -c audiofile.cpp
audiofile.cpp: In function ‘status _afOpenFile(int, File*, const char*, _AFfilehandle**, AFfilesetup)’:
audiofile.cpp:14640:42: error: ‘strdup’ was not declared in this scope; did you mean ‘strcmp’?
14640 |                 filehandle->m_fileName = strdup(filename);
      |                                          ^~~~~~
      |                                          strcmp
make[1]: *** [Makefile:7: audiofile.o] Error 1
make[1]: Leaving directory '/home/mattc/sm64rt/tools/audiofile'
make: *** [Makefile:41: audiofile/libaudiofile.a] Error 2
make: Leaving directory '/home/mattc/sm64rt/tools'
Makefile:245: *** Failed to build tools.  Stop.

followed every step

DarioSamo commented 2 years ago

That error seems unrelated to any of this fork's code changes. I suggest trying to build sm64ex first and see if you run into the same issues as well as detailing what actual steps you followed because there's not much information to go on there.

At a glance I'd say it's probably related to the GCC/C++ version that was chosen, but it's hard to say without any information about what you installed or what commands you ran.

Nama commented 1 year ago

Happens if building with NODRAWINGDISTANCE=1 and BETTERCAMERA=1 together. But not if you build it with only one of those first. Doesn't happen on sm64ex.

This worked for me:

  1. make -j RENDER_API=RT64 EXTERNAL_DATA=1
  2. make clean
  3. make -j RENDER_API=RT64 EXTERNAL_DATA=1 NODRAWINGDISTANCE=1 BETTERCAMERA=1