|
 |
|
 |
02-24-2003, 12:06 AM
|
#1 (permalink)
|
|
bloomberg
Join Date: Jun 2002
Location: bloomberg
Posts: 263
|
aes encryption...
okay, i'm trying to implement rijndael, but the ref code I have ( in c++ ) is not working, i'm running win xp. using dev bloodshed.
i'm not 100% confidant with c++ so i can't exactly figure out the problem, seems to be some sort of linkage errors..
"Undefined reference to function x, y, z"
etc
all those files are declared in a header file that is included so i don't understand the prob
a link to the code is here: http://www.esat.kuleuven.ac.be/~rijm...ijndaelref.zip
I would really appreciate any advice on the problem because I'm sure that the code is supposed to work 
__________________
-- bloomberg.
|
|
|
02-25-2003, 05:24 PM
|
#2 (permalink)
|
|
bloomberg
Join Date: Jun 2002
Location: bloomberg
Posts: 263
|
no-one can help me out here?
__________________
-- bloomberg.
|
|
|
02-26-2003, 08:05 AM
|
#3 (permalink)
|
|
I am red.
Join Date: Feb 2003
Location: Cleveland, OH
Posts: 139
|
Is there any specific part of the many files in the zip package is giving you the problem?
Whats dev bloodshed, the compiler?
I don't think it's a linking error. A linking error would imply it's not including the right file so unless all of your functions are coming up as undefined (because it can't link the header) then I don't think thats the problem. Did you overload any of the functions and not include an extra overloaded definition? Did you just misspell a function call within your program? What happens when you double click the error, if thats possible in the compiler you use.
Those are my best ideas right now.
saline.
|
|
|
02-26-2003, 12:09 PM
|
#4 (permalink)
|
|
bloomberg
Join Date: Jun 2002
Location: bloomberg
Posts: 263
|
sorry, dev bloodshed is the IDE for windows, comes with a compiler.. g++? in any case, double-clicking on the errors is usually possibly but in this case yields nothing.
I did not write *any* part of the program, its reference code for the alogorithm hence my concern at why it won't compile for me.
the functions are *definately* included in the header file the error is simply:
"Undefined reference to function makeKey in ..." things like that.
I just don't get it.. if they are included why should it have a problem?
__________________
-- bloomberg.
|
|
|
02-26-2003, 01:00 PM
|
#5 (permalink)
|
|
LOAD "*",8,1
Join Date: Feb 2003
Location: la.ca.us
Posts: 254
|
this is a link error.
the functions are declared in the header files, but are they actually defined somewhere? ie, is there actual code that implements them somewhere in your program, or is there a library that you should be linking against?
|
|
|
02-26-2003, 02:04 PM
|
#6 (permalink)
|
|
bloomberg
Join Date: Jun 2002
Location: bloomberg
Posts: 263
|
Quote:
Originally posted by joe_bruin
this is a link error.
the functions are declared in the header files, but are they actually defined somewhere? ie, is there actual code that implements them somewhere in your program, or is there a library that you should be linking against?
|
no... everything is implemented already, just checked.
mmmm....
__________________
-- bloomberg.
|
|
|
02-26-2003, 04:54 PM
|
#7 (permalink)
|
|
I am red.
Join Date: Feb 2003
Location: Cleveland, OH
Posts: 139
|
Linker, The Legend of Compilation
Ok, so you haven't modified anything you're just checking to see if it works? Are you sure the files you have are compilable all on their lonesome? It doesn't require some other sort of program to interface with it. Like if it's a class it probably (as far as I know) won't compile and do anything it needs a program with a main() function in order to have some idea what to do.
Another idea:
When the files are included (#include) are they explicitely referenced.
For instance is it like
#include <c:\program_files\c_compiler\include\file.h>
or is it
#include <file.h>
If it's like the first one you might want to check that it's looking in the right place. If its the second one you might want to check that the appropriate .h s and .cpps are in the right include directory.
|
|
|
02-26-2003, 06:07 PM
|
#8 (permalink)
|
|
bloomberg
Join Date: Jun 2002
Location: bloomberg
Posts: 263
|
the non-standard includes (not stdio, etc) and included as:
#include "abc.h" and all those files are in the same dir, the dir i'm trying to run it in.
no - it does not need additional files to run it
yes - it has a main()
... 
__________________
-- bloomberg.
|
|
|
02-26-2003, 07:58 PM
|
#9 (permalink)
|
|
I am red.
Join Date: Feb 2003
Location: Cleveland, OH
Posts: 139
|
saline
hmmm, I guess that would work. The way the linker looks for files as I remember it first it looks in the include folder from where the compiler was installed. If it doesn't find what it's looking for it looks in the folder where the file it's working with is saved and then after that it just quits. This is if it's not explicitly defined in the include statement.
In short it looks like you're doing things right and for now at least, I'm stumped.
|
|
|
03-04-2003, 01:20 AM
|
#10 (permalink)
|
|
bloomberg
Join Date: Jun 2002
Location: bloomberg
Posts: 263
|
come on someone just download the damn thing and give it a try it'll take all of 5 minutes!
by the way; the cookies on the site are *TOTALLY* screwed... i never stay logged in, and its not my computer.
__________________
-- bloomberg.
|
|
|
03-04-2003, 01:40 AM
|
#11 (permalink)
|
|
Regular Contributor
Join Date: May 2002
Location: Alkmaar, the Netherlands
Posts: 167
|
i dont have bloodshed (i have not shed blood ?  ) but i can see if i can compile it in my borland compiler.
it could be caused because you are using a function which has not been declared yet .. try to move the definition of the functions to the top of your project
__________________
The specialty of the house? thats me (cheap as always)
|
|
|
03-04-2003, 01:56 AM
|
#12 (permalink)
|
|
Regular Contributor
Join Date: May 2002
Location: Alkmaar, the Netherlands
Posts: 167
|
i created a new project in my borland 3.1 ide/compiler
i added the 3 .c files in the following order
rijndael-alg-ref.c = rijnda~1.c
rijndael-api-ref.c = rijnda~2.c
rijndaeltest-ref.c = rijnda~3.c
for the includes i had to change the filenames to 8.3 format
rijndael-alg-ref.h = rijnda~1.h
rijndael-api-ref.h = rijnda~2.h
boxes-ref.dat = boxes-~1.dat
after that it compiled perfectly
when i then run test.exe in the dir where the table files are .. it creates 5 .txt files
__________________
The specialty of the house? thats me (cheap as always)
|
|
|
03-04-2003, 07:10 PM
|
#13 (permalink)
|
|
bloomberg
Join Date: Jun 2002
Location: bloomberg
Posts: 263
|
thank you very much for that Hrqls 
__________________
-- bloomberg.
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -8. The time now is 05:23 AM.
|
Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting
|
 |
|