Witam,
Mam problem przy kompilowaniu programu w Borland C++Builder 6. Wyświetla mi się błąd :
[Linker Error] Unresolved external '_idea_set_encrypt_key' referenced from C:\PROBA\UNIT1.OBJ
Oto kod zródłowy :
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
#include "idea.h"
#include "idea_lcl.h"
#include "opensslv.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
const char *IDEA_version="IDEA" OPENSSL_VERSION_PTEXT;
void idea_ecb_encrypt(const unsigned char *in, unsigned char *out,
IDEA_KEY_SCHEDULE *ks)
{
unsigned long l0,l1,d[2];
n2l(in,l0); d[0]=l0;
n2l(in,l1); d[1]=l1;
idea_encrypt(d,ks);
l0=d[0]; l2n(l0,out);
l1=d[1]; l2n(l1,out);
l0=l1=d[0]=d[1]=0;
}
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
unsigned char textin[8],textout[10];
IDEA_KEY_SCHEDULE ks;
unsigned char key[16];
key[16]='I','D','E','A','k','l','u','c','I','D','E','A','k','l','u','c';
idea_set_encrypt_key(key,&ks);
}
//---------------------------------------------------------------------------
Jeżeli ktoś wie co trzeba poprawić lub ustawić w Builderze 6 to prosiłbym o pomoc.
Z góry dziekuję za pomoc.
Mam problem przy kompilowaniu programu w Borland C++Builder 6. Wyświetla mi się błąd :
[Linker Error] Unresolved external '_idea_set_encrypt_key' referenced from C:\PROBA\UNIT1.OBJ
Oto kod zródłowy :
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
#include "idea.h"
#include "idea_lcl.h"
#include "opensslv.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
const char *IDEA_version="IDEA" OPENSSL_VERSION_PTEXT;
void idea_ecb_encrypt(const unsigned char *in, unsigned char *out,
IDEA_KEY_SCHEDULE *ks)
{
unsigned long l0,l1,d[2];
n2l(in,l0); d[0]=l0;
n2l(in,l1); d[1]=l1;
idea_encrypt(d,ks);
l0=d[0]; l2n(l0,out);
l1=d[1]; l2n(l1,out);
l0=l1=d[0]=d[1]=0;
}
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
unsigned char textin[8],textout[10];
IDEA_KEY_SCHEDULE ks;
unsigned char key[16];
key[16]='I','D','E','A','k','l','u','c','I','D','E','A','k','l','u','c';
idea_set_encrypt_key(key,&ks);
}
//---------------------------------------------------------------------------
Jeżeli ktoś wie co trzeba poprawić lub ustawić w Builderze 6 to prosiłbym o pomoc.
Z góry dziekuję za pomoc.