1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

WTF?!?! XCode is not using math.h or cmath

Discussion in 'Mac Programming' started by bobber205, Jan 28, 2007.

  1. macrumors 68020

    bobber205

    #1
    Suddenly, I got a mysterious breakpoint in my code (didn't put it there.)

    I went ahead and stepped into the next line and my code suddently died. Some error about "receiving ARTH something or crap like that". :rolleyes:

    Anyway. After a while, I found out that if I take out any code related to math, such as % and dividing it runs. With % and / in there, I get a "executable path is nil".

    WTF?!
     
  2. macrumors 6502a

    #2
    Sounds very strange and I don't know if I can help but perhaps you have a problem with static member initialisation?

    I'm thinking that maybe you have some static variables that are not being initialised in the order that you think they should be. For example you may have a static variable in a file (.m, .c or .cpp) whose value you are using in another file, either in the initialisation of another static variable or in a calculation inside a function/method call.

    hope this helps

    b e n
     
  3. macrumors 68020

    bobber205

    #3
    Was dividing by zero. Thanks Xcode for so not pointing that out. :mad: Visual Studio 2005 did. ;)
     
  4. macrumors 6502a

    #4
    Doh, I thought it would be more obscure than that! Well there you go, glad you got it sorted out though!

    b e n
     

Share This Page