Newlib: The ‘Accelerator’ for Embedded Development

Newlib: The 'Accelerator' for Embedded Development

Introducing a project known as the “C Library Magic Tool” in the embedded community—Newlib. Whether you are a novice in chip development or an expert in low-level programming, Newlib can help you quickly handle the C standard library, mathematical operations, I/O interfaces, and more, making embedded system development easier. What is Newlib? Newlib is a … Read more

CMake Mastery (5): Comprehensive Guide to add_library – Static and Dynamic Libraries

CMake Mastery (5): Comprehensive Guide to add_library - Static and Dynamic Libraries

Master the Core Logic of Library Building from Compilation Principles to Industrial Practices 1. Essential Differences Between Static and Dynamic Libraries Core Feature Comparison Feature Static Library (<span>.a</span>/<span>.lib</span>) Dynamic Library (<span>.so</span>/<span>.dll</span>) Linking Method Compiled into the executable file at build time Loaded dynamically at runtime Memory Usage Multiple loads of the same library will consume … Read more

CMake Basics: Compiling Static and Dynamic Libraries, Customizing Library Output Paths

CMake Basics: Compiling Static and Dynamic Libraries, Customizing Library Output Paths

1. Generate a static library for third-party useIn Linux, the name of a static library is composed of: lib + library name + .a, where the library name needs to be specified, and lib and .a are generated automatically. The Windows system is similar.Project file structure:CMakeLists.txt # Set the minimum required CMake version to 3.15 … Read more

Simple Python Calls to C++ Programs

Methods for Python to Call C/C++ Programs Recently, while debugging, I encountered a situation where Python was running very slowly, so I researched methods to embed C++ programs in Python. I am documenting this for future reference. Generally, calling C/C++ programs from Python can be divided into three steps: 1. Write the C/C++ implementation program. … Read more

Master CMake for Building Static and Dynamic Libraries

Master CMake for Building Static and Dynamic Libraries

1. Task Explain the process of building static and dynamic libraries with CMake in a simple and understandable way using examples. Tasks: Create a static library and a dynamic library, providing the HelloFunc function for use in other programs, which outputs the string ‘Hello World!’ to the terminal. Install header files and shared libraries. Write … Read more

Basics of GCC Compilation

Basics of GCC Compilation

Click on the above “Beginner Learning Vision”, choose to add Star or “Top” Heavyweight content delivered at the first time This article is reprinted from: AI Algorithms and Image Processing Data Preparation ❝ To facilitate demonstration and explanation, here are a few simple files prepared in advance: test.cpp test.h main.cpp The contents of the files … Read more

From Beginner to Expert: Comprehensive Guide to Linux Soft and Hard Links and Dynamic and Static Libraries

From Beginner to Expert: Comprehensive Guide to Linux Soft and Hard Links and Dynamic and Static Libraries

Linux | Red Hat Certified | IT Technology | Operations Engineer 👇1000-person technical exchange QQ group, note [public account] for faster approval Soft and Hard Links Difference between Soft and Hard Links: Soft Link: It is an independent file with its own inode and inode number. Hard Link: It is not an independent file; it … Read more

Accelerate Python Programs Using Rust

Accelerate Python Programs Using Rust

Hey everyone! Today we’re going to talk about something exciting, Python slow? Not at all! I have always thought that Python is a great language, it’s clean and elegant, and the development efficiency is top-notch. But when it comes to performance-sensitive areas, the speed can really make you question life. Don’t worry, today I’m going … Read more

Setting Dynamic Library Path Parameters in Makefile

Setting Dynamic Library Path Parameters in Makefile

Table of Contents 1. Makefile Dynamic Library Related 1.1 Libs Variable 1.2 LDFLAGS Variable 1.3 Differences Between the Two 2. Configuration Methods 2.1 Specifying Library Path During Compilation 2.2 Specifying Library Path During Runtime 3. Testing 1. Makefile Dynamic Library Related 1.1 Libs Variable In a Makefile, Libs is typically a variable used to store … Read more

A Universal Makefile Template for Various Scenarios

A Universal Makefile Template for Various Scenarios

1. Introduction For development on Windows, many IDEs come with integrated compilers, such as Visual Studio, providing a “one-click compile” feature. After coding, you only need one operation to compile, link, and generate the target file. Linux development is different from Windows; typically, the gcc/g++ compiler is used on Linux. If you are developing Linux … Read more