How do i merge the whole library to a single .h?

89 views
Skip to first unread message

Renan Gentil

unread,
Sep 26, 2023, 2:48:22 PM9/26/23
to open62541
I hope this message find you well,

I'm currently finding a problem trying to import and link the open62541 library using cmake, but rereading the github page (and also seeing it in the example files) i realized that is possible to merge it all into a single .h to make it easier to use.

But how can i do it?(please explain it in the most detailed way)

Thank you for your time.

Muddasir shakil

unread,
Sep 28, 2023, 8:10:53 AM9/28/23
to open62541
Hi
you have to enable AMALGAMATION in the cmake options. 
-DUA_ENABLE_AMALGAMATION=ON

Renan Gentil

unread,
Sep 28, 2023, 9:05:47 AM9/28/23
to open62541
I'm new on importing external libraries, and using cmake, can you give me a cmake example file or explain with more details? 

Thank you

Julius Pfrommer

unread,
Sep 28, 2023, 9:12:48 AM9/28/23
to Renan Gentil, open62541
The cmake file never changes.
You can enable the amalgamation with the configuration setting that mudassir mentioned. Or use a gui tool like ccmake…

Regards, Julius
--
You received this message because you are subscribed to the Google Groups "open62541" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open62541+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/open62541/b0bbdc66-3742-4e8a-ac8c-ff98ea2cbcdan%40googlegroups.com.

Renan Gentil

unread,
Sep 28, 2023, 3:06:19 PM9/28/23
to open62541
I found the single files and downloaded them, and put it in my project, 

then i used an example code to make a simple server(the code is in the documentation) but vs code keep having this errors:
vs code error.png

it says that function "UA_Server_runUntillIntwrrupt" dont exist if I ctrl+click it, it don't go anywhere, but if I ctrl+click "UA_Server_new" and the other functions it goes to the open62541.c file like it is supose to, but the myServer.c keep having undefined reference.

I also keep having this errors in open62541.c:
vs code error 2.png 

Best regards, Renan Gentil.
Em quinta-feira, 28 de setembro de 2023 às 10:12:48 UTC-3, julius....@gmail.com escreveu:
The cmake file never changes.
You can enable the amalgamation with the configuration setting that mudassir mentioned. Or use a gui tool like ccmake…

Regards, Julius


Am Donnerstag, 28. September 2023 schrieb Renan Gentil <ren....@gmail.com>:
I'm new on importing external libraries, and using cmake, can you give me a cmake example file or explain with more details? 

Thank you

Em quinta-feira, 28 de setembro de 2023 às 09:10:53 UTC-3, ranamudda...@gmail.com escreveu:
Hi
you have to enable AMALGAMATION in the cmake options. 
-DUA_ENABLE_AMALGAMATION=ON

On Tuesday, 26 September 2023 at 20:48:22 UTC+2 ren....@gmail.com wrote:
I hope this message find you well,

I'm currently finding a problem trying to import and link the open62541 library using cmake, but rereading the github page (and also seeing it in the example files) i realized that is possible to merge it all into a single .h to make it easier to use.

But how can i do it?(please explain it in the most detailed way)

Thank you for your time.

--
You received this message because you are subscribed to the Google Groups "open62541" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open62541+...@googlegroups.com.

Renan Gentil

unread,
Sep 29, 2023, 10:00:35 AM9/29/23
to open62541
Also, can I use visual studio code or I necessarily need to use just visual studio?

if i can use visual studio code, how do I configure the environment to use it?

Best regards Renan Gentil.

Reply all
Reply to author
Forward
0 new messages