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

  • Home
  • SEARCH
  • 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 6976503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:30:20+00:00 2026-05-27T17:30:20+00:00

SO. I’m a little new to the Linux dev world (without an ide), so

  • 0

SO.

I’m a little new to the Linux dev world (without an ide), so please be patient.

The Issue

I have a make file constructed which compiles about 7-8 files into .o files which are then linked together with a few libraries. I have done locates on these libraries, and their dev counterparts do exist. The problem is that the linker refuses to find them. My output (if I am reading this correctly) tells me that it’s looking in the wrong area. I’ve exported my LD_PATH to include /usr/lib, which is where my .so. files are. My main question is, how do I get -lglew and -lglut to link up with each other? I would also like to put my .o files in my obj folder and my binaries in a bin folder. Is this possible in a makefile? If so, given my make file, what would be the best recipe to do this?

The Makefile

  1 BIN = bin/
  2 OBJ = obj/
  3 TARGET = opengl_03
  4 DEPS = main.o  displayinit.o initializer.o algorithms.o matrix3f.o window.o vertex3.o
  5 CC = g++
  6 CFLAGS = -g -m32
  7 LIBS = -lglut -lGLEW
  8 INCLUDEPATH = -L/usr/include/ -L/usr/lib
  9 
 10 $(TARGET) : $(DEPS)
 11     $(CC) $(LIBS) $(INCLUDEPATH) $(CFLAGS) -o $(TARGET)  $(DEPS) $(BIN)
 12 
 13 displayinit.o : displayinit.cpp displayinit.h
 14     $(CC) -c displayinit.cpp $(OBJ)
 15 initializer.o : initializer.cpp initializer.h
 16     $(CC) -c initializer.cpp $(OBJ)
 17 algorithms.o : algorithms.cpp algorithms.h
 18     $(CC) -c algorithms.cpp $(OBJ)
 19 matrix3f.o : matrix3f.cpp matrix3f.h
 20     $(CC) -c matrix3f.cpp $(OBJ)
 21 vertex3.o : vertex3.cpp vertex3.h
 22     $(CC) -c vertex3.cpp $(OBJ)
 23 window.o : window.cpp window.h
 24     $(CC) -c window.cpp $(OBJ)
 25 main.o : main.cpp
 26     $(CC) -c main.cpp $(OBJ)
 27 
 28 clean:
 29     rm $(DEPS) 
 30 
 31 

Output

g++ -lglut -lGLEW  -L/usr/include/ -L/usr/lib -g -m32  -o opengl_03  main.o  displayinit.o initializer.o algorithms.o matrix3f.o window.o vertex3.o bin/
/usr/bin/ld: skipping incompatible /usr/lib/libglut.so when searching for -lglut
/usr/bin/ld: skipping incompatible /usr/lib/libglut.a when searching for -lglut
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../libglut.so when searching for -lglut
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../libglut.a when searching for -lglut
/usr/bin/ld: skipping incompatible /usr/lib/libglut.so when searching for -lglut
/usr/bin/ld: skipping incompatible /usr/lib/libglut.a when searching for -lglut
/usr/bin/ld: cannot find -lglut
/usr/bin/ld: cannot find -lGLEW
/usr/bin/ld: cannot find bin/: File format not recognized
collect2: ld returned 1 exit status
make: *** [opengl_03] Error 1

I appreciate the assistance.

  • 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-27T17:30:21+00:00Added an answer on May 27, 2026 at 5:30 pm

    Which Linux are you using? It looks like you’re using a 64-bit system, but trying to compile a 32-bit application (because of -m32 compiler switch). So either remove the -m32 or install the 32-bit development libraries. They may be named like freeglut-32bit or something like that.

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

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I have a reasonable size flat file database of text documents mostly saved in
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

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.