We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2095 - SDL native window test fails to compile
Summary: SDL native window test fails to compile
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: 2.0.0
Hardware: x86_64 Linux
: P2 minor
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-10 15:31 UTC by willis.wendler
Modified: 2013-09-11 00:45 UTC (History)
1 user (show)

See Also:


Attachments
The full output of trying to configure and make the tests. (6.24 KB, text/plain)
2013-09-10 15:31 UTC, willis.wendler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description willis.wendler 2013-09-10 15:31:24 UTC
Created attachment 1326 [details]
The full output of trying to configure and make the tests.

The native window test fails to compile. The full output of running "./configure; make" in the test directory is attached, and the bit that seemed relevant is pasted below. Compiling with the -lX11 option added fixes this issue, and the resulting executable appears to work. All other tests compiled and ran without issue. I'm running linux mint "olivia".

gcc -o testnative testnative.c testnativex11.c -g -O2 -D_REENTRANT -I/usr/local/include/SDL2   -DHAVE_OPENGL -lSDL2_test -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lSDL2 -lpthread   
/tmp/cc1qoj2R.o: In function `DestroyWindowX11':
/home/wwendler/b/SDL2-2.0.0/test/testnativex11.c:48: undefined reference to `XDestroyWindow'
/tmp/cc1qoj2R.o: In function `CreateWindowX11':
/home/wwendler/b/SDL2-2.0.0/test/testnativex11.c:33: undefined reference to `XOpenDisplay'
/home/wwendler/b/SDL2-2.0.0/test/testnativex11.c:35: undefined reference to `XCreateSimpleWindow'
/home/wwendler/b/SDL2-2.0.0/test/testnativex11.c:38: undefined reference to `XMapRaised'
/home/wwendler/b/SDL2-2.0.0/test/testnativex11.c:39: undefined reference to `XSync'
/tmp/cc1qoj2R.o: In function `DestroyWindowX11':
/home/wwendler/b/SDL2-2.0.0/test/testnativex11.c:49: undefined reference to `XCloseDisplay'
collect2: error: ld returned 1 exit status
make: *** [testnative] Error 1
Comment 1 Gabriel Jacobo 2013-09-10 21:16:54 UTC
This should be fix on Mercurial, can you confirm?
Comment 2 willis.wendler 2013-09-10 23:01:28 UTC
(In reply to Gabriel Jacobo from comment #1)
> This should be fix on Mercurial, can you confirm?

The mercurial version adds the -lX11 option, and does indeed compile correctly.

I should have thought to search for closed bugs too, as bug 1973 seems to be the same thing!
Comment 3 Gabriel Jacobo 2013-09-11 00:45:42 UTC
Marking as fixed then! Thanks for the report.