RE: make errors
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > RE: make errors




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    RE: make errors  
Pushkar Pradhan


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
02-17-04 01:34 PM

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






[ Post a follow-up to this message ]



    Re: make errors  
Fred L. Kleinschmidt


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
02-18-04 07:34 AM



Pushkar Pradhan wrote:
>
> 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

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.
>
> 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

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





[ Post a follow-up to this message ]



    Re: make errors  
Sean Burke


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
02-18-04 09:34 AM


"Fred L. Kleinschmidt" <fred.l.kleinschmidt@nospam_boeing.com> writes:

> 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. 

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






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 03:04 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register