Hello, I am always getting this error message which is preventing me from running my program, the following is the full message I receive. If anyone has a solution or can explain what this means to me I would appreciated it. I'm using Netbeans.
cd 'E:\CIS-158-01\projects\Final Exam Part 2'
C:\cygwin64\bin\make.exe -f Makefile CONF=Debug
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory '/cygdrive/e/CIS-158-01/projects/Final Exam Part 2'
make[1]: Warning: File '.dep.inc' has modification time 1.2 s in the future
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/Cygwin-Windows/final_exam_part_2.exe
make[2]: Entering directory '/cygdrive/e/CIS-158-01/projects/Final Exam Part 2'
make[2]: Warning: File '.dep.inc' has modification time 1.1 s in the future
mkdir -p dist/Debug/Cygwin-Windows
g++ -o dist/Debug/Cygwin-Windows/final_exam_part_2 build/Debug/Cygwin-Windows/main.o
build/Debug/Cygwin-Windows/main.o: In function `PatientDemographicInformation::printPatientDemographicInformation()':
/cygdrive/e/CIS-158-01/projects/Final Exam Part 2/PTDemo.h:230: undefined reference to `PatientDemographicInformation::getPatientMedicalRecordNo()'
/cygdrive/e/CIS-158-01/projects/Final Exam Part 2/PTDemo.h:230:(.text+0x952): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `PatientDemographicInformation::getPatientMedicalRecordNo()'
build/Debug/Cygwin-Windows/main.o: In function `PatientBillingInformation::getPatientBalance()':
/cygdrive/e/CIS-158-01/projects/Final Exam Part 2/PTBill.h:135: undefined reference to `PatientBillingInformation::getPatientMonthlyPaymentStatus()'
/cygdrive/e/CIS-158-01/projects/Final Exam Part 2/PTBill.h:135:(.text+0x1250): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `PatientBillingInformation::getPatientMonthlyPaymentStatus()'
/cygdrive/e/CIS-158-01/projects/Final Exam Part 2/PTBill.h:140: undefined reference to `PatientBillingInformation::getPatientMonthlyPaymentStatus()'
/cygdrive/e/CIS-158-01/projects/Final Exam Part 2/PTBill.h:140:(.text+0x1295): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `PatientBillingInformation::getPatientMonthlyPaymentStatus()'
collect2: error: ld returned 1 exit status
make[2]: *** [nbproject/Makefile-Debug.mk:63: dist/Debug/Cygwin-Windows/final_exam_part_2.exe] Error 1
make[2]: Leaving directory '/cygdrive/e/CIS-158-01/projects/Final Exam Part 2'
make[1]: *** [nbproject/Makefile-Debug.mk:59: .build-conf] Error 2
make[1]: Leaving directory '/cygdrive/e/CIS-158-01/projects/Final Exam Part 2'
make: *** [nbproject/Makefile-impl.mk:40: .build-impl] Error 2
BUILD FAILED (exit value 2, total time: 5s)
I solved it. It was because I forgot patientDemographic:: for getPatientMedicalRecordNo()' in my header file.
`PatientDemographicInformation::printPatientDemographicInformation()':
/cygdrive/e/CIS-158-01/projects/Final Exam Part 2/PTDemo.h:230: undefined reference to `PatientDemographicInformation::getPatientMedicalRecordNo()'
Looks like you forgot to include a header for these functions.
You might have a header "PatientBillingInformation", and when you want to use these functions you have to #include "PatientBillingInformation.h"