Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5945813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:44:03+00:00 2026-05-22T16:44:03+00:00

This is my program: #include </usr/local/include/GL/glut.h> int main(int argc, char **argv) { glutInit(&argc, argv);

  • 0

This is my program:

#include </usr/local/include/GL/glut.h>

int main(int argc, char **argv) 
{
    glutInit(&argc, argv);
    glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA);
    glutInitWindowPosition(100,100);
    glutInitWindowSize(320,320);
    glutCreateWindow("Lighthouse3D- GLUT Tutorial");
}

Compiled with:

g++ -lglut -L/usr/local/lib/ -o start
start.cpp;./start

Error shown:

./start: error while loading shared
libraries: libglut.so.3: cannot open
shared object file: No such file or
directory

The file is present.

bashprompt> locate libglut.so.3
/usr/local/lib/libglut.so.3
/usr/local/lib/libglut.so.3.9.0

Had also tried:

LD_RUN_PATH=”/usr/local/lib/”
g++ -lglut -LLIBDIR -o start start.cpp;./start
with no luck.

These were the messages shown while installing (if this helps):

root@Nav:/home/Nav/freeglut-2.6.0#
make install Making install in src
make[1]: Entering directory
/home/Nav/freeglut-2.6.0/src'
make[2]: Entering directory
/home/Nav/freeglut-2.6.0/src’ test
-z “/usr/local/lib” || /bin/mkdir -p “/usr/local/lib” /bin/sh ../libtool
–mode=install /usr/bin/install -c ‘libglut.la’
‘/usr/local/lib/libglut.la’
/usr/bin/install -c
.libs/libglut.so.3.9.0
/usr/local/lib/libglut.so.3.9.0 (cd
/usr/local/lib && { ln -s -f
libglut.so.3.9.0 libglut.so.3 || { rm
-f libglut.so.3 && ln -s libglut.so.3.9.0 libglut.so.3; }; })
(cd /usr/local/lib && { ln -s -f
libglut.so.3.9.0 libglut.so || { rm -f
libglut.so && ln -s libglut.so.3.9.0
libglut.so; }; }) /usr/bin/install
-c .libs/libglut.lai /usr/local/lib/libglut.la
/usr/bin/install -c .libs/libglut.a
/usr/local/lib/libglut.a chmod 644
/usr/local/lib/libglut.a ranlib
/usr/local/lib/libglut.a
PATH=”$PATH:/sbin” ldconfig -n
/usr/local/lib
———————————————————————- Libraries have been installed in:
/usr/local/lib If you ever happen
to want to link against installed
libraries in a given directory,
LIBDIR, you must either use libtool,
and specify the full pathname of the
library, or use the -LLIBDIR' flag
during linking and do at least one of
the following:
- add LIBDIR to the
LD_LIBRARY_PATH’ environment variable
during execution
– add LIBDIR to the LD_RUN_PATH' environment variable
during linking
- use the
-Wl,–rpath -Wl,LIBDIR’ linker flag
– have your system administrator add LIBDIR to `/etc/ld.so.conf’
See any operating system documentation
about shared libraries for more
information, such as the ld(1) and
ld.so(8) manual pages.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T16:44:04+00:00Added an answer on May 22, 2026 at 4:44 pm

    Your LD_RUN_PATH attempt was very close, but it should be LD_LIBRARY_PATH:

    export LD_LIBRARY_PATH=/usr/local/lib
    ./start
    

    This tip from the installer is also handy:

    have your system administrator add LIBDIR to `/etc/ld.so.conf’

    If you did that, you wouldn’t need to do the LD_LIBRARY_PATH thing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my program: #include <gtkmm.h> int main (int argc, char* argv[]) { Gtk::Main
I just translated this program, #include <stdio.h> int dam[1000][1000]; int main (int argc, const
I created this program: #include <iostream> #include <fstream> using namespace std; int main ()
I make this program :: #include<stdio.h> char *raw_input(char *msg); main() { char *s; *s
I have this program in c++: #include <iostream> using namespace std; int main() {
Using glew, I'm trying to link the simple program #include </usr/include/GL/glew.h> int main (int
I want to use my program like this: ./program -I /usr/include/ /usr/bin/ /usr/local/include/ ...
Consider this program: #include <map> #include <vector> typedef std::vector<int> IntVector; typedef std::map<IntVector,double> Map; void
I am studying pointers and I encountered this program: #include <stdio.h> void swap(int *,int
There is such code: #include <cstdlib> #include <clang-c/Index.h> using namespace std; int main(int argc,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.