CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2007
    Location
    Bangalore India
    Posts
    262

    building using shell file is giving error

    Hello Guys,

    I am facing a strange problem.

    My shell file build.sh contains

    Code:
    g++ -o Client *.cpp -I ../ace5.5.static -lACE -L ../ace5.5.static/ace
    when I run the shell file to do the build.

    I am getting following error.

    Code:
    -bash-2.05b$ ./build.sh
    /usr/bin/ld: cannot find -lACE
    collect2: ld returned 1 exit status
    -bash-2.05b$
    But when I run this without shell file directly in the shell it comiles all right...
    Code:
    -bash-2.05b$ g++ -o Client *.cpp -I ../ace5.5.static -lACE -L ../ace5.5.static/ace
    -bash-2.05b$
    Any help will be highly appreciated.

    Regardds
    Prashant.
    Dont forget to rate my post if you find it useful.

  2. #2
    Join Date
    Jan 2004
    Location
    Düsseldorf, Germany
    Posts
    2,401

    Re: building using shell file is giving error

    The error message indicates that ld is interpreting -lACE as an argument, not as an option. The only reason for that that I can see, is if *.cpp evaluates to an empty string, which would be very odd behaviour.

    Please post the complete shell script.
    More computing sins are committed in the name of efficiency (without necessarily achieving it) than for any other single reason - including blind stupidity. --W.A.Wulf

    Premature optimization is the root of all evil --Donald E. Knuth


    Please read Information on posting before posting, especially the info on using [code] tags.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured