static link, core use function glXGetProcAddressARB ( GL )
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 http://packages.ubuntu.com/lucid/libgl1-mesa-swx11-dev, but standard commands .\configure, make,sudo make install give only libGL.so (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