468,502 Members | 2,241 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,502 developers. It's quick & easy.

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

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

Sep 12 '06 #1
1 3898
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
pr******@gmail.com wrote:
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
Sep 12 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by David Elliott | last post: by
5 posts views Thread by Kenneth | last post: by
13 posts views Thread by Kris Desmadryl | last post: by
7 posts views Thread by Kris Desmadryl | last post: by
3 posts views Thread by gieforce | last post: by
reply views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.