Announcement

Collapse
No announcement yet.

Error When Running Make From Makefile

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [Software] Error When Running Make From Makefile

    Hi,

    I get the below error message when I try to make an Linux application from makefile?

    Code:
    ]jlp@megatron-desktop:~/Desktop/source_tc4-tribute2$ make
    g++ -pipe -Wall -g -I/usr/include/SDL2 -D_REENTRANT -c src/main.cpp -o src/main.o
    make: g++: No such file or directory
    make: *** [makefile:46: src/main.o] Error 127

    Any idea about how to fix the above?
    I am running Kubuntu 25.04 fully updated

    SS

    Code:
    TARGET = tc4-tribute2
    
    VERSION = 4.0.0
    
    DEL_FILE = rm -f
    
    CC = g++
    CFLAGS = -pipe -Wall -g #-"ggdb"
    SDL_CFLAGS = $(shell sdl2-config --cflags)
    SDL_LIBS = $(shell sdl2-config --libs)
    
    SDL_TTF_LIBS = -lSDL2_ttf
    SDL_IMAGE_LIBS = -lSDL2_image
    SDL_MIXER_LIBS = -lSDL2_mixer
    
    OBJECTS = src/main.o \
    src/audio.o \
    src/data.o \
    src/input.o \
    src/interface.o \
    src/logic.o \
    src/screens.o \
    src/visuals.o
    
    SOURCES = src/main.cpp \
    src/audio.cpp \
    src/data.cpp \
    src/input.cpp \
    src/interface.cpp \
    src/logic.cpp \
    src/screens.cpp \
    src/visuals.cpp
    
    HEADERS = src/audio.h \
    src/data.h \
    src/input.h \
    src/interface.h \
    src/logic.h \
    src/screens.h \
    src/visuals.h
    
    $(TARGET): $(OBJECTS)
    $(CC) $(OBJECTS) $(SDL_LIBS) $(SDL_TTF_LIBS) $(SDL_IMAGE_LIBS) $(SDL_MIXER_LIBS) -o $@
    
    .cpp.o:
    $(CC) $(CFLAGS) $(SDL_CFLAGS) -c $< -o $@
    
    clean:
    rm $(OBJECTS) $(TARGET)​

    #2
    Originally posted by savantsavior View Post
    I am running Kubuntu 25.04 fully updated
    25.04? You posted in 24.10.
    Windows no longer obstruct my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Can you move this forum thread to the correct location?
      Thanks

      Comment


        #4
        It appears you haven't run
        Code:
        sudo apt install build-essential
        That will get you past the g++ problem... but you may be missing other dependencies. Generally, if one is building software that has been packaged for APT, it is a good idea to run
        Code:
        sudo apt-get build-dep <package-name>
        "tc4" suggests something to do with topcat, the "Tool for OPerations on Catalogues And Tables". If that is so, running
        Code:
        sudo apt-get build-dep topcat
        might be the trick. Otherwise, you have to rely on the project's documentation for the dependencies.
        Regards, John Little

        Comment


          #5
          Actually probably t-crisis, a tetris clone game. But not knowing the source or url for this, the code downloaded hopefully has build instructions that include other dependencies.
          All links to any content 404, or otherwise dead links on Chinese websites.

          Comment

          Users Viewing This Topic

          Collapse

          There are 0 users viewing this topic.

          Working...
          X