linux编译常见的undefined reference问题

1.dl库
undefined reference to ‘dlerror’
undefined reference to ‘dlopen’
undefined reference to ‘dlerror’
增加-ldl链接选项 (-l是链接选项的前缀)
2.pthread库
undefined reference to ‘pthread_create’
undefined reference to ‘pthread_xxxx‘
增加-lpthread链接选项
3.rt库
undefined reference to `clock_gettime’
增加-lrt链接选项

4.boost库

undefined reference to `boost::locale::generator::generator()'

增加链接库选项 -lboost_locale

 

boost支持的库

- atomic

    - chrono

    - container

    - context

    - coroutine

    - coroutine2

    - date_time

    - exception

    - fiber

    - filesystem

    - graph

    - graph_parallel

    - iostreams

    - locale

    - log

    - math

    - metaparse

    - mpi

    - program_options

    - python

    - random

    - regex

    - serialization

    - signals

    - system

    - test

    - thread

    - timer

    - type_erasure

    - wave


版权声明:本文为yjianlu原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。