2

I am justing wondering what the error means here if anyone can help me.

g++ -o Try2 student.o studentlist.o
Undefined                       first referenced
 symbol                             in file
main                                /usr/local/lib/gcc/sparc-sun-solaris2.10/4.8.4/crt1.o
ld: fatal: Symbol referencing errors. No output written to Try2
collect2: error: ld returned 1 exit status
9
  • Did you first compile the two source files with g++ -c student.cpp and g++ -c studentlist.o? Nov 18, 2020 at 5:05
  • Please also show the files
    – user14248283
    Nov 18, 2020 at 5:08
  • @Tony Tannous Yeah I did.
    – user13243449
    Nov 18, 2020 at 5:22
  • @Aryan Parekh Both of the .cpp files are around the 300 lines of code and the header are pretty long but i'll try to post them
    – user13243449
    Nov 18, 2020 at 5:23
  • @Swkn The problem can come from anywhere, try to remove segments of code and see if it suddenly solves the problem. Basically, try making a minimal reproducible example. You might find out the reason on your own
    – user14248283
    Nov 18, 2020 at 5:25

0