Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6350931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:54:16+00:00 2026-05-24T21:54:16+00:00

I have an application that relies on Qt, GDCM , and VTK , with

  • 0

I have an application that relies on Qt, GDCM, and VTK, with the main build environment being Qt. All of these libraries are cross-platform and compile on Windows, Mac, and Linux. I need to deploy the application to Linux after deploying on Windows. The versions of vtk and gdcm I’m using are trunk versions from git (about a month old), more recent than what I can get apt-get on Ubuntu 11.04, which is my current (and only) Linux deployment target.

What is the accepted method for deploying an application that relies on these kinds of libraries?

Should I be statically linking here, to avoid LD_LIBRARY_PATH? I see conflicting reports on LD_LIBRARY_PATH; tutorials like this one suggest that it’s the ‘right way’ to modify the library path to use shared libraries through system reboots. Others suggest that I should never set LD_LIBRARY_PATH. In the default version of GDCM, the installation already puts libraries into the /usr/local/lib directory, so those libraries get seen when I run ldd <my program>. VTK, on the other hand, puts its libraries into /usr/local/lib/vtk-5.9, which is not part of the LD_LIBRARY_PATH on most user’s machines, and so is not found unless some change is made to the system. Copying the VTK files into ‘/usr/local/lib’ does not allow ‘ldd’ to see the files.

So, how can I make my application see VTK to use the libraries?

On windows, deploying the dlls is very straightforward, because I can just include them in the installer, and the application finds them because they are in the local directory. That approach does not work in Linux, so I was going to have the users install Qt, GDCM, and VTK from whatever appropriate source and use the default locations, and then have the application point to those default locations. However, since VTK is putting things into a non-standard location, should I also expect users to modify LD_LIBRARY_PATH? Should I include the specific versions of the libraries that I want and then figure out how to make the executable look in the local directory for those libraries and ignore the ones it finds in the library path?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T21:54:18+00:00Added an answer on May 24, 2026 at 9:54 pm

    Every “serious” commercial application I have ever seen uses LD_LIBRARY_PATH. They invariably include a shell script that looks something like this:

    #!/bin/sh
    
    here="${0%/*}"  # or you can use `dirname "$0"`
    
    LD_LIBRARY_PATH="$here"/lib:"$LD_LIBRARY_PATH"
    export LD_LIBRARY_PATH
    exec "$0".bin "$@"
    

    They name this script something like .wrapper and create a directory tree that looks like this:

    .wrapper
    lib/  (directory full of .so files)
    app1 -> .wrapper (symlink)
    app1.bin (executable)
    app2 -> .wrapper (symlink)
    app2.bin (executable)
    

    Now you can copy this whole tree to wherever you want, and you can run “/path/to/tree/app1” or “/path/to/tree/app2 –with –some –arguments” and it will work. So will putting /path/to/tree in your PATH.

    Incidentally, this is also how Firefox and Chrome do it, more or less.

    Whoever told you not to use LD_LIBRARY_PATH is full of it, IMHO.

    Which system libraries you want to put in lib depends on which Linux versions you want to officially support.

    Do not even think about static linking. The glibc developers do not like it, they do not care about supporting it, and they somehow manage to break it a little harder with every release.

    Good luck.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a java application from which I build a jar that relies on
I have a python application that relies on a file that is downloaded by
I have a wxPython application that relies on an external config file. I want
We have an existing application that relies heavily on stored procedures and untyped DataSets.
I have an application that sends messages to an external web service. I build
I have a web application that relies on a MySQL database, for which I
I can successfully build a VB6 application that relies upon several DCOM settings on
I have 2 questions for you. Im creating an Application for Chat that relies
I have an ASP.NET application that relies on the Random class to generate a
We have an application with legacy code that relies on prototype, but we've found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.