Search code examples
eclipse-cdtlibtool

how can I use eclipse to debug a libtool generated script?


I have a large c++ project built with libtool. the problem is that eclipse will not run a libtool generated script, and I get a "Program is not a recognized executable." error message. how can I use eclipse debugger? I'm currently using kdevelop3 as an editor and debugging with insight.. which is horrible.

I could perhaps run the actual executable, thats in the ./libs of the project directory, but then I would have to manually set LD_LIBRARY_PATH and stuff like that... there must be a better way to so this.

any help would be appreciated!


Solution

  • Running a script instead of an executable is still unsupported in Eclipse, see this bug. Until the feature is introduced, you cannot debug a libtool-enabled project under Eclipse unless you keep something like a

        path/to/configure --disable-shared
    

    separate configuration, thus relying on static linking only for debugging purposes.

    To do that, you

    1. Open Project|Properties from the top menu

    2. Select Autotools|Configure Settings from the left menu of the window

    3. (Optionally) Create a new build configuration with a dedicated C/C++ Build|Builder Settings|Build location

    4. Under configure|Advanced, fill the "Additional command-line options" with --disable-shared