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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:29:24+00:00 2026-06-15T01:29:24+00:00

I have compiled a makefile project under linux, just yesterday. Now the project won’t

  • 0

I have compiled a makefile project under linux, just yesterday. Now the project won’t compile and I can’t remember making any change whatsoever to the makefile itself. It throws a make: *** No rule to make target 'obj/TranquilMain.o', needed by 'tranquil;. Stop. error at make. The only real change I’ve made, is when I copied the code and makefile over from another project, I changed the name of certain files (and dependencies includes) and then altered the _DEPS in the makefile. All files in necessary locations.

It should be noted that it compiles fine, if I remove all other files than TranquilMain.o from the _OBJ list. enter code hereI wish I could provide more than just code, and this knowledge, but I haven’t a clue what the problem is.

Appropriate Makefile: “makefile”

#!/usr/bin/make

CC      = gcc
CP      = g++

SRC_DIR     = #.
OBJ_DIR     = obj
INC_DIR     = ../include
LIB_DIR     = ../lib

LIBS        = -lm -lSDL -lSDLmain -lSDL_image -lSDL_mixer -lSDL_ttf -lSDL_net -lGL -lGLU -lGLEW
CFLAGS      = -I$(INC_DIR) -L$(LIB_DIR) -std=gnu++0x


_DEPS   = DefaultConfig.h BaseApplication.h BasePlugin.h SDLImage.h SDLFont.h SDLWindow.h SDLInput.h SDLRenderer.h SDLApplication.h Math2D.h SDLTimer.h
DEPS    = $(patsubst %,$(INC_DIR)/%,$(_DEPS))

_OBJ    = TranquilMain.o BaseApplication.o BasePlugin.o SDLImage.o SDLFont.o SDLWindow.o SDLInput.o SDLRenderer.o SDLApplication.o Math2D.o SDLTimer.o
OBJ = $(patsubst %,$(OBJ_DIR)/%,$(_OBJ))


$(OBJ_DIR)/%.o: %.cpp $(DEPS)
    $(CP) -c -o $@ $< $(CFLAGS)

tranquil: $(OBJ)
    $(CP) -o ../bin/$@ $^ $(CFLAGS) $(LIBS)

.PHONY: clean
clean:
    rm -f $(OBJ_DIR)/*.o *~ core $(INC_DIR)/*~

Clearly useless TranquilMain.cpp (just the first file in the dependencies)

#include <iostream>
#include <fstream>
#include <string>


int main( int argc, char* args[] )
{
    bool running = true;

    while( running == true )
    {
    }

    return 0;
}
  • 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-15T01:29:25+00:00Added an answer on June 15, 2026 at 1:29 am

    Also, make sure you haven’t inadvertantly turned tabs into whitespace.

    A rule MUST begin with a “tab”:

    #BAD!
    tranquil: $(OBJ)
    <space><space>$(CP) -o ../bin/$@ $^ $(CFLAGS) $(LIBS)
    
    #GOOD!
    tranquil: $(OBJ)
    <tab>$(CP) -o ../bin/$@ $^ $(CFLAGS) $(LIBS)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an autotools project that compiles just fine on the Mac, but under
We have a quite large (280 binaries) software project under Linux and currently it
Autoconf has gotten me stumped. I have tried modifying the COMPILE in Makefile.in as
I have a source directory which uses makefile to compile the code. This makefile/configure
I have compiled my application on Linux (Intel) machine using this command gcc –g
I have an MSVC Makefile Project in which I need to set an environment
I have an Android JNI project I'd like to compile with ndk-build . The
I have a C project and I'm trying to use my own makefile. In
I have this C++ project which compiles using a Makefile, and sometimes when (
I have a (large) Fortran project under Git. There are different active branches, corresponding

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.