I am starting a cryptography program in C++, but have hit a snag with my linker. Any time I try to compile the backbone of the program, I get about six "link error: undefined symbol ... " errors.
This is the first time I have seen these errors from the software I use (Metrowerks Code Warrior).
Source:
/* Author: teufelfisch
Filename: "test.cpp"
Last Mod: 5/22/02 */
// [Prototypes]
void crypt(); //Actual cryptography SR
inType promptU(); //Prompts user for type: read from string or file
void inString(); //Gets string from user to be crypted
void inFile(); //Reads file to be crypted
there is something wrong with your functions. your compiler can't find them. try putting all of them in one file and see if it works. And not only the prototypes (the full functions).
I think the problem is that the file where you've put the functions
crypt, inFile and the datatype apstring is not compiled.
You need to make a project or something so that the compiler knows which files to compile.
Also, what is in apstring.h?
apstring.h is basically for strings- I learned with it. I like the way it works, so I decided to go back to it.
All of this is already in a project.
Oh, wow. I just fixed the problem myself. I needed to add "apstring.cpp" to the project, it seems "apstring.h" is dependent on that file.