I'm currently writing a wireless authentication simulation program in VS.NET 2003 and am trying to integrate Cyrpto++ 5.1 with it. I have created a GUI with the help of VS.NET's new C++ form maker (similar to VB 6's) and I have several classes created to represent the objects involved in the simulation (ie. mobile station, home agent, CA, etc ..). I would like to use some of the Crypto++ encryption algoritms in the object classes but I am having a hard time importing the required crypto++ files correctly. I'm fairly new to C++ and very new to Crypto++ and thought that maybe someone on here with more experience could help me out.

I have all the files stored in the same directory (Crypto++ and my project), and have tried to mimick what was done in the test.cpp of the Crypto++ package. In my node.h header file I have the following, as far as imports go:

#pragma once
#using <mscorlib.dll>

#include "pch.h"
#include "md5.h"
#include "sha.h"
#include "ripemd.h"
#include "files.h"
#include "rng.h"
#include "hex.h"
#include "gzip.h"
#include "default.h"
#include "rsa.h"
#include "randpool.h"
#include "ida.h"
#include "base64.h"
#include "socketft.h"
#include "dsa.h"
#include "rsa.h"
#include "osrng.h"
#include "wait.h"
#include "fips140.h"
#include "factory.h"

#include <iostream>
#include <time.h>

#ifdef CRYPTOPP_WIN32_AVAILABLE
#include <windows.h>
#endif

#if (_MSC_VER >= 1000)
#include <crtdbg.h>               // for the debug heap
#endif

#if defined(__MWERKS__) && defined(macintosh)
#include <console.h>
#endif

using namespace CryptoPP;
using namespace std;

using namespace System;

When I try to build the project I get LNK2020 and LNK2005 errors. A LNK2020 error is defined as follows:

unresolved token 'token'
Similar to an undefined external error, except that the reference is via metadata.
To resolve:
Define the missing function or data, or
Include the object file or library in which the missing function or data is already defined.


and a LNK2005 error is defined as:

symbol already defined in object
The given symbol, displayed in its decorated form, was multiply defined.

If anyone has any advice for me it would be greatly appreciated. Thanks in advance!

Matt Cruickshank

_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail




Reply via email to