wat_array instalation

This is a discussion on wat_array instalation within the C++ Programming forums, part of the General Programming Boards category; can anyone install the following library : Downloads - wat-array - wat_array : a wavelet tree library for myriad array ...

  1. #1
    Registered User
    Join Date
    Jan 2011
    Posts
    176

    wat_array instalation

    can anyone install the following library :

    Downloads - wat-array - wat_array : a wavelet tree library for myriad array operations - Google Project Hosting

    when i install it like this:


    tar -zvjf wat_array-0.0.6.tar.bz2
    cd wat_array-0.0.6
    ./waf configure
    ./waf
    sudo ./waf install


    Code:
    #include <iostream>
    
    #include <wat_array/wat_array.hpp>
    
    int main(){
    
    wat_array::WatArray wa;
    
    }
    i get the following message:


    /tmp/ccsF9ICT.o: In function `main':
    wat.cpp.text+0x10): undefined reference to `wat_array::WatArray::WatArray()'
    wat.cpp.text+0x1c): undefined reference to `wat_array::WatArray::~WatArray()'
    collect2: ld returned 1 exit status

    can anyone repeat this and tell me if he/she is receiving the same problem. and maybe knows the solution ??


    thank you

    baxy

  2. #2
    Registered User
    Join Date
    May 2009
    Posts
    2,478
    Did you try linking to the library wat_array?
    If the library does not exist you likely need to build it.

    Tim S.
    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the Universe is winning." Rick Cook

  3. #3
    Registered User
    Join Date
    Jan 2011
    Posts
    176
    ok so i have accidently changed

    g++ -L/usr/local/lib -I/usr/local/include -lwat_array -o wat wat.cpp

    to

    g++ wat.cpp -o wat -L/usr/local/lib -I/usr/local/include -lwat_array

    and it is working now. Why is this?? why does the order matter ?

    thank you

    baxy

  4. #4
    Registered User
    Join Date
    May 2009
    Posts
    2,478
    Quote Originally Posted by baxy View Post
    why does the order matter ?

    thank you

    baxy
    Order matter for most linkers.
    If object file A needs Object file B then most linkers require B to be after A.
    (Some linkers are in the opposite order; I have never used one of those linkers.)
    (Some linkers the order does not matter)

    Libraries are normally just a collection of object files; this is not always true; but, it is often true.

    Tim S.
    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the Universe is winning." Rick Cook

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. tc 3.0++ minimum instalation package
    By deian in forum Tech Board
    Replies: 2
    Last Post: 03-25-2005, 02:27 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21