Trying to use cryptlib in C++ project...

P

prophasi

Hi all,

I just went back to trying my hand at some C++ after a very long break,
and I've gotta confess that I totally suck so far, and I'm actually
trying to do something that's got to be painfully easy. I just don't
know how to do it.

I've got a VS2005 solution with a single, rather simple project. I want
to encrypt some strings, so I decided to use cryptlib. I downloaded it
and added the cryptlib project to my solution. Now, I need to reference
it from my own project, and I can't get it to work.

I added a reference to the cryptlib project to my own project. That
would appear to have worked, since if I go under my project's Property
Pages, I can see cl32.lib (cryptlib) referenced at the end of the
linker's command line. In addition, I can start typing cryptInit()
within one of my classes, hit ctrl+space for Intellisense, and it finds
the function in there just fine, as well as tons of other cryptlib
functions. However, by the time I get to the parens, I get no more
Intellisense info, and if I try to compile with the line in my code, I
get "'cryptInit': Identifier not found".

I didn't know if I had to use the namespace, as well, but in looking at
the source that contains cryptInit() (cryptapi.h), I don't see a
namespace defined.

I realize it's a lame, dumb, n00b question, but since it's apparently
so elementary, I haven't had any luck finding the answer online, and
it's pretty frustrating to be stuck on this crap instead of a real
coding question. Any help would be immensely appreciated.

Thanks,
Jeremy
 
P

Prophasi

All -

Sorry for the bad posting -- my issue is Visual Studio-specific, so it
shouldn't be here. I'll watch that in the future.

I was kindly emailed a solution by someone browsing the group, so I'll
briefly state it here in case someone happens to be searching for the
same thing.

When I added the cryptlib reference to my project, VS2005 did, as I
stated, add the cryptlib library to the linker's command line. To be
able to reference the header files, though, I needed to point my
project to the cryptlib source directory. In VS2005, this parameter is
found in Project -> Properties -> Configuration Properties -> C/C++ ->
General -> Additional Include Directories. Once I added cryptlib's
source dir there, I had a successful build with no further problems.

-Jeremy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,079
Latest member
ElidaWarin

Latest Threads

Top