설치해 보았습니다트라피구라. 하지만 파일을 만드는 동안 다음과 같은 문제에 직면했습니다.
make[4]: Entering directory '/home/kenny/Local/torcs/src/libs/math'
make[4]: Nothing to be done for 'compil'.
make[4]: Leaving directory '/home/kenny/Local/torcs/src/libs/math'
make[4]: Entering directory
'/home/kenny/Local/torcs/src/libs/musicplayer'
g++ -I/home/kenny/Local/torcs/export/include -I/home/kenny/Local/torcs
-g -O2 -Wall -fPIC -fno-strict-aliasing -O2 -DUSE_RANDR_EXT -
DGL_GLEXT_PROTOTYPES -Wall -fPIC -fno-strict-aliasing -O2 -
DUSE_RANDR_EXT -DGL_GLEXT_PROTOTYPES -D_SVID_SOURCE -D_BSD_SOURCE -
DSHM -DHAVE_CONFIG_H -c OpenALMusicPlayer.cpp
In file included from /usr/include/bits/libc-header-start.h:33,
from /usr/include/stdio.h:27,
from OpenALMusicPlayer.cpp:20:
/usr/include/features.h:184:3: warning: #warning "_BSD_SOURCE and
_SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
# warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use
_DEFAULT_SOURCE"
^~~~~~~
OpenALMusicPlayer.cpp: In member function ‘virtual bool
OpenALMusicPlayer::streamBuffer(ALuint)’:
OpenALMusicPlayer.cpp:164:22: error: invalid conversion from ‘char’ to
‘const char*’ [-fpermissive]
const char* error = '\0';
^~~~
make[4]: *** [/home/kenny/Local/torcs/Make-default.mk:240:
OpenALMusicPlayer.o] Error 1
make[4]: Leaving directory
'/home/kenny/Local/torcs/src/libs/musicplayer'
make[3]: *** [/home/kenny/Local/torcs/Make-default.mk:679: subdirs]
Error 1
make[3]: Leaving directory '/home/kenny/Local/torcs/src/libs'
make[2]: *** [/home/kenny/Local/torcs/Make-default.mk:679: subdirs]
Error 1
make[2]: Leaving directory '/home/kenny/Local/torcs/src'
make[1]: *** [/home/kenny/Local/torcs/Make-default.mk:679: subdirs]
Error 1
make[1]: Leaving directory '/home/kenny/Local/torcs'
make: *** [Makefile:32: restart] Error 2
누군가 이 문제를 해결하는 방법을 제안할 수 있나요?
답변1
~에서https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=853685, Debian 저장소의 torcs 버전 1.3.7+dfsg-4에는 문제가 있는 줄의 포인터를 nullptr
.
- const char* error = '\0';
+ const char* error = nullptr;
전체 패치 파일은 다음 위치에 있습니다.https://sources.debian.org/patches/torcs/1.3.7+dfsg-4/gcc7.patch/여기에 도입된 수정 사항은 플랫폼 중립적입니다. 또는 -fpermissive
로그 프롬프트에 따라 컴파일할 수도 있습니다.