hey guys, i got an assingment due and i was wondering if you could please help me to debug this program.
5 files,
ass1.h
ass1.cpp
main.cpp
Makefile.txt (needs to be renamed to makefile for it to be used properly)
ass1.txt(needs to be renamed ass1.dat to be used[its the database for the books])
to be compiled for a linux environment
the files to be loaded needs to change from text to binary file type, i havnt been able to work out how to do that yet
mksh: Warning: newline is not last character in file Makefile
Current working directory /home/ug/q/nt647
make: Fatal error in reader: Makefile, line 3: Unexpected end of line seen
that code there btw is out of date, i have almost completly re-written it all, (except the main.cpp)
i put all my code into one file and compiled it and it worked fine (my new stuff) but when i split it again, for the makefile to do its job, it didnt complie
ok, i got my makefile working, but there seems to still be an error that i cant find , int he code itself, if possible could you see if you could find it ?
dont forget to change the makefile.txt back to makefile (just a reminder :P )
the error im getting now is
main.cpp:1: error: stray '\239' in program
main.cpp:1: error: stray '\187' in program
main.cpp:1: error: stray '\191' in program
$ make
g++ -c main.cpp
g++ -c ass1.cpp
g++ main.o ass1.o -o ass1
Undefined first referenced
symbol in file
DisplayRecords() main.o
ld: fatal: Symbol referencing errors. No output written to ass1
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `ass1'
yea, i jsut had a thoroguh read of it, and found teh problem, please come and shoot me where i stand
DisplayRecord();
DisplayRecords();
i mixed it up in one spot :)
the makefile problems i was haveing seemed to be coming from invisible characters, i got my mate to retype on on his linux and send to me and i used that fine