> ## Documentation Index
> Fetch the complete documentation index at: https://help.cryptolens.io/llms.txt
> Use this file to discover all available pages before exploring further.

# C

> C client SDK reference

We recommend to review the repository of the C client SDK for more examples: [https://github.com/Cryptolens/cryptolens-c](https://github.com/Cryptolens/cryptolens-c)

Below are build instructions. We recommend to use our [C++ SDK](/libraries/cpp) when possible, since the it is has support for more methods.

## Build instructions

### Visual Studio

Build the project in `vsprojects/Cryptolens` with some platform and configuration (e.g. `Win32` and `Debug`). This will create the `Cryptolens.lib` file in `vsprojects/Cryptolens/Cryptolens/$(Configuration)` or `vsprojects/Cryptolens/Cryptolens/x64/$(Configuration)` for platforms `Win32` and `x64`, respectively.

The `Cryptolens.lib` file can then be used in another project, together with the include files in the `include/` directory. The `examples/CryptolensExamples` project is setup to build the example file `examples/example_activate_external.c` in this way.

Thus, to build the example project, first build the library in `vsprojects/Cryptolens` and then build the example project in `examples/CryptolensExamples`.

### CMake

There is a `CMakeLists.txt` in the root of the repository which can be used to build the library. The examples can be built using the `CMakeLists.txt` in `examples/`.

The following commands, when ran from the root of the repository, builds the examples:

```
mkdir build
cd build
cmake ../examples
make
```

### **GCC/Clang**

The example file can also be build manually with GCC or Clang using the following command (run from the root of the repository):

```
gcc -Iinclude/ -Ithird_party/cJSON/ src/cryptolens.c src/data_object.c src/decode_base64.c src/error.c src/machine_code_computer_static.c src/request_handler_curl.c src/response_parser_cJSON.c src/signature_verifier_openssl.c third_party/cJSON/cJSON.c third_party/openbsd/base64.c third_party/openbsd/strlcpy.c -lcrypto -lssl -lcurl examples/example_activate.c
```
