Sorry for the back to back posting. I've resolved many of the issues that have come up, but this one seems to have me stumped. It's a linker error. If this was 6 months ago I'd know how to fix it, unfortunately I've forgotten a lot of my little tricks. These are the errors:
Code:
Project : Console application
Compiler : GNU GCC Compiler (called directly)
Directory : C:\Documents and Settings\Andrew\My Documents\UKGS\
--------------------------------------------------------------------------------
Switching to target: default
Compiling: kCom.cpp
Linking console executable: C:\Documents and Settings\Andrew\My Documents\UKGS\UKGS.exe
.objs\kCom.o:kCom.cpp:(.text+0x814): undefined reference to `mime::ks64_encode(unsigned char*, unsigned char)'
.objs\kCom.o:kCom.cpp:(.text+0x87e): undefined reference to `mime::mime_encode(unsigned char*, unsigned char*, unsigned char)'
.objs\kCom.o:kCom.cpp:(.text+0x8e4): undefined reference to `mime::mime_encode(unsigned char*, unsigned char*, unsigned char)'
.objs\kCom.o:kCom.cpp:(.text+0x941): undefined reference to `mime::ks64_encode(unsigned char*, unsigned char)'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
I'm using Code::Blocks with miniGW, running XP through parallels on a Macbook Pro.
I can't show the entire sections of the code because it's somewhat classified, but this is an example of where the error is displaying:
In kCom.cpp
Code:
if( newMime.ks64_encode( &enc_data[enc_index], cmd ) != 0x00 )
mime.cpp (edited for confidentiality)
Code:
unsigned char ks64_encode(unsigned char *dest,unsigned char raw )
{
if((thing <= thing))
//do stuff
else if((thing >= thing) && (thing <= thing))
//do stuff
else if((thing >= thing) && (thing <= thing))
//do stuff
else if (thing == thing)
//do stuff
else if (thing == thing)
//do stuff
return thing
}
mime.h
Code:
#ifndef MIME
#define MIME
class mime
{
public:
mime();
~mime();
unsigned char mime_encode(unsigned char *dest, unsigned char *raw_data, unsigned char num_raw);
unsigned char mime_decode(unsigned char *dest, unsigned char *num_raw, unsigned char *enc_data);
unsigned char ks64_encode(unsigned char *dest, unsigned char raw);
unsigned char ks64_decode(unsigned char *dest, unsigned char character);
private:
};
#endif
Anything that can get rid of this little error will be great. It's been tormenting me for a while now.