Chilkat CLion C/C++ Library Downloads
The download(s) on this page are the full-versions.
Chilkat libraries/components are fully functional for 30-day evaluations.
Getting Started: Compiling and Linking
Compiling and Linking
To link with the Chilkat static lib, you'll need to add a few things to the CMakeLists.txt in your project. Add the directory in link_directories where the libchilkat.a is located. Also add target_link_libraries line that includes the name of your project, followed by "chilkat ws2_32 crypt32".
Here is a the source code for a simple C++ program. Your application must call UnlockBundle once at the start each time it runs. Include the Chilkat header for each Chilkat class used.
// Simple C++ Example
#include "include/CkCrypt2.h"
#include "include/CkGlobal.h"
bool UnlockChilkat(void)
{
CkGlobal glob;
return glob.UnlockBundle("Anything for 30-day trial");
}
void DoSomethingWithChilkat(void)
{
CkCrypt2 crypt;
crypt.put_CryptAlgorithm("aes");
crypt.put_CipherMode("cbc");
crypt.put_KeyLength(256);
crypt.put_PaddingScheme(0);
crypt.put_EncodingMode("hex");
const char *ivHex = "000102030405060708090A0B0C0D0E0F";
crypt.SetEncodedIV(ivHex,"hex");
const char *keyHex = "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F";
crypt.SetEncodedKey(keyHex,"hex");
const char *encStr = crypt.encryptStringENC("The quick brown fox jumps over the lazy dog.");
std::cout << encStr << std::endl;
const char *decStr = crypt.decryptStringENC(encStr);
std::cout << decStr << std::endl;
return;
}
int main(int argc, const char* argv[])
{
if (UnlockChilkat()) {
DoSomethingWithChilkat();
}
return 0;
}
Release Notes
The release notes are located on the Chilkat blog.
Unicode Support
The Chilkat C++ libraries support Unicode in the form of utf-8 multibyte character strings. For more information see these pages:
- Using Unicode String Literals
- Using ANSI or utf-8 with Chilkat C++ "const char *" arguments.
- C++ Examples for Unicode, utf-8, and ANSI
Misdiagnosed Memory Leaks
C++ programmers often misdiagnose memory leaks with Chilkat. Please read the information here to understand the reason: Misdiagnosed C++ Memory Leaks