From 74333dd77f273031225059e2c3993a44e908511e Mon Sep 17 00:00:00 2001 From: Julius Pfrommer Date: Thu, 14 Mar 2024 12:00:25 +0100 Subject: [PATCH] refactor(doc): Simplify the examples build instructions in the README.md --- README.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2abc52615..27bed7fab 100644 --- a/README.md +++ b/README.md @@ -136,15 +136,12 @@ Here are some direct download links for the current pack branches: ## Examples A complete list of examples can be found in the [examples directory](https://github.com/open62541/open62541/tree/master/examples). - -To build the examples, we recommend to install the open62541 project as mentioned in previous section. +To build the examples, we recommend to install open62541 as mentioned in the previous section. +Using the GCC compiler, just run ```gcc -std=c99 -lopen62541 -o server``` (under Windows you may need to add additionally link against the ```ws2_32``` +socket library). ### Example Server Implementation -The following simple server example can be built using gcc, after you installed open62541 on your system. - -Using the GCC compiler, just run ```gcc -std=c99 -DUA_ARCHITECTURE_POSIX -lopen62541 -o server``` (under Windows you may need to add ``` -lws2_32``` -and change `-DUA_ARCHITECTURE_POSIX` to `-DUA_ARCHITECTURE_WIN32`). ```c #include @@ -183,6 +180,7 @@ int main(int argc, char** argv) ``` ### Example Client Implementation + ```c #include #include