Cristian Pastro
Cristian Pastro

Reputation: 3

wxWidgets problem - libwx_gtk3u_gl-3.1.a: no such file or directory

I am trying to compile a program that uses wxWidgets. When I run "make", it is returned to me :

Building target using GCC compiler: sources/geometry-manager.cpp
g++ -g -c sources/geometry-manager.cpp -std=c++17 -w -c -rdynamic -W `wx-config --cxxflags --libs --gl-libs` `geos-config --cflags` -lgeos -lglut -lGLU -lGL -lm -lGLEW  -o builded/geometry-manager.o `pkg-config --libs geographiclib`
g++: error: /usr/local/lib/libwx_gtk3u_gl-3.1.a: No such file or directory
make: *** [Makefile:37: builded/geometry-manager.o] Erro 1

I'm using the Ubuntu 20.04 (Linux 5.8.0-55-generic).

wx-config --version-full returns 3.1.5.0

wx-config --selected-config returns gtk3-unicode-static-3.1

libgtk-3-dev is installed

The program is compiled on other computers. I believe I installed some dependency.incorrectly

The file libwx_gtk3u_gl-3.1.a does not exist on my file system. But I couldn't find the download file.

thank you so much

wx-config --cxxflags --libs std,gl returns:

-I/usr/local/lib/wx/include/gtk3-unicode-static-3.1 -I/usr/local/include/wx-3.1 -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -pthread
-L/usr/local/lib -pthread   /usr/local/lib/libwx_gtk3u_gl-3.1.a /usr/local/lib/libwx_gtk3u_xrc-3.1.a /usr/local/lib/libwx_gtk3u_qa-3.1.a /usr/local/lib/libwx_baseu_net-3.1.a /usr/local/lib/libwx_gtk3u_html-3.1.a /usr/local/lib/libwx_gtk3u_core-3.1.a /usr/local/lib/libwx_baseu_xml-3.1.a /usr/local/lib/libwx_baseu-3.1.a -lgthread-2.0 -pthread -lX11 -lSM -lgtk-3 -lgdk-3 -lpangocairo-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lXtst -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lharfbuzz -lfontconfig -lfreetype -lwxtiff-3.1 -lwxjpeg-3.1 -lwxregexu-3.1 -lwxscintilla-3.1 -lexpat -lpng -lz -ldl -lm

libwxgtk3.0-gtk3-dev is already the newest version (3.0.4+dfsg-15build1).

Success: I reinstalled wxWidgets. Now openGL was identified at installation and it worked.

Upvotes: 0

Views: 1045

Answers (1)

VZ.
VZ.

Reputation: 22688

You must have built wxWidgets yourself, but when configuring it, configure didn't find the required OpenGL headers/libraries, so OpenGL support was disabled, as you can confirm by looking at config.log file it created. You will also find the details of why did this fail in the same file, but you probably just need to apt install libgl1-mesa-dev libglu1-mesa-dev (and rerun configure and make && make install, of course, to actually build and install the OpenGL part of wx).

You may also want to explicitly run configure with --with-opengl option, as in this case you will get an error, rather than the warning you get by default, if OpenGL libraries are not available.

Upvotes: 1

Related Questions