您好,欢迎进入兰州桑拿休闲会所官网!

全国咨询热线

19885911436

兰州附近昨天桑拿洗浴服务内容绝了

2021-10-22 13:46:38 浏览次数:
so files under Li兰州附近昨天桑拿洗浴服务内容绝了nux are similar to *.dll on windows. They are both shared library, which contain commonly-used functions/classes. The shared library can be loaded into memory whenever needed and if there is a copy in RAM, the OS won’t have to load it again.

There is usually a reference counter for each shared library loaded into RAM and the OS keeps a track of the applications/programs that are still using the shared library and it is up to the OS to decide when to free the shared library from RAM, which is usually when the reference counter falls to zero (no programs are using).

For simple and effective demonstration, I am going to create a small shared library using C++ (not C) and compile it under Ubuntu using GNU C++ Compiler. Finally, I am going to load it in a Python script.

Calling C++ shared library from Python

Let us create a folder under /home/pi/TestLib and let us also use your favourite text editor (vi, vim, nano, geditor etc) to create a simple C++ shared library.

 

The -Wall compiler directive prints all warning messages. The -shared tells to compile the source code into a *.so file and -o specifies the output file name. The -O3 turns on all optimisation.

Now we have the shared library TestLib.so which is located at /home/pi/TestLib.

Let us create a simple Python script that invokes the shared library function to add two integers.

友情链接:

19885911436