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 9214995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:06:07+00:00 2026-06-18T02:06:07+00:00

gcc 4.7.2 c89 GNU Make 3.82 I am trying compile this program I have

  • 0
gcc 4.7.2
c89
GNU Make 3.82

I am trying compile this program I have using this Makefile. I have only 1 src file at the moment, but I will have more later to include.

I am trying to get the Makefile to create the bin directory if it doesn’t exist and put the binary executable in there.

INC_PATH=-I/home/dev_tools/apr/include/apr-1
LIB_PATH=-L/home/dev_tools/apr/lib
LIBS=-lapr-1
RUNTIME_PATH=/home/dev_tools/apr/lib
CC=gcc
CFLAGS=-Wall -Wextra -g -m32 -D_DEBUG -D_THREAD_SAFE -D_REENTRANT -D_LARGEFILE64_SOURCE -O2 $(INC_PATH)
OBJECTS=timeout.o
EXECUTABLE=bin/to

all:    build $(EXECUTABLE)

$(EXECUTABLE):
    $(CC) -m32 -o $@ -Wl,-rpath,$(RUNTIME_PATH), $(LIB_PATH) $(OBJECTS) $(LIBS)

build:
    @mkdir -p bin

clean:
    rm -rf *~ timeout *.o

I am getting this error:

make
gcc -m32 -o bin/to -Wl,-rpath,/home/dev_tools/apr/lib, -L/home/dev_tools/apr/lib timeout.o -lapr-1
gcc: error: timeout.o: No such file or directory
make: *** [bin/to] Error 1

When I remove the $(OBJECTS) I get the following:

gcc -m32 -o bin/to -Wl,-rpath,/home/dev_tools/apr/lib, -L/home/dev_tools/apr/lib -lapr-1
/usr/bin/ld: cannot find : No such file or directory
collect2: error: ld returned 1 exit status
make: *** [bin/to] Error 1

Not sure where I am going wrong with this.

  • 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-06-18T02:06:08+00:00Added an answer on June 18, 2026 at 2:06 am

    You have not specified how to build the target timeout.o.

    You need to add the following code:

    timeout.o: timeout.c
                $(CC) $(CFLAGS) -c -o $@ $<
    

    If you end up with more source file that you need compiled, you can use a pattern matching rule like this:

    %.o: %.c
            $(CC) $(CFLAGS) -c $< -o $@
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

gcc 4.4.2 c89 I have a wave file: 8000 Hz 16 bit I am
gcc 4.4.2 c89 I have a function that has to run (config_relays). It make
gcc 4.72 c89 I am using this book as a reference to do mq_*
gcc 4.4.4 c89 I have always done the following when using structs to hide
gcc (GCC) 4.7.0 c89 Hello, I have trying to save a database of rows
gcc (GCC) 4.7.0 c89 Hello, I have the following structure that I am trying
gcc (GCC) 4.6.0 c89 I have a signal handler declared like this: /* Setup
gcc 4.4.2 c89 I have a file called main.c. I want the result of
gcc 4.4.2 c89 I have this code snippet that I have to repeat in
gcc 4.4.3 c89 linux I am using log4c and have placed the inc and

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.