Recent

Author Topic: How to check for linux prerequisites?  (Read 4246 times)

ivan17

  • Full Member
  • ***
  • Posts: 173
How to check for linux prerequisites?
« on: September 28, 2010, 04:04:02 am »
How do I check if the user system has needed libraries installed (gtk2 and gdk-pixbuf; or qt)?

I really would like to output some meaningful message instead of having...
Code: [Select]
./xlstd: error while loading shared libraries: ./xlstd: undefined symbol: gtk_tool_button_get_type... written on the stderr?

mica

  • Full Member
  • ***
  • Posts: 192
Re: How to check for linux prerequisites?
« Reply #1 on: September 28, 2010, 01:21:40 pm »
With ldd can you check the dependencies of your program

http://linux.die.net/man/1/ldd

or build a package (rpm or deb)
« Last Edit: September 28, 2010, 01:24:46 pm by mica »

ivan17

  • Full Member
  • ***
  • Posts: 173
Re: How to check for linux prerequisites?
« Reply #2 on: September 28, 2010, 10:20:58 pm »
With ldd can you check the dependencies of your program
i'm talking about a target (end-user's) system.

or build a package (rpm or deb)
well that is one way... but i'd like to check at runtime.

i was thinking something along the lines of trying to dynamically link to one of the needed libraries and seeing whether it was successful... that would probably be done from a separate (loader) program. anyone had any experience with that?