Open camilo-celis opened 7 years ago
Yes, this is a known issue. When you install 'libpng' library on Ubuntu, if you use 'apt-get install' command, this problem does not occur. However, if you install the latest version of 'libpng' library manually, you'll encounter this problem. Thanks for your reporting. We'll fix this issue.
I reopened this issue as this might continue to be a problem for many. Especially as the Ubuntu repo updates the version for the libpng
pulled by apt-get
When trying to compile TORCS (the one recommended on the
user_manual.pdf
), it is very likely to encounter a compilation error with a message like:img.cpp:101:20: error: invalid use of incomplete type ‘png_struct {aka struct png_struct_def}’
It seems that this is because the version used for TORCS assumed an older and deprecated API calls to
libpng
. Specifically thesetjmp()
function.This can be solved by modifying the file:
torcs/src/lib/tgfclient/img.cpp
.