A problem about library dependency in C ++ in LINUX-general Linux technology-Linux programming and kernel information. For details, refer to the following section. Program in SUSE, compile C ++ in eclipse3.2, and use the GCC/ICC compiler.
1. a static database named a. o has been created, including a1, a2, a3...... and other functions;
2. Create a static database B. o, B. o to use. some functions in o, B. the functions in o are b1, b2, b3 .... and so on;
3. Finally, I used B in MY project. a. the function in o cannot be found during connection. o, and an error occurs. (library a and its path are added to the project attributes)
4. In this case, if, in MY, you use a function in a. o, such as a1, and the other is exactly the same as step 3, the compilation connection is normal.
This is the dependency of database B on database a. When linking database a, it should be placed behind database B, similar to gcc-o my. o B. o. o or gcc-o my. o-lb-la
After the test, the problem is solved. In either case, add the database in order or use the functions in the dependent database in your code.
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.