Hello,
My name is Keanu Melo (ID: knm95) and I am a student from Section 5.
I am working on Project 2 on a Windows device and encountering an error
whenever I type "make" in the Ubuntu WSL terminal. This error is similar to
the one I had during Project 1, and by that time the professor was the
person who helped me resolve the issue.
The error I am receiving is "[Makefile:51: main] Error 1"; although, at the
bottom of the email I will leave the entire output that comes from the
terminal in case that is more helpful.
I would appreciate any help regarding this issue.
Best,
Keanu Melo
The following text comes directly from the terminal:
knmr0709@KNMRLAPTOP:/mnt/c/Users/knmr0/OneDrive/Documents/Code/PM1
Programs/PM1_Project2/code/code$ make
g++ -Wall -std=c++17 -w -I./stb_image -c src/Image.cpp -o src/Image.o
g++ -Wall -std=c++17 -w -I./stb_image -c src/Matrix.cpp -o src/Matrix.o
g++ -Wall -std=c++17 -w -I./stb_image -c src/main.cpp -o src/main.o
g++ -Wall -std=c++17 -w -I./stb_image src/Image.o src/Matrix.o src/main.o
-o main
/usr/bin/ld: src/main.o: in function `main':
main.cpp:(.text+0x2831a): undefined reference to
`Image::Image(std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&)'
/usr/bin/ld: main.cpp:(.text+0x28329): undefined reference to
`Image::Image()'
/usr/bin/ld: main.cpp:(.text+0x28382): undefined reference to
`Image::Image(std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&)'
/usr/bin/ld: main.cpp:(.text+0x28398): undefined reference to
`Image::operator=(Image const&)'
/usr/bin/ld: main.cpp:(.text+0x283a4): undefined reference to
`Image::~Image()'
/usr/bin/ld: main.cpp:(.text+0x283b3): undefined reference to
`Image::Image()'
/usr/bin/ld: main.cpp:(.text+0x28413): undefined reference to
`Image::operator+(Image const&) const'
/usr/bin/ld: main.cpp:(.text+0x28429): undefined reference to
`Image::operator=(Image const&)'
/usr/bin/ld: main.cpp:(.text+0x28435): undefined reference to
`Image::~Image()'
/usr/bin/ld: main.cpp:(.text+0x2849a): undefined reference to
`Image::operator-(Image const&) const'
/usr/bin/ld: main.cpp:(.text+0x284b0): undefined reference to
`Image::operator=(Image const&)'
/usr/bin/ld: main.cpp:(.text+0x284bc): undefined reference to
`Image::~Image()'
/usr/bin/ld: main.cpp:(.text+0x28521): undefined reference to
`Image::operator*(Image const&) const'
/usr/bin/ld: main.cpp:(.text+0x28537): undefined reference to
`Image::operator=(Image const&)'
/usr/bin/ld: main.cpp:(.text+0x28543): undefined reference to
`Image::~Image()'
/usr/bin/ld: main.cpp:(.text+0x285af): undefined reference to
`Image::getWidth() const'
/usr/bin/ld: main.cpp:(.text+0x285d8): undefined reference to
`Image::getHeight() const'
/usr/bin/ld: main.cpp:(.text+0x2860f): undefined reference to
`Image::resize(int, int)'
/usr/bin/ld: main.cpp:(.text+0x28628): undefined reference to
`Image::operator=(Image const&)'
/usr/bin/ld: main.cpp:(.text+0x286c2): undefined reference to
`Image::save(std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&) const'
/usr/bin/ld: main.cpp:(.text+0x286e2): undefined reference to
`Image::~Image()'
/usr/bin/ld: main.cpp:(.text+0x286f1): undefined reference to
`Image::~Image()'
/usr/bin/ld: main.cpp:(.text+0x28700): undefined reference to
`Image::~Image()'
/usr/bin/ld: main.cpp:(.text+0x287db): undefined reference to
`Image::~Image()'
/usr/bin/ld: main.cpp:(.text+0x287f3): undefined reference to
`Image::~Image()'
/usr/bin/ld: src/main.o:main.cpp:(.text+0x28808): more undefined references
to `Image::~Image()' follow
collect2: error: ld returned 1 exit status
make: *** [Makefile:51: main] Error 1