Answered step by step
Verified Expert Solution
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++
This is what my makefile looks like-
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started