Thread: attempted static link of dynamic object

  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    269

    attempted static link of dynamic object

    Hi,

    In my lib dir, I have things like
    libeventpath.a and libeventpath.so


    When I try to compile and link to libeventpath.a I get the following error:

    Code:
    /usr/bin/ld: attempted static link of dynamic object `/global/homes/h/habb/jmp/lib/libevpath.so'
    The command I'm using to compile is:

    Code:
    CC  -DHAVE_CONFIG -I.   -I/global/homes/h/habb/jmp/include  -g -O0 -c -o manager.o manager.c
    
    /bin/sh ./libtool --tag=CC   --mode=link CC   -g -O0 -o manager manager.o -L/global/homes/h/habb/jmp/lib	 -leventpath -latl -lpthread -lrt -ltiming
    However, this stinking libtool thing produces this:

    Code:
    libtool: link: CC -g -O0 -o manager manager.o  -L/global/homes/h/habb/jmp/lib /global/homes/h/habb/jmp/lib/libeventpath.so /global/homes/h/habb/jmp/lib/libgen_thread.so /global/homes/h/habb/jmp/lib/libffs.so /global/homes/h/habb/jmp/lib/libcod.so /global/homes/h/habb/jmp/lib/libdill.so -lm /global/homes/h/habb/jmp/lib/libfm.so /global/homes/h/habb/jmp/lib/libcercs_env.so -ldl /global/homes/h/habb/jmp/lib/libatl.so -lpthread -lrt -ltiming
    All of those other things are which eventpath depends upon, but why is libtool using the .so instead of the .a?

  2. #2
    Registered User
    Join Date
    May 2010
    Posts
    269
    I copied and pasted what libtool was outputting, and changed the .so to .a and it works.

    Any idea as to why libtool is suddenly looking for the .so's?

    How to fix this?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. using VC6 link VC7 static lib error
    By George2 in forum C++ Programming
    Replies: 5
    Last Post: 06-29-2006, 10:58 PM
  2. about static link
    By George2 in forum C++ Programming
    Replies: 2
    Last Post: 06-13-2006, 06:28 PM
  3. Replies: 19
    Last Post: 01-12-2006, 11:04 AM
  4. Static Control Link?
    By Devil Panther in forum Windows Programming
    Replies: 5
    Last Post: 05-15-2004, 10:45 AM
  5. Static link libraries on other computers
    By bennyandthejets in forum C++ Programming
    Replies: 6
    Last Post: 11-05-2003, 06:01 PM