Full conversion from C++ to C
* Autoconf
* Automake
* pkg-config
fullscreen didn't work properly (presumably that's fixed now)
and the difficulty was too high (because I'm an idiot who always plays on hard mode).
Yes, you're meant to play in Normal mode or possibly even Easy mode.
Lyberta {l Wrote}:There is one big reason not to use autotools - they are developed by GNU project.
Lyberta {l Wrote}:fluffrabbit {l Wrote}:So you don't use GCC?
Can't migrate yet.
What's wrong with -lSDL2?
Full conversion from C++ to C
scameron@wombat ~/github/pr-starfighter/starfighter $ autoconf
configure.ac:11: error: possibly undefined macro: AM_INIT_AUTOMAKE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:68: error: possibly undefined macro: AM_CONDITIONAL
scameron@wombat ~/github/pr-starfighter/starfighter $ ls
autom4te.cache configure.ac data LICENSES mac misc README.txt src win32build.sh
configure COPYING gfx locale Makefile.am music sound starfighter.sh
scameron@wombat ~/github/pr-starfighter/starfighter $ ./configure
./configure: line 2115: syntax error near unexpected token `foreign'
./configure: line 2115: `AM_INIT_AUTOMAKE(foreign -Wall -Werror)'
scameron@wombat ~/github/pr-starfighter/starfighter $
/usr/bin/ld: starfighter-game.o: undefined reference to symbol 'sincosf@@GLIBC_2.2.5'
/lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:423: recipe for target 'starfighter' failed
make[2]: *** [starfighter] Error 1
make[2]: Leaving directory '/home/scameron/starfighter-2.0-src/src'
Makefile:445: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/scameron/starfighter-2.0-src'
Makefile:341: recipe for target 'all' failed
make: *** [all] Error 2
scameron@wombat ~/starfighter-2.0-src $ find . -type f -print | xargs grep sincosf
Binary file ./src/starfighter-intermission.o matches
Binary file ./src/starfighter-game.o matches
scameron@wombat ~/starfighter-2.0-src $ uname -a
Linux wombat 4.4.180 #1 SMP PREEMPT Mon May 27 10:18:52 EDT 2019 x86_64 x86_64 x86_64 GNU/Linux
scameron@wombat ~/starfighter-2.0-src $ cat /etc/os-release
NAME="Linux Mint"
VERSION="18.1 (Serena)"
ID=linuxmint
ID_LIKE=ubuntu
PRETTY_NAME="Linux Mint 18.1"
VERSION_ID="18.1"
HOME_URL="http://www.linuxmint.com/"
SUPPORT_URL="http://forums.linuxmint.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/linuxmint/"
VERSION_CODENAME=serena
UBUNTU_CODENAME=xenial
You're never supposed to call "autoconf". If you need to generate the configure script, the command for that is "autoreconf". I use the -vif options with that.
scameron@wombat ~/github/pr-starfighter/starfighter $ autoreconf
configure.ac:17: error: required file './compile' not found
configure.ac:17: 'automake --add-missing' can install 'compile'
configure.ac:11: error: required file './install-sh' not found
configure.ac:11: 'automake --add-missing' can install 'install-sh'
configure.ac:11: error: required file './missing' not found
configure.ac:11: 'automake --add-missing' can install 'missing'
src/Makefile.am: error: required file './depcomp' not found
src/Makefile.am: 'automake --add-missing' can install 'depcomp'
autoreconf: automake failed with exit status: 1
scameron@wombat ~ $ cat test_sincosf.c
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <math.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
float angle = M_PI;
float s, c;
sincosf(angle, &s, &c);
printf("%f, %f\n", s, c);
return 0;
}
scameron@wombat ~ $ gcc -o test_sincosf test_sincosf.c -lm
scameron@wombat ~ $ ./test_sincosf
-0.000000, -1.000000
scameron@wombat ~ $
scameron@wombat ~ $ gcc -o test_sincosf test_sincosf.c
/tmp/cc9jDPAz.o: In function `main':
test_sincosf.c:(.text+0x45): undefined reference to `sincosf'
collect2: error: ld returned 1 exit status
scameron@wombat ~/github/pr-starfighter/starfighter $ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for SDL... yes
Note: SDL_ttf not found; Unicode will not be supported.
Note: SDL_mixer not found; audio will not be supported.
checking for PANGO... yes
Using built-in screen width default
Using built-in screen height default
Preparing a run-in-place build
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking for sys/stat.h... (cached) yes
checking for unistd.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for atexit... yes
checking for mkdir... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating misc/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
Note: SDL_ttf not found; Unicode will not be supported.
Note: SDL_mixer not found; audio will not be supported.
sudo apt-get install libsdl2-ttf-dev
sudo apt-get install libsdl2-mixer-dev
usr/bin/ld: starfighter-audio.o: undefined reference to symbol 'atanf@@GLIBC_2.2.5'
/lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:423: recipe for target 'starfighter' failed
make[2]: *** [starfighter] Error 1
make[2]: Leaving directory '/home/scameron/github/pr-starfighter/starfighter/src'
Makefile:468: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/scameron/github/pr-starfighter/starfighter'
Makefile:343: recipe for target 'all' failed
make: *** [all] Error 2
scameron@wombat ~/github/pr-starfighter/starfighter $ make clean
Making clean in src
make[1]: Entering directory '/home/scameron/github/pr-starfighter/starfighter/src'
test -z "starfighter" || rm -f starfighter
rm -f *.o
make[1]: Leaving directory '/home/scameron/github/pr-starfighter/starfighter/src'
Making clean in misc
make[1]: Entering directory '/home/scameron/github/pr-starfighter/starfighter/misc'
make[1]: Nothing to be done for 'clean'.
make[1]: Leaving directory '/home/scameron/github/pr-starfighter/starfighter/misc'
make[1]: Entering directory '/home/scameron/github/pr-starfighter/starfighter'
make[1]: Nothing to be done for 'clean-am'.
make[1]: Leaving directory '/home/scameron/github/pr-starfighter/starfighter'
scameron@wombat ~/github/pr-starfighter/starfighter $ make
make all-recursive
make[1]: Entering directory '/home/scameron/github/pr-starfighter/starfighter'
Making all in src
make[2]: Entering directory '/home/scameron/github/pr-starfighter/starfighter/src'
gcc -DHAVE_CONFIG_H -I. -I.. -DVERSION=\"2.0\" -Wall -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lm -g -O2 -MT starfighter-Starfighter.o -MD -MP -MF .deps/starfighter-Starfighter.Tpo -c -o starfighter-Starfighter.o `test -f 'Starfighter.c' || echo './'`Starfighter.c
mv -f .deps/starfighter-Starfighter.Tpo .deps/starfighter-Starfighter.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DVERSION=\"2.0\" -Wall -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lm -g -O2 -MT starfighter-alien.o -MD -MP -MF .deps/starfighter-alien.Tpo -c -o starfighter-alien.o `test -f 'alien.c' || echo './'`alien.c
mv -f .deps/starfighter-alien.Tpo .deps/starfighter-alien.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DVERSION=\"2.0\" -Wall -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lm -g -O2 -MT starfighter-audio.o -MD -MP -MF .deps/starfighter-audio.Tpo -c -o starfighter-audio.o `test -f 'audio.c' || echo './'`audio.c
mv -f .deps/starfighter-audio.Tpo .deps/starfighter-audio.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DVERSION=\"2.0\" -Wall -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lm -g -O2 -MT starfighter-bullet.o -MD -MP -MF .deps/starfighter-bullet.Tpo -c -o starfighter-bullet.o `test -f 'bullet.c' || echo './'`bullet.c
mv -f .deps/starfighter-bullet.Tpo .deps/starfighter-bullet.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DVERSION=\"2.0\" -Wall -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lm -g -O2 -MT starfighter-cargo.o -MD -MP -MF .deps/starfighter-cargo.Tpo -c -o starfighter-cargo.o `test -f 'cargo.c' || echo './'`cargo.c
mv -f .deps/starfighter-cargo.Tpo .deps/starfighter-cargo.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DVERSION=\"2.0\" -Wall -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lm -g -O2 -MT starfighter-collectable.o -MD -MP -MF .deps/starfighter-collectable.Tpo -c -o starfighter-collectable.o `test -f 'collectable.c' || echo './'`collectable.c
mv -f .deps/starfighter-collectable.Tpo .deps/starfighter-collectable.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DVERSION=\"2.0\" -Wall -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lm -g -O2 -MT starfighter-colors.o -MD -MP -MF .deps/starfighter-colors.Tpo -c -o starfighter-colors.o `test -f 'colors.c' || echo './'`colors.c
mv -f .deps/starfighter-colors.Tpo .deps/starfighter-colors.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DVERSION=\"2.0\" -Wall -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lm -g -O2 -MT starfighter-cutscene.o -MD -MP -MF .deps/starfighter-cutscene.Tpo -c -o starfighter-cutscene.o `test -f 'cutscene.c' || echo './'`cutscene.c
mv -f .deps/starfighter-cutscene.Tpo .deps/starfighter-cutscene.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DVERSION=\"2.0\" -Wall -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lm -g -O2 -MT starfighter-defs.o -MD -MP -MF .deps/starfighter-defs.Tpo -c -o starfighter-defs.o `test -f 'defs.c' || echo './'`defs.c
mv -f .deps/starfighter-defs.Tpo .deps/starfighter-defs.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DVERSION=\"2.0\" -Wall -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lm -g -O2 -MT starfighter-engine.o -MD -MP -MF .deps/starfighter-engine.Tpo -c -o starfighter-engine.o `test -f 'engine.c' || echo './'`engine.c
mv -f .deps/starfighter-engine.Tpo .deps/starfighter-engine.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DVERSION=\"2.0\" -Wall -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lm -g -O2 -MT starfighter-event.o -MD -MP -MF .deps/starfighter-event.Tpo -c -o starfighter-event.o `test -f 'event.c' || echo './'`event.c
mv -f .deps/starfighter-event.Tpo .deps/starfighter-event.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DVERSION=\"2.0\" -Wall -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lm -g -O2 -MT starfighter-explosion.o -MD -MP -MF .deps/starfighter-explosion.Tpo -c -o starfighter-explosion.o `test -f 'explosion.c' || echo './'`explosion.c
mv -f .deps/starfighter-explosion.Tpo .deps/starfighter-explosion.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DVERSION=\"2.0\" -Wall -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lm -g -O2 -MT starfighter-game.o -MD -MP -MF .deps/starfighter-game.Tpo -c -o starfighter-game.o `test -f 'game.c' || echo './'`game.c
mv -f .deps/starfighter-game.Tpo .deps/starfighter-game.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DVERSION=\"2.0\" -Wall -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lm -g -O2 -MT starfighter-gfx.o -MD -MP -MF .deps/starfighter-gfx.Tpo -c -o starfighter-gfx.o `test -f 'gfx.c' || echo './'`gfx.c
mv -f .deps/starfighter-gfx.Tpo .deps/starfighter-gfx.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DVERSION=\"2.0\" -Wall -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lm -g -O2 -MT starfighter-info.o -MD -MP -MF .deps/starfighter-info.Tpo -c -o starfighter-info.o `test -f 'info.c' || echo './'`info.c
mv -f .deps/starfighter-info.Tpo .deps/starfighter-info.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DVERSION=\"2.0\" -Wall -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lm -g -O2 -MT starfighter-intermission.o -MD -MP -MF .deps/starfighter-intermission.Tpo -c -o starfighter-intermission.o `test -f 'intermission.c' || echo './'`intermission.c
mv -f .deps/starfighter-intermission.Tpo .deps/starfighter-intermission.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DVERSION=\"2.0\" -Wall -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lm -g -O2 -MT starfighter-mission.o -MD -MP -MF .deps/starfighter-mission.Tpo -c -o starfighter-mission.o `test -f 'mission.c' || echo './'`mission.c
mv -f .deps/starfighter-mission.Tpo .deps/starfighter-mission.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DVERSION=\"2.0\" -Wall -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lm -g -O2 -MT starfighter-player.o -MD -MP -MF .deps/starfighter-player.Tpo -c -o starfighter-player.o `test -f 'player.c' || echo './'`player.c
mv -f .deps/starfighter-player.Tpo .deps/starfighter-player.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DVERSION=\"2.0\" -Wall -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lm -g -O2 -MT starfighter-radio.o -MD -MP -MF .deps/starfighter-radio.Tpo -c -o starfighter-radio.o `test -f 'radio.c' || echo './'`radio.c
mv -f .deps/starfighter-radio.Tpo .deps/starfighter-radio.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DVERSION=\"2.0\" -Wall -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lm -g -O2 -MT starfighter-renderer.o -MD -MP -MF .deps/starfighter-renderer.Tpo -c -o starfighter-renderer.o `test -f 'renderer.c' || echo './'`renderer.c
mv -f .deps/starfighter-renderer.Tpo .deps/starfighter-renderer.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DVERSION=\"2.0\" -Wall -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lm -g -O2 -MT starfighter-save.o -MD -MP -MF .deps/starfighter-save.Tpo -c -o starfighter-save.o `test -f 'save.c' || echo './'`save.c
mv -f .deps/starfighter-save.Tpo .deps/starfighter-save.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DVERSION=\"2.0\" -Wall -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lm -g -O2 -MT starfighter-screen.o -MD -MP -MF .deps/starfighter-screen.Tpo -c -o starfighter-screen.o `test -f 'screen.c' || echo './'`screen.c
mv -f .deps/starfighter-screen.Tpo .deps/starfighter-screen.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DVERSION=\"2.0\" -Wall -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lm -g -O2 -MT starfighter-ship.o -MD -MP -MF .deps/starfighter-ship.Tpo -c -o starfighter-ship.o `test -f 'ship.c' || echo './'`ship.c
mv -f .deps/starfighter-ship.Tpo .deps/starfighter-ship.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DVERSION=\"2.0\" -Wall -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lm -g -O2 -MT starfighter-shop.o -MD -MP -MF .deps/starfighter-shop.Tpo -c -o starfighter-shop.o `test -f 'shop.c' || echo './'`shop.c
mv -f .deps/starfighter-shop.Tpo .deps/starfighter-shop.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DVERSION=\"2.0\" -Wall -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lm -g -O2 -MT starfighter-title.o -MD -MP -MF .deps/starfighter-title.Tpo -c -o starfighter-title.o `test -f 'title.c' || echo './'`title.c
mv -f .deps/starfighter-title.Tpo .deps/starfighter-title.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DVERSION=\"2.0\" -Wall -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lm -g -O2 -MT starfighter-weapons.o -MD -MP -MF .deps/starfighter-weapons.Tpo -c -o starfighter-weapons.o `test -f 'weapons.c' || echo './'`weapons.c
mv -f .deps/starfighter-weapons.Tpo .deps/starfighter-weapons.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DVERSION=\"2.0\" -Wall -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lm -g -O2 -MT starfighter-window.o -MD -MP -MF .deps/starfighter-window.Tpo -c -o starfighter-window.o `test -f 'window.c' || echo './'`window.c
mv -f .deps/starfighter-window.Tpo .deps/starfighter-window.Po
gcc -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lm -g -O2 -o starfighter starfighter-Starfighter.o starfighter-alien.o starfighter-audio.o starfighter-bullet.o starfighter-cargo.o starfighter-collectable.o starfighter-colors.o starfighter-cutscene.o starfighter-defs.o starfighter-engine.o starfighter-event.o starfighter-explosion.o starfighter-game.o starfighter-gfx.o starfighter-info.o starfighter-intermission.o starfighter-mission.o starfighter-player.o starfighter-radio.o starfighter-renderer.o starfighter-save.o starfighter-screen.o starfighter-ship.o starfighter-shop.o starfighter-title.o starfighter-weapons.o starfighter-window.o -lSDL2_image -lSDL2_mixer -lSDL2_ttf -lSDL2 -lpango-1.0 -lgobject-2.0 -lglib-2.0
/usr/bin/ld: starfighter-audio.o: undefined reference to symbol 'atanf@@GLIBC_2.2.5'
/lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:423: recipe for target 'starfighter' failed
make[2]: *** [starfighter] Error 1
make[2]: Leaving directory '/home/scameron/github/pr-starfighter/starfighter/src'
Makefile:468: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/scameron/github/pr-starfighter/starfighter'
Makefile:343: recipe for target 'all' failed
make: *** [all] Error 2
diff --git a/configure.ac b/configure.ac
index 03213fd..ffed0cc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,6 +11,7 @@ AC_INIT([Project: Starfighter], [2.0], [onpon4@riseup.net], [starfighter])
AM_INIT_AUTOMAKE([foreign -Wall -Werror])
AC_CONFIG_SRCDIR([src/Starfighter.c])
AC_CONFIG_HEADERS([config.h])
+AC_SEARCH_LIBS([atanf], [m])
PKG_PROG_PKG_CONFIG
# Checks for programs.
Lyberta {l Wrote}:fluffrabbit {l Wrote}:Unless you're doing something really specific, CXX=clang++ should be all you need.
Clang doesn't support concepts at least. Not sure about other features.
Users browsing this forum: No registered users and 1 guest