Ask how to create a. so shared library in KDevelop3.x
Source: Internet
Author: User
For more information about how to create a. so shared library in KDevelop3.x-general Linux technology-Linux technology and application, see the following. I am using kdevelop 3.5, that is, the built-in kdevelop in fedora 8.
My explanation on the official website for how to generate the. so file is as follows:
Http://www.kdevelop.org/mediawik... te_a _. so_library.3F
How to create a. so library?
Add a target to the project
Primary: program
Prefix: bin
File name: libxxx
Linker Flags-> Other:-shared-Wl,-soname, libxxx. so.1-o libxxx. so.1.0.1
However, on some systems it results in the following error message during project compilation:
-Soname command not recognized.
If that happens use only-shared-o libxxx. so
Add the cpp/h files to this target
Set compiler flags for c ++-fPIC
There is also a libtool based method:
Add a sub-project "libxxx"
Add a target
Choice "Library (libtool )"
Choice "lib"
Put your library name "xxx"
Add your files
Build the project (Use 'build project' or F.
Now, you shoshould have a new library named libxxx. so.0.0.0
Both methods have been tried. What is generated is not. so file. first, an error will be reported according to its original steps. -shared-WI added in the connection option at creation does not exist in the properties after the target is created. you have re-added the file to generate a file without a suffix. manually change it. so does not work either.
The second method generates a. la file or a text format. Er, I am not familiar with programming in Linux. I don't know what libtool. la is.
Who knows how to generate the. so file in Kdevelop3.5?
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service