PDA

View Full Version : static linking OpenVG



carbonytte
07-06-2010, 11:41 PM
Hi.

I'm still new to OpenVG. Recently I got a code that needed to use OpenVG files, so I downloaded the OpenVG header files and other include files (GLES etc) into ~/OpenVG , ~/GLES and some other folders, and reroute the include locations of the files respective to ~/<folder location>.

I was able to compile, however I wanted to improve the code by static linking it.

However, I got an error :

ld: cannot find -lOpenVG

I'm thinking that this has something to do with /usr/lib, am I right? Unsure what to do here already (since when I removed the -static flag, it seems okay).

jpilon
07-10-2010, 04:50 PM
You need a static variant of the libs in your library path. But it's quite possible the libs your linking against are just a thine layer which will dlopen the re-implementation. Even if it's not, a lot of implementations require that you use the shared variant of the libs since it might depend on constructors.

But amusing, you succeed in linking against a static variant, you'll likely gain little efficiency when compared to everything that's required to render the graphics. You're much better off optimizing your application.