library is linked but reference is undefined

前端 未结 3 1924
太阳男子
太阳男子 2020-12-01 06:05

I\'m trying to compile an openCL program on Ubuntu with an NVIDIA card that worked once before,

#include 
#include 
#include &         


        
3条回答
  •  一个人的身影
    2020-12-01 06:37

    Alternatively you can add the header and library path to your global variables.

    export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/usr/local/cuda/include
    export LIBRARY_PATH=$LIBRARY_PATH:/usr/lib/nvidia-current
    

    You can also try to set

    export PATH=$PATH:/usr/local/cuda/bin
    

    It should be possible to run now

    g++ opencl.cpp
    

提交回复
热议问题