Opened 9 years ago
Closed 8 years ago
#3368 closed defect (fixed)
FATE tests don't build when SDL is installed. (mingw/windows)
|Reported by:||Greg Wolfe||Owned by:|
|Blocking:||Reproduced by developer:||yes|
|Analyzed by developer:||no|
Description (last modified by )
Have the latest git on a Win7/32-bit system with MinGW-32/msys environment. Downloaded, built, and installed SDL. After successfully building ffmpeg, attempted to "make fate" and got the following error:
make fate SAMPLES=fate-suite/ CC libavcodec/fft-test.o <command-line>:0:6: error: no previous prototype for 'SDL_main' [-Werror=missing-prototypes] c:/Data/ffmpeg/libavcodec/fft-test.c:243:5: note: in expansion of macro 'main' int main(int argc, char **argv) ^ cc1.exe: some warnings being treated as errors make: *** [libavcodec/fft-test.o] Error 1
A little research showed this to be the same problem as described in ticket #256. Applied same change and the problem was resolved. However, the same problem exists in a number of source files. Here is the list of files to which I applied the change to get the FATE regression tests to build and run:
Maybe it would be easier to fix this in the Makefile?
Change History (5)
comment:1 by , 9 years ago
|Keywords:||fate sdl added|
comment:2 by , 9 years ago
comment:3 by , 9 years ago
I tried adding -Umain to the specified line in library.mak and got the same error.
I emailed a while back with my current solution, but I guess I should have documented it here. The following "make" command line resolves the problem:
make fate SAMPLES=fate-suite/ CC_C="-c -Umain"
Tbe response to this was something like "ok, but it would be nice to have a solution that worked out of the box instead of having to use a custom make command line." I agree.
comment:4 by , 8 years ago
|Summary:||FATE tests don't build when SDL is installed. → FATE tests don't build when SDL is installed. (mingw/windows)|
Is this issue still occuring ?
comment:5 by , 8 years ago
|Reproduced by developer:||set|
|Status:||new → closed|
library.mak, DTEST is added to build the tests
$(TESTOBJS) $(TESTOBJS:.o=.i): CPPFLAGS += -DTEST
please try to remove the -Dmain or add -Umain or someting there