facebook

C/C++ configuration for cygwin libraries

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #272389 Reply

    LeeRhodes
    Member

    I have been developing and compiling small, self-contained C/C++ programs OK using myeclipse in the “Generated Makefile Builder” mode. MyEclipse is using the cygwin gcc/g++ compilers on a Windows XP pro, SP2 system. However, I need to link into the GSL libraries that are also downloaded under cygwin. For example, I can compile the following program OK from the command line:
    <pre>
    #include <stdio.h>
    #include <gsl/gsl_sf_bessel.h>

    int main (void)
    {
    double x = 5.0;
    double y = gsl_sf_bessel_J0 (x);
    printf (“J0(%g) = %.18e\n”, x, y);
    return 0;
    }
    </pre>
    But compiling from MyEclipse I get the error:<b>
    undefined reference to `_gsl_sf_bessel_J0′

    The command options are: <b>
    g++ -O0 -g3 -Wall -c -fmessage-length=0 -lgsl

    Somehow the function name got mangled with an added underscore, and of course, it doesn’t exist.

    Any help would be appreciated.
    Lee.

    #272474 Reply

    Riyad Kalla
    Member

    Moving to OT > Soft Dev

    Lee,
    Sorry for the confusion but the functionality you are using is actually from the CDT project from the Eclipse Foundation. MyEclipse doesn’t offer (and I just don’t know anything about it) any C/C++ tooling.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: C/C++ configuration for cygwin libraries

You must be logged in to post in the forum log in