Skip to content

Linking fails on Fedora Linux #23

Description

@kflak

After editing the Makefile to point to /usr/bin/wx-config I was able to compile the software. However, it fails at the linking stage with this error:

g++ -O2 -Wall -DLINUX `/usr/bin/wx-config --cppflags`   -c -o gui.o gui.cpp
g++ -O2 -Wall -DLINUX `/usr/bin/wx-config --cppflags`   -c -o portlist.o portlist.cpp
g++ -O2 -Wall -DLINUX `/usr/bin/wx-config --cppflags`   -c -o images.o images.cpp
gcc -O2 -Wall -DLINUX   -c -o visualize.o visualize.c
gcc -O2 -Wall -DLINUX   -c -o serialdata.o serialdata.c
gcc -O2 -Wall -DLINUX   -c -o rawdata.o rawdata.c
gcc -O2 -Wall -DLINUX   -c -o magcal.o magcal.c
gcc -O2 -Wall -DLINUX   -c -o matrix.o matrix.c
gcc -O2 -Wall -DLINUX   -c -o fusion.o fusion.c
gcc -O2 -Wall -DLINUX   -c -o quality.o quality.c
gcc -O2 -Wall -DLINUX   -c -o mahony.o mahony.c
gcc -O2 -Wall -DLINUX   -c -o imuread.o imuread.c
gcc -s -O2 -Wall -DLINUX  -o imuread imuread.o visualize.o serialdata.o rawdata.o magcal.o matrix.o fusion.o quality.o mahony.o -lglut -lGLU -lGL -lm
g++ -s -O2 -Wall -DLINUX  -o MotionCal gui.o portlist.o images.o visualize.o serialdata.o rawdata.o magcal.o matrix.o fusion.o quality.o mahony.o `/usr/bin/wx-config --libs all,opengl`
/usr/bin/ld: visualize.o: undefined reference to symbol 'glMaterialfv'
/usr/bin/ld: /usr/lib64/libGL.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [Makefile:69: MotionCal] Error 1

I have wx-config v. 3.2.8, and Fedora 43.

Activity

  1. kflak commented on Feb 5, 2026

    @kflak
    Author

    Tried the same on my Arch laptop, and getting a slightly different error:

    g++ -O2 -Wall -DLINUX `/usr/bin/wx-config --cppflags`   -c -o gui.o gui.cpp
    g++ -O2 -Wall -DLINUX `/usr/bin/wx-config --cppflags`   -c -o portlist.o portlist.cpp
    perl png2c.pl checkgreen.png checkempty.png checkemptygray.png > images.cpp
    gcc -O2 -Wall -DLINUX   -c -o visualize.o visualize.c
    gcc -O2 -Wall -DLINUX   -c -o serialdata.o serialdata.c
    gcc -O2 -Wall -DLINUX   -c -o rawdata.o rawdata.c
    gcc -O2 -Wall -DLINUX   -c -o magcal.o magcal.c
    gcc -O2 -Wall -DLINUX   -c -o matrix.o matrix.c
    gcc -O2 -Wall -DLINUX   -c -o fusion.o fusion.c
    gcc -O2 -Wall -DLINUX   -c -o quality.o quality.c
    gcc -O2 -Wall -DLINUX   -c -o mahony.o mahony.c
    gcc -O2 -Wall -DLINUX   -c -o imuread.o imuread.c
    g++ -O2 -Wall -DLINUX `/usr/bin/wx-config --cppflags`   -c -o images.o images.cpp
    gcc -s -O2 -Wall -DLINUX  -o imuread imuread.o visualize.o serialdata.o rawdata.o magcal.o matrix.o fusion.o quality.o mahony.o -lglut -lGLU -lGL -lm
    g++ -s -O2 -Wall -DLINUX  -o MotionCal gui.o portlist.o images.o visualize.o serialdata.o rawdata.o magcal.o matrix.o fusion.o quality.o mahony.o `/usr/bin/wx-config --libs all,opengl`
    /usr/bin/ld: visualize.o: undefined reference to symbol 'glEnable'
    /usr/bin/ld: /usr/lib/libOpenGL.so.0: error adding symbols: DSO missing from command line
    collect2: error: ld returned 1 exit status
    make: *** [Makefile:69: MotionCal] Error 1```
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions