Author Topic: Trying to compile in xcode some simple code. 4 errors.  (Read 1759 times)

Offline mykyl66

  • Mr. Polyvector
  • ***
  • Posts: 114
    • View Profile
Hi,

I am trying to compile in xcode a simple test app saving and creating some files and then opening them on a new run of the app.

This is what the results in xcode are.

Any ideas as to what may be causing this? I have no idea what this battery thing is that is being called.

Cheers

Mike R

"_max", referenced from:


      _iPhoneBattery in libGLBasiciPhone-egl.a(iPhoneAppController.o)


  "_min", referenced from:


      _iPhoneBattery in libGLBasiciPhone-egl.a(iPhoneAppController.o)


ld: symbol(s) not found


collect2: ld returned 1 exit status


Ld build/iPhone.build/Release-iphoneos/iPhone.build/Objects-normal/armv6/character_creator normal armv6
cd /Users/mykyl/Desktop/XCode/GLBasic
setenv IPHONEOS_DEPLOYMENT_TARGET 3.0
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk -L/Users/mykyl/Desktop/XCode/GLBasic/build/Release-iphoneos -L/Users/mykyl/Desktop/XCode/GLBasic/Lib -F/Users/mykyl/Desktop/XCode/GLBasic/build/Release-iphoneos -filelist /Users/mykyl/Desktop/XCode/GLBasic/build/iPhone.build/Release-iphoneos/iPhone.build/Objects-normal/armv6/character_creator.LinkFileList -dead_strip -lstdc++ -miphoneos-version-min=3.0 -framework Foundation -framework UIKit -framework OpenGLES -framework QuartzCore -framework AudioToolbox -framework CoreLocation -framework OpenAL -lGLBasiciPhone-egl -lpng-gf -lPROGRAM -framework MediaPlayer -o /Users/mykyl/Desktop/XCode/GLBasic/build/iPhone.build/Release-iphoneos/iPhone.build/Objects-normal/armv6/character_creator

Undefined symbols:
  "_max", referenced from:
      _iPhoneBattery in libGLBasiciPhone-egl.a(iPhoneAppController.o)
  "_min", referenced from:
      _iPhoneBattery in libGLBasiciPhone-egl.a(iPhoneAppController.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status

MrTAToad

  • Guest
Do you have the correct version of XCode installed and compiling for the correct OS version ?  Are you using 10.6 ?

That message means the min & max functions couldn't be found for some reason.  I dont think its a problem with GLBasic as everyone would be having it...
« Last Edit: 2010-Sep-01 by MrTAToad »

Offline mykyl66

  • Mr. Polyvector
  • ***
  • Posts: 114
    • View Profile
I am on Snow leopard, and yes I am compiling for the correct version, Version 4 with deployment to 3.2. This is the same as with all my other recent test bits of code. This only happened since the newest update.

I have not changed the way I do my compiling of the xcode projects. Exactly the same as I have always done it. Just for some reason I am getting this error now.

Cheers for trying to help though.

Mike R

MrTAToad

  • Guest
Try adding in :

Code: (glbasic) [Select]
#define max(x, y) ((x) > (y) ? (x) : (y))
#define min(x, y) ((x) < (y) ? (x) : (y))

as a temporary measure

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10752
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
no, the update failed. I fixed it a minute after, but you were too quick.

unzip the old editor and redo the update.

Offline mykyl66

  • Mr. Polyvector
  • ***
  • Posts: 114
    • View Profile
I would try Gernot but I have not found any application that can unzip the backup files glbasic makes. I have tried winrar, winzip and the default stuff built into Windows xp. I always get an error so never rely on the backup system in GlBasic.

Trying something else now.

Edit: Right I re-downloaded the full version and reinstalled and that fixed it. No more errors. Thanks.

Cheers

Mike R
« Last Edit: 2010-Sep-02 by mykyl66 »