Ask Makefile. am to connect to the shared library-Linux general technology-Linux technology and application information. The following is a detailed description. In Linux, cppunit is required for unit testing. cppunit has been compiled and installed successfully. header files are available in/usr/local/include/cppunit and dynamic library files are available in/usr/local/lib, including libcppunit. a libcppunit. la libcppunit. so and. so versions.
In the test program, use the autotools tool to automatically generate a test. One of the tests is written as follows (Note: All my source files start with test ):
Bin_PROGRAMS = testbase
Testbase_SOURCE = test _ *. h test _ *. cpp
Testbase_LDADD = libcppunit. la libbase. la
Here, libbase. la is a self-compiled library and installed in the/usr/local/lib directory. the following error occurs during make:
Make [1]: *** you can create the target "libcppunit. la" required by "testbase" without rules. Stop.
Then I changed it
Testbase_LDADD = $ (libdir)/libcppunit. la $ (libdir)/libbase. la
The file is found, but the library format is incorrect...
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