#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    18
    Rep Power
    0

    Calling a function in .so


    Hello

    I am working on C++ code i have compiled the code it has generated .so files

    Code:
    class A
    {
    sum()
    }
    A-->compiled-->A.so

    now my requirement is to call a sun() function from
    some other function that i have written.

    like this

    Code:
    main()
    {
    sum();--->here class A's sum() must be called.
    }
    How can i call sum() from main()?


    any help is highly appriciated.


    Regards
    Revathi R
  2. #2
  3. No Profile Picture
    Still Learning
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Location
    Montreal, Canada
    Posts
    55
    Rep Power
    39
    You have to look into linking to shared object libraries.

    do a search for those terms. You will find links link this
    http://www.cplusplus.com/forum/unices/33532/

IMN logo majestic logo threadwatch logo seochat tools logo