Use the command
GCC IA_utilities.o-dynamiclib -o libia_Utilities.dylib error generating dynamic library.
The error prompt statement is as follows, showing that undefined symbols have been used.
Undefined symbols for architecture x86_64: ... ... ... ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
I forgot to keep the specific error reporting process in the middle
... part is some error tips, which indicate that some variables and functions set in
kdtree cannot be found.
kdtree.H files exist under my project directory. Compile
IA_Utilities.C everything is normal when this file is. I struggled for a day and couldn’t find a way for
GCC to find these two files.
So in a rage, I directly added the contents of
IA_Utilities.C file, and the reference to kdtree in this file is cancelled.
Therefore, the dynamic library is successfully generated again.
Obviously, the error occurs because the linker of GCC cannot find the function in kdtree.
- Iosbug debug-01-error-duplicate symbols for architecture
- [Solved] LD: library not found for – XXX when Xcode compiles code
- error adding symbols: DSO missing from command line
- undefined symbol: xxx – undefined reference to `typeinfo
- [Solved] QT Error: symbol(s) not found for architecture x86_64
- LIBRARY_ Path and LD_ LIBRARY_ The difference of path environment variable
- Hi3516DV300 Chip Error: “undefined reference to ×”
- Error link: fatal error lnk1158: unable to run ‘RC. Exe’
- Solve the problem of link: fatal error LNK1104: unable to open the file “d3dx9. Lib”