login about faq

This is the 4th time I ask this question and it still doesn't show up in the list anywhere!

I'm developing an MFC application linking with the library, ChilkatDbgDll.lib, in debug mode. The linker finds the library but it can't find any of the functions. My runtime library is set to Multi-threaded Debug DLL (/MDd). And here is an example of the errors:

1>EncryptView.obj : error LNK2019: unresolved external symbol "void * cdecl CkCrypt2_Create(void)" (?CkCrypt2_Create@@YAPAXXZ) referenced in function "public: void thiscall CEncryptView::OnEditMine(void)" (?OnEditMine@CEncryptView@@QAEXXZ) 1>EncryptView.obj : error LNK2019: unresolved external symbol "void cdecl CkCrypt2_putCryptAlgorithm(void ,char const )" (?CkCrypt2_putCryptAlgorithm@@YAXPAXPBD@Z) referenced in function "public: void thiscall CEncryptView::OnEditMine(void)" (?OnEditMine@CEncryptView@@QAEXXZ) 1>EncryptView.obj : error LNK2019: unresolved external symbol "void cdecl CkCrypt2_putEncodingMode(void ,char const )" (?CkCrypt2_putEncodingMode@@YAXPAXPBD@Z) referenced in function "public: void thiscall CEncryptView::OnEditMine(void)" (?OnEditMine@CEncryptView@@QAEXXZ) 1>EncryptView.obj : error LNK2019: unresolved external symbol "void cdecl CkCrypt2_putHashAlgorithm(void ,char const )" (?CkCrypt2_putHashAlgorithm@@YAXPAXPBD@Z) referenced in function "public: void thiscall CEncryptView::OnEditMine(void)" (?OnEditMine@CEncryptView@@QAEXXZ)

Any answers, please?

asked Feb 23 at 21:28

SidDregia's gravatar image

SidDregia
1


I'm sorry for the trouble. It seems you're using the "C" functions in an MFC C++ program? I'm not sure why you wouldn't use the C++ classes instead. In any case, the "C" functions are designed for "C" programs. If you are including from a .cpp, you must wrap the #include in an extern "C"

extern "C" {
#include "...."
}
This is how one would use any "C" API in C++...

link

answered Feb 23 at 21:51

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

edited Feb 23 at 21:52

Thanks for your answer. I just copied an example you provided on one of your pages for emulating the PBEWithMD5AndDES in Java. I will check out the C++ classes. Thanks again for your quick reply.

link

answered Feb 23 at 21:57

SidDregia's gravatar image

SidDregia
1

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×8
×6
×4

Asked: Feb 23 at 21:28

Seen: 389 times

Last updated: Feb 23 at 21:57

powered by OSQA