In the Linux system compiled link error, prompt "undefined reference & rsquo; dlclose@xxx function" error, I believe many users also encountered this The problem, this problem is not difficult to solve, the following small series for everyone to introduce the solution to the undefined reference error.
compiled link time, reported an undefined reference & rsquo; dlclose @ xxx main function & lsquo ;, looking away over looked at, say dl library does not go bag, checked the library is dl Used to do dynamic library loading (dynamic load), the project uses libmysqld.so, after adding, there is still a problem, the -ldl link option can be changed to the end.
More common undefined reference problems:
1.dl library
undefined reference to ‘dlerror’
undefined reference to ‘dlopen’< Br>
undefined reference to ‘dlerror’
Add -ldl link option (-l is the prefix of the link option)
2.pthread library
undefined reference To ‘pthread_create’
undefined reference to ‘pthread_xxxx‘
Add -lpthread link option
3.rt library
undefined reference to `clock_gettime&rsquo ;
Add -lrt link option
If you are using codeblocks, you can add the link option again, but because of the dependency order, if the link option is added or an error is reported, add it directly in the link file. Pthread dl rt, etc.
If it is your own library, this undefined reference function, first check the source code of the library to see the specific problem.
The above is the solution to the Linux compiler link error. In addition to introducing the link error, this article also summarizes some undefined reference problems, I hope to help you.
Ubuntu is a kind of Linux system. The biggest feature is that it has a software cen
Linux users when viewing the system log found that the iis server could not load the application /lm
In the Linux system, the make command is usually used with the Makefile. What are t
In Linux commands, we will often use cd, ls and other commands, but commands like touch are less use
How to solve the shell script stop execution when the Linux system is scheduled?
How does Linux modify the PATH path of sudo?
Linux routing command operation example summary
Linux prompts gzip:stdin:not when extracting tar.gz file?
How to use Linux to use grep command to search for text files
How to cancel the screen lock function in Ubuntu system
What should I do if libpng fails to compile after Gentoo upgrade?
What should I do when I prompt Unencrypted connection when Oracle Linux 5 remote telnet?
Windows 7 system Aero effects issues
Teach you how to check the hardware configuration of the computer
CF crazy sheep activity website sharing and event content introduction
Win7 uses iis to build a web server to realize information browsing resource sharing
WeChat PC version installation and use of graphic tutorial
Win10 preview version of the virtual desktop use and operation skills graphic introduction
Increase the cost of multiple browsers, enterprise users should only use IE10
How to solve the request timeout when Win7 computer Ping DNS?