static link, core use function glXGetProcAddressARB ( GL )

asked 2014-09-29 06:18:33 -0500

fedor gravatar image

updated 2014-09-29 09:15:12 -0500

Hi all ! I try to build my program using g++ on Ubunta 14.04. When I build it without -static all works good, but when I add it, g++ not found many functions ( from tbb, jbg, pthread, gl ). I found packages containing all func, except glXGetProcAddressARB(). How I understand, it's in the libGL.a containing only in this package, but standard commands .\configure, make,sudo make install give only (need libGL.a). Searched in /usr/lib , folder with make, all computer. How can I fix it ?

error :

/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libopencv_core.a(gl_core_3_1.cpp.o): In function `IntGetProcAddress(char const*)':
(.text._ZL17IntGetProcAddressPKc+0x15): undefined reference to `glXGetProcAddressARB'

build with command :

g++ -I/usr/include/opencv2 -L/usr/lib -g -o binary -static  source.cpp -lopencv_imgproc  -lopencv_highgui -lopencv_core -lpng -ltiff -ljpeg -ljasper -lrt -lIlmImf -lImath -lIex -lIlmThread -lHalf -lz -lpthread -llzma -ljbig2dec -ljbig -ltbb -lpthread
edit retag flag offensive close merge delete