Professional Web Applications Themes

make errors - UNIX Programming

Hi, I'm having trouble with compiling some examples in an open source software. The Makefile is provided, following is the command and the error: g++ image_open.o -L/rstc/user1/erc/pushkar/ossim/lib -L/rstc/user1/erc/pushkar/ossim/src/packages/gdal -L/usr/local/mpi/lib -L/rstc/user1/erc/pushkar/ossim/lib/.libs -lossim_init -lossim_plugin -lossim_visualsim -lossim_parallel -lossim_vec -lossim_imaging -lossim_projections -lossim_elevation -lossim_support_data -lossim_vec -lossim_vpfutil -lossim_font -lossim_base -lossim_polyclip -lossim_matrix -lmpich -lpmpich -L/usr/lib -lfreetype -lgdal -ljpeg -lgif -lpng -lz -lm -ldl -lutil -o image_open /usr/local/gnu/bin/ld: cannot find -lgdal collect2: ld returned 1 exit status make: *** [image_open] Error 1 You can see above the path to the gdal dir. is specified (...src/packages/gdal) but in order to link to the static lib. I forced it like ...

  1. #1

    Default RE: make errors

    Hi,
    I'm having trouble with compiling some examples in an open source
    software. The Makefile is provided, following is the command and the error:
    g++ image_open.o -L/rstc/user1/erc/pushkar/ossim/lib
    -L/rstc/user1/erc/pushkar/ossim/src/packages/gdal
    -L/usr/local/mpi/lib -L/rstc/user1/erc/pushkar/ossim/lib/.libs
    -lossim_init -lossim_plugin -lossim_visualsim -lossim_parallel
    -lossim_vec -lossim_imaging -lossim_projections -lossim_elevation
    -lossim_support_data -lossim_vec -lossim_vpfutil -lossim_font
    -lossim_base -lossim_polyclip -lossim_matrix -lmpich -lpmpich
    -L/usr/lib -lfreetype -lgdal -ljpeg -lgif -lpng -lz -lm -ldl
    -lutil -o image_open
    /usr/local/gnu/bin/ld: cannot find -lgdal
    collect2: ld returned 1 exit status
    make: *** [image_open] Error 1

    You can see above the path to the gdal dir. is specified
    (...src/packages/gdal) but in order to link to the static lib. I forced
    it like this:
    -L/rstc/user1/erc/pushkar/ossim/src/packages/gdal/.libs/libgdal.a

    Even then I get the same error. (Both libgdal.so and libgdal.a are in
    this .libs dir.) Can you tell what's wrong?
    Pushkar

    Pushkar Guest

  2. #2

    Default Re: make errors



    Pushkar Pradhan wrote: 

    Not correct - this switch tells the linker to look in the directoryt
    named /rstc/user1/erc/pushkar/ossim/src/packages/gdal/.libs/libgdal.a
    for a library files. Of course, there is no such directory.

    If the libraries are indeed in
    /rstc/user1/erc/pushkar/ossim/src/packages/gdal, then the above link
    line looks correct. Perhaps the permissions are incorrect.

    To ensure satatic library is used, check your compiler/linker options.
    There should be something like "-static" or "-static_shared" available. 

    --
    Fred L. Kleinschmidt
    Boeing Associate Technical Fellow
    Technical Architect, Common User Interface Services
    M/S 2R-94 (206)544-5225
    Fred Guest

  3. #3

    Default Re: make errors


    "Fred L. Kleinschmidt" <com> writes:
     
    >
    > Not correct - this switch tells the linker to look in the directoryt
    > named /rstc/user1/erc/pushkar/ossim/src/packages/gdal/.libs/libgdal.a
    > for a library files. Of course, there is no such directory.
    >
    > If the libraries are indeed in
    > /rstc/user1/erc/pushkar/ossim/src/packages/gdal, then the above link
    > line looks correct. Perhaps the permissions are incorrect.
    >
    > To ensure satatic library is used, check your compiler/linker options.
    > There should be something like "-static" or "-static_shared" available. [/ref]

    If the library really is in this .libs directory (what is the purpose
    of that?) then the link option should be

    -L/rstc/user1/erc/pushkar/ossim/src/packages/gdal/.libs

    -SEan

    Sean Guest

Similar Threads

  1. #39389 [NEW]: make some errors catchable
    By corinl at gmx dot de in forum PHP Bugs
    Replies: 2
    Last Post: November 6th, 09:10 AM
  2. make buildworld errors
    By luke in forum FreeBSD
    Replies: 3
    Last Post: March 21st, 04:00 PM
  3. Solaris sendmail errors: How to make go away
    By Kenny in forum UNIX Programming
    Replies: 18
    Last Post: October 13th, 05:26 AM
  4. #25277 [Opn->Csd]: Errors with mcve on make
    By sniper@php.net in forum PHP Development
    Replies: 0
    Last Post: August 30th, 10:59 AM
  5. #25277 [Fbk->Opn]: Errors with mcve on make
    By jonathan dot patenaude at sympatico dot ca in forum PHP Development
    Replies: 0
    Last Post: August 29th, 03:46 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139