under Linux sometimes compiled source files may have syntax errors, but many times still can generate dynamic library, this time, with dlopen Open There is no way to return a handle, resulting in a dynamic library can be generated, but not open, this time the best way is not Dlopen A method that is called dynamically, but instead uses a static call method.
1, in the test file with a static call the required header file, while the header file in the same directory as the test file, so that the test file can find the header file
2, the generated library location output to /usr/lib(if it is a system, it is in the /usr/lib64) folder
3. Compile-time reference My Code, gcc main.c-l.-lisucard-o main(main.c is the test code, the generated library is named libisucaed. So)
4, this time if the library has a problem, compile test files will be error, this time according to the location of the error correction can be, so that can locate where there is a problem. When you've done the wrong thing, you can get what you want.
After compiling and generating the dynamic library *.so under Linux, we find that there is an error resolution when opening with Dlopen.