×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Registered User
    Join Date
    Aug 2006
    Posts
    16

    libc\math.h problem

    hey all
    i got a problem
    am writing a series60 3rd edition application and am using the functions cos(), sin () , atan2() ....etc.
    when i first compiled the application there was a refrence error , the compiler coundn't c the math.h file
    i came in the linker part i added the \Symbian\9.1\S60_3rd\Epoc32\include\libc
    since i read in the sdk that the location is libc\math.h
    it's working fine on the emulator
    but when trying to build a release , here comes the porblem
    undefined reference to 'cos'
    undefined reference to 'sin'
    undefined reference to 'atan2'
    etcccc
    note : i need to use the atan2 fucntion in the math.h which i didnt find in the e32math
    thanx 4 ur help

  2. #2
    Super Contributor
    Join Date
    Aug 2005
    Location
    india
    Posts
    2,078

    Re: libc\math.h problem

    hi,

    include this line in ur mmp
    SYSTEMINCLUDE \epoc32\include \epoc32\include\libc
    will work fine...

    Regards,
    Mateen Maldar
    "Whatever the mind can conceive and believe, the mind can achieve"

  3. #3
    Registered User
    Join Date
    Aug 2006
    Posts
    16

    Re: libc\math.h problem

    i've done so
    and nothing new happenned

  4. #4
    Super Contributor
    Join Date
    Aug 2005
    Location
    india
    Posts
    2,078

    Re: libc\math.h problem

    hi,

    when u make changes to mmp file it needs a rebulit ..

    clean the epoc32 directory and remove ur application from the epoc32
    and then make a new build.....

    Regards,
    Mateen Maldar
    "Whatever the mind can conceive and believe, the mind can achieve"

  5. #5
    Registered User
    Join Date
    Aug 2006
    Posts
    16

    Re: libc\math.h problem

    i've done so
    n nuthing new as i told ya

  6. #6
    Registered User
    Join Date
    Aug 2006
    Posts
    16

    Re: libc\math.h problem

    do u know the lib of this math.h ?!!

  7. #7
    Super Contributor
    Join Date
    Aug 2005
    Location
    india
    Posts
    2,078

    Re: libc\math.h problem

    hi,

    in Symbian C++ programming u have math.h in the include directory of epoc32 lib folder and s e32math.h in the include folder used in symbian for mathematical operations ....
    Location: e32math.h
    Link against: euser.lib

    Class Math
    Regards,
    Mateen Maldar
    Last edited by mateen_maldar; 2006-09-18 at 11:53.
    "Whatever the mind can conceive and believe, the mind can achieve"

  8. #8
    Registered User
    Join Date
    Aug 2006
    Posts
    16

    Re: libc\math.h problem

    am sorry 4 disturbing u
    but the atan2 () function
    not found in the e32math.h
    thanx 4 ur helpp
    byeee

  9. #9
    Super Contributor
    Join Date
    Jun 2006
    Location
    Moscow, Russia
    Posts
    803

    Re: libc\math.h problem

    Math::ATan() has 2 overloads. The second one does the same as atan2() as I understand:

    ATan()
    static IMPORT_C TInt ATan(TReal &aTrg, const TReal &aSrcY, const TReal &aSrcX);
    Description
    Calculates the angle between the x-axis and a line drawn from the origin to a point represented by its (x,y) co-ordinates.
    The co-ordinates are passed as arguments to the function. This function returns the same result as arctan(y/x), but:

    1. it adds +/-pi to the result, if x is negative

    2. it sets the result to +/-pi/2, if x is zero but y is non-zero.

    Parameters
    TReal &aTrg A reference containing the result in radians, a value between -pi exclusive and +pi inclusive.

    const TReal &aSrcY The y argument of the arctan(y/x) function.

    const TReal &aSrcX The x argument of the arctan(y/x) function.

    Return value
    TInt KErrNone if successful, otherwise another of the system-wide error codes.
    Regards,
    ivey

  10. #10
    Super Contributor
    Join Date
    Aug 2005
    Location
    india
    Posts
    2,078

    Re: libc\math.h problem

    hi,

    the func atan2 is not there in e32math.h but in
    Location: libc\math.h

    atan2()
    IMPORT_C double atan2(double, double);
    Check the documentation for the function that u need and then use the appropritate headers ....

    Regards,
    Mateen Maldar
    "Whatever the mind can conceive and believe, the mind can achieve"

  11. #11
    Registered User
    Join Date
    Aug 2006
    Location
    Poland
    Posts
    36

    Re: libc\math.h problem

    Dear speed7156,
    Please, Tell me what is the IDE used to build your project? ... I think this will help me to solve your problem.
    Thank you,
    Mido

  12. #12
    Registered User
    Join Date
    Aug 2006
    Posts
    16

    Re: libc\math.h problem

    heyy
    am using codewarrior

  13. #13
    Registered User
    Join Date
    Aug 2006
    Posts
    16

    Re: libc\math.h problem

    does it help!?

  14. #14
    Registered User
    Join Date
    Aug 2006
    Location
    Poland
    Posts
    36

    Re: libc\math.h problem

    Another question :
    Did you Link against: estlib.lib
    Thank you,
    Mido

  15. #15
    Registered User
    Join Date
    Aug 2006
    Posts
    16

    Re: libc\math.h problem

    yess
    i've done so
    and nuthing new

Similar Threads

  1. Problem with eglSwapBuffers and heap corruption
    By greatape in forum Symbian Media (Closed)
    Replies: 2
    Last Post: 2007-05-24, 03:35
  2. netcards - Problem with opening adapter
    By kernj in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2007-01-10, 08:56
  3. WAP service problem on Apache
    By bigg_o in forum Browsing and Mark-ups
    Replies: 3
    Last Post: 2005-04-17, 16:05
  4. Problem: S60 SDK for CW in PC with .NET
    By anttij in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2005-02-28, 11:36

Posting Permissions

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