LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-16-2018, 01:17 PM   #1
bkelly
Member
 
Registered: Jan 2008
Distribution: Centos 7-4
Posts: 205

Rep: Reputation: 13
Novice, OpenGL, G++ cannot find -lglu


I am using QT Designer from Trolltech version 3.3.8b, the goal is to create a window/panel with an OpenGL display within the QT display. The QT part seems to be fine, it’s the GL part that is a problem.

A tutorial specified to add the two options for lib:
Quote:
-lglut –lglu
G++ says that it cannot find –lglu. It does appear to find –lglut
In path /usr/include/GL there are about 17 files to include glu.h, gl.h, glut.h, and more.

From directory /usr/lib64 issue the command:
Code:
ls –al libGLU.so
to get
Quote:
lrwxrwxrwx 1 root root 15 Oct 25 10:23 libGLU.so -> libGLU.so.1.3.1
That indicates that it exists.
When the -lglu is removed the error is gone but then I must comment out almost everything GL related and the final result from g++ includes this text:
Quote:
DSO missing from command line.
I tried looking at $LIB, $LIBRARY, $LD_LIBRARY_PATH, $LIBPATH, and $SHLIB_PATH but none exist.
I tried the trolltech web site but it is forbidden by the government firewalls and I get a nastygram about how my usage is logged and monitored.
I did try searching this forum for –lglu but found nothing that I could detect as relevant. Where might I look for a solution?
 
Old 11-16-2018, 02:10 PM   #2
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
Quote:
Originally Posted by bkelly View Post
I am using QT Designer from Trolltech version 3.3.8b, the goal is to create a window/panel with an OpenGL display within the QT display. The QT part seems to be fine, it’s the GL part that is a problem.

A tutorial specified to add the two options for lib:

G++ says that it cannot find –lglu. It does appear to find –lglut
In path /usr/include/GL there are about 17 files to include glu.h, gl.h, glut.h, and more.

From directory /usr/lib64 issue the command:
Code:
ls –al libGLU.so
You're asking for libglu.* (LOWER case), while the library has its name with UPPER case.
Change the option to -lGLU and it should work.

Background: the -l option asks for a library (mostly in /usr/lib[64]) to be used with the name lib<the string after -l>.a or .so (static or shared library.
So as the library is called libGLU.so the option should be -lGLU
 
Old 11-16-2018, 02:51 PM   #3
bkelly
Member
 
Registered: Jan 2008
Distribution: Centos 7-4
Posts: 205

Original Poster
Rep: Reputation: 13
Did that, and in the meantime had tried some other things. Simplifying:
Since -lglu needed to be -LGLU then I wonder why -lglut seemed to work. I say seemed to work because I am not there yet.
Also changed -lglut to LGLUT such that both are in all caps, and it compiles. However, I had commented out all the GL stuff. When glClear(...) is enabled g++ declares:
Quote:
undefined reference to 'glClear'
All the GL calls are commented out except that one. Any reference to GL calls results in an undefined complaint. There appears to be something obvious I have wrong. It did work with just QT stuff and displayed the dialog that has been configured.

After working this all day I have learnt that, in the Libs section of QT Designer is needed:

-lglut -lGL

The first in lower case, the second in uppcase.

Last edited by bkelly; 11-16-2018 at 04:51 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Linux novice! bash script: find skips *.odt bkelly Programming 6 09-26-2018 05:26 PM
/usr/bin/ld: cannot find -lGLU jayantak Ubuntu 3 08-14-2014 01:37 AM
"Could not find kernel image: linux" Please hlep me, I am a novice taenacup Linux - Laptop and Netbook 6 07-08-2009 08:41 AM
gcc -lGLU Flag Gives An Error Chryzmo Slackware 2 09-30-2004 09:22 PM
compiling problem (cannot find -lGLU) zeadriche Programming 3 06-29-2004 10:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration