Solutions for undefined reference to ‘xxx’ encountered during linking

The solution of undefined reference to ‘xxx’ encountered when linking.

Note: when adding the library, remember to add the address of the library.

1.undefined reference to `cuInit’

Plus Library

-lcuda

 

2.  undefined reference to symbol ‘_ ZN5boost6system15system_ categoryEv’

Solution: Add Link Library:

-lboost_system

3.undefined reference to ‘cv::String::allocate(unsigned long)’

Solution: Add Link Library:

-lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_videoio -lopencv_imgcodecs

[UNK]

[UNK]

[UNK]

[UNK]

[UNK]

[UNK]

Read More: