

Given this /cygdrive/c/Users/Korina/AppData/Local/Temp/ccxq9DAh.o:p7b.cpp:(.text+0x0): multiple definition of `main'

The problem is that you are compiling "*.cpp" all together. Sorry if this is a bit long I wanted to include as much detail as possible. So this could a two-parter question (how do I set up TextPad to correctly compile/link files? why is my honorStatus() function undefined in main.cpp?) or it could just be that my syntax is wrong.
#Compiling tex files with texpad windows how to
I wasn't able to find a guide on how to set up TextPad/G++ to compile and link multiple files, but my instructor gave a short set of instructions that I followed. Main.cpp:(.text+0x1cf): undefined reference to `honorStatus(int, student*)' When using an online C++ compiler (CompileOnline), I get: /tmp/ccIMwHEt.o: In function `main': usr/lib/gcc/i686-pc-cygwin/4.8.2/././././i686-pc-cygwin/bin/ld: /cygdrive/c/Users/Korina/AppData/Local/Temp/ccmtzOP2.o: bad reloc address 0x1b in section `.text$_ZNSt11char_traitsIcE7compareEPKcS2_j'Ĭollect2: error: ld returned 1 exit status cygdrive/c/Users/Korina/AppData/Local/Temp/ccLa96oD.o:test.cpp:(.text+0x0): multiple definition of `main' cygdrive/c/Users/Korina/AppData/Local/Temp/ccmtzOP2.o:p5.cpp:(.text+0x0): first defined here When using TextPad/G++, I get the following error: /cygdrive/c/Users/Korina/AppData/Local/Temp/ccxq9DAh.o:p7b.cpp:(.text+0x0): multiple definition of `main' Not eligible." << endl Ĭout << "\nTotal number of students eligible for the Honor Society is " << cnt << "." << endl Ĭommon.h: // Maximum number of students allowed Void honorStatus(int fheader, student fstudentList)įor (int i = 0 i 29 & fstudentList.hours = 3.75)Ĭout << "Student #" << fstudentList.ID << " is a senior with GPA of " of each student, outputting this information and the number of students eligible Function to determine classification and honors society eligibility requirements If file cannot be opened, output error message and close programĬout > studentList.ID > studentList.hours > studentList.GPA Get filename from user and try to open file Void honorStatus(int, student studentList)

This very well could be a syntax error on my part since I am rather new with using multiple files and structs in C++ (in particular, passing structs to functions).
