Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(automated): Update docs from Gitbook #26

Merged
merged 1 commit into from
Aug 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions docs/sdk/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,20 +285,21 @@ project(my_first_c_app)
include(FetchContent)

FetchContent_Declare(
atclient
URL https://github.com/atsign-foundation/at_c/releases/download/v0.1.0/at_c-v0.1.0.tar.gz
URL_HASH SHA256=494a4960dedc45484a0078db4c388cd592efdebde45e40bdded5c2b9c587b146
SOURCE_SUBDIR packages/atclient
atsdk
URL https://github.com/atsign-foundation/at_c/archive/refs/tags/v0.1.0.tar.gz
URL_HASH SHA256=7ca4215a473037ca07bef362b852291b0a1cf4e975d24d373d58ae9c1df832bc
)

FetchContent_MakeAvailable(atclient)
FetchContent_MakeAvailable(atsdk)

add_executable(main ${CMAKE_CURRENT_LIST_DIR}/main.c)

target_link_libraries(main PRIVATE atclient atlogger atchops mbedtls mbedcrypto mbedx509 cjson)
target_link_libraries(main PRIVATE atclient)
```

#### 3. Create main.c
The above `CMakeLists.txt` will use FetchContent to download the C atSDK for you. Then, we will create a target named `main` for you and link our `atclient` library statically. 

#### 4. Create main.c

Inside your project folder, create a new file called `main.c`

Expand Down Expand Up @@ -356,7 +357,7 @@ exit:
}
```

#### 4. CMake Configure
#### 5. CMake Configure

In the terminal, run the following command.

Expand Down Expand Up @@ -385,7 +386,7 @@ $ cmake -S . -B build
-- Build files have been written to: /home/jeremy/GitHub/at_demos/demos/get_started_c/1-authentication/build
```

#### 5. Build
#### 6. Build

Use CMake to build your configure and build your programs:

Expand All @@ -404,7 +405,7 @@ cmake --build build
[100%] Built target main
```

#### 6. Run the binary
#### 7. Run the binary

The previous command, if ran successfully, would have created a binary executable for you: `./build/main`.

Expand Down