cancel
Showing results for 
Search instead for 
Did you mean: 

Include a library

Giuseppe1
Associate III

Hi. I have seen several tutorials and read in the forum how to include a library. But it does not work. Can someone help me please.

Giuseppe1_0-1708950592928.png

 

20 REPLIES 20

thanks!

I can't test the code right now. But thank you so much!

On the distinction between source and binary:

AndrewNeil_0-1709571222181.png

 

Traditionally, "Library" was used to mean a pre-built binary library.

Nowadays, people also commonly speak of source-code libraries.

 

https://www.stackzero.net/compilation-process-in-c/ 

Thank you so much for your help. I really appreciate that. I'm used to using Arduino and I'm still learning to program with the STIde. So thank you so much.

You're welcome.

Yes, one of the things that the Arduino IDE "hides" from you is these details behind adding a library.

Note that there are Arduino cores for STM32s; eg,

https://github.com/stm32duino/Arduino_Core_STM32

https://www.arduino.cc/reference/en/libraries/stm32duino-examples/

So using STM32 doesn't necessarily preclude continuing to use the Arduino IDE...

 


@Giuseppe1 wrote:

I'm still learning to program with the STIde. 


Note that this is general to C (and C++) development - it's not just specific to STM32 or the STM32CubeIDE.

 


@Andrew Neil wrote:

@Giuseppe1 wrote:

I'm still learning to program with the STIde. 


Note that this is general to C (and C++) development - it's not just specific to STM32 or the STM32CubeIDE.


yeah yeah i know.

Thanks a lot again for your help.

i think that i did it. I imported the source and the header file. But now i have this error (at least it is yellow and not red).

Giuseppe1_0-1709823514741.png

 

 

Please give some more context on how & where you get that.

Does the code now build  successfully ?

I installed and imported the the source file(.c) and the header(.h) file. Then instead of the first error(top of the discussion) it gave me that "yellow" error instead of a "red" one. Do you think I should create a new post?



@Giuseppe1 wrote:

Do you think I should create a new post?






If the code does now build, then you have fixed the original problem.

You've marked the original problem as 'Solved', so this would seem to be a new problem.

In your new thread, you can always give the link to this thread for context...