Ok, I canNOT figure out what I am doing wrong here. I downloaded a custom library. It includes the files:
aes.h
aes.c
I made a file to test it called Test.cpp
The contents of Test.cpp are:
#include "./aes.h"
#include <iostream>
int main()
{
int a = aes_self_test(1);
}
I have aes.h, aes.cpp and Test.cpp all in the same directory (due to write privelages up here at school). Inside aes.cpp I changed:
#include "aes.h"
to
#include "./aes.h"
The compiler error I am getting is:
Test.cpp:4:
aes.h:95:19: warning: no newline at end of file
/tmp/ccJx2nhi.o: In function `main':
Test.cpp:11: undefined reference to `aes_self_test'
collect2: ld returned 1 exit status
I added a newline (for those of you that will ask) and it still gives the warning, whatever. The problem is I can't figure out why it's saying the reference to the function doesn't exist since it CLEARLY does and it is being used correctly. The link to the aes.h and aes.c code is:
http://xyssl.org/code/source/aes/
I am working on an openSUSE machine if that matters. Thanks much in advance, sorry it's such a noob Q but I have almost 0 experience in C++.
EDIT: If you guys need more info just say. I can provide screenshots or source or whatever.
EDIT2: I just tried on a WinXP machine and it gives the exact same error message. What am I missing here?
aes.h
aes.c
I made a file to test it called Test.cpp
The contents of Test.cpp are:
#include "./aes.h"
#include <iostream>
int main()
{
int a = aes_self_test(1);
}
I have aes.h, aes.cpp and Test.cpp all in the same directory (due to write privelages up here at school). Inside aes.cpp I changed:
#include "aes.h"
to
#include "./aes.h"
The compiler error I am getting is:
Test.cpp:4:
aes.h:95:19: warning: no newline at end of file
/tmp/ccJx2nhi.o: In function `main':
Test.cpp:11: undefined reference to `aes_self_test'
collect2: ld returned 1 exit status
I added a newline (for those of you that will ask) and it still gives the warning, whatever. The problem is I can't figure out why it's saying the reference to the function doesn't exist since it CLEARLY does and it is being used correctly. The link to the aes.h and aes.c code is:
http://xyssl.org/code/source/aes/
I am working on an openSUSE machine if that matters. Thanks much in advance, sorry it's such a noob Q but I have almost 0 experience in C++.
EDIT: If you guys need more info just say. I can provide screenshots or source or whatever.
EDIT2: I just tried on a WinXP machine and it gives the exact same error message. What am I missing here?