Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i am trying to make a makefile, but i am getting an error(shown in picture). I only have a main.cpp and no other header files

i am trying to make a makefile, but i am getting an error(shown in picture). I only have a main.cpp and no other header files or cpp files. The main.cpp also reads a txt file. C++
image text in transcribed
This is what my makefile looks like-
image text in transcribed
I only have a main.cpp and a txt file. I am trying to compile using makefile but i keep getting an error( as shown in the picture). so i want to know what i need to change in my makefile and what that error means.
. 9-Projecti'. remote: Enumerating objects: 48, done. remote: Counting objects: 100% (48/48), done. remote: Compressing objects: 100% (33/33), done. remote: Total 48 (delta 16), reused 41 (delta 12), pack-reused o Unpacking objects: 100% (48/48), done. tanta@tanta-VirtualBox:-$ cd CS219-Project1 tanta@tanta-VirtualBox:-/CS219-Projecti$ make makefile:14: *** missing separator. Stop. tanta@tanta-virtualBox:-/CS219-Project1$ make g++ -C-o main.o main.cpp make: *** No rule to make target 'proji.o', needed by 'proji'. Stop. tanta@tania-VirtualBox:-/CS219-Project is make make: *** No rule to make target 'project1.o', needed by 'projecti'. Stop. tanta@tanta-VirtualBox :-/C5219-Project1$ X makefile main.cpp Project-1.txt 1 # Output exe, can change if you want the output to change. 2 OUTPUT = projects 3 4 # Build from a file named main.cpp and generates objects from the main.cpp in main.o 5 S(OUTPUT) : main.o $(OUTPUT). 6 g++ -o main.o -std=C++11 7 8 1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

101 Database Exercises Text Workbook

Authors: McGraw-Hill

2nd Edition

0028007484, 978-0028007489

More Books

Students also viewed these Databases questions