Build errors trying to run the tutorial templates

View previous topic View next topic Go down

Build errors trying to run the tutorial templates

Post  EssentialParado on Sun Jul 05, 2009 9:06 am

I tried compiling both tutorial 1 and tutorial 2 and am getting 7 build errors on each.

//EDIT: This looks like a similar issue as in this thread… http://sio2interactive.forumotion.net/about-the-sdk-f1/tutorials-having-linking-issues-solved-t736.htm – but I looked at the Project Settings and am not sure what needs changing…

Build Architecture: Standard (iPhone Simulator)
Build Base SDK: Simulator - iPhone OS 2.2.1



Code:

Building target “tutorial02” of project “template” with configuration “Debug” — (7 errors)
       cd /Developer/SDKs/SIO2_SDK_v1/tutorial02
    setenv MACOSX_DEPLOYMENT_TARGET 10.5
    setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.0 -arch ppc -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.2.1.sdk -L/Developer/SDKs/SIO2_SDK_v1/tutorial02/build/Debug-iphonesimulator -L/Developer/SDKs/SIO2_SDK_v1/tutorial02/../src/sio2 -F/Developer/SDKs/SIO2_SDK_v1/tutorial02/build/Debug-iphonesimulator -filelist /Developer/SDKs/SIO2_SDK_v1/tutorial02/build/template.build/Debug-iphonesimulator/tutorial02.build/Objects-normal/ppc/tutorial02.LinkFileList -mmacosx-version-min=10.5 -framework Foundation -framework UIKit -framework OpenGLES -framework QuartzCore -framework OpenAL -lsio2_dev -lsio2_sim -shared-libgcc -lstdc++-static -o /Developer/SDKs/SIO2_SDK_v1/tutorial02/build/Debug-iphonesimulator/tutorial02.app/tutorial02
ld warning: in /Developer/SDKs/SIO2_SDK_v1/src/sio2/libsio2_dev.a, file is not of required architecture
ld warning: in /Developer/SDKs/SIO2_SDK_v1/src/sio2/libsio2_sim.a, file is not of required architecture
ld warning: can't add line info to anonymous symbol __text@0 from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.2.1.sdk/usr/lib/libstdc++-static.a(eh_personality.o)
ld warning: can't add line info to anonymous symbol __text@0 from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.2.1.sdk/usr/lib/libstdc++-static.a(cp-demangle.o)
Undefined symbols:
  "sio2Shutdown()", referenced from:
      templateShutdown()    in template.o
  "sio2InitAL()", referenced from:
      -[EAGLView createFramebuffer] in EAGLView.o
  "sio2InitGL()", referenced from:
      -[EAGLView createFramebuffer] in EAGLView.o
  "sio2PngRead(png_struct_def*, unsigned char*, unsigned long)", referenced from:
      __Z11sio2PngReadP14png_struct_defPhm$non_lazy_ptr in sio2_image.o
  "_sio2", referenced from:
      _sio2$non_lazy_ptr in templateAppDelegate.o
      _sio2$non_lazy_ptr in EAGLView.o
      _sio2$non_lazy_ptr in template.o
      _sio2$non_lazy_ptr in sio2_camera.o
      _sio2$non_lazy_ptr in sio2_emitter.o
      _sio2$non_lazy_ptr in sio2_font.o
      _sio2$non_lazy_ptr in sio2_image.o
      _sio2$non_lazy_ptr in sio2_ipo.o
      _sio2$non_lazy_ptr in sio2_lamp.o
      _sio2$non_lazy_ptr in sio2_material.o
      _sio2$non_lazy_ptr in sio2_soundbuffer.o
      _sio2$non_lazy_ptr in sio2_resource.o
      _sio2$non_lazy_ptr in sio2_sensor.o
      _sio2$non_lazy_ptr in sio2_physic.o
      _sio2$non_lazy_ptr in sio2_script.o
      _sio2$non_lazy_ptr in sio2_sound.o
      _sio2$non_lazy_ptr in sio2_object.o
      _sio2$non_lazy_ptr in sio2_mist.o
      _sio2$non_lazy_ptr in sio2_widget.o
      _sio2$non_lazy_ptr in sio2_video.o
      _sio2$non_lazy_ptr in sio2_vertexgroup.o
      _sio2$non_lazy_ptr in sio2_utils.o
      _sio2$non_lazy_ptr in sio2_timer.o
      _sio2$non_lazy_ptr in sio2_stream.o
      _sio2$non_lazy_ptr in sio2_window.o
  "sio2Init(int*, char**)", referenced from:
      -[EAGLView createFramebuffer] in EAGLView.o
  "sio2OggClose(void*)", referenced from:
      _sio2SoundBufferFree in sio2_soundbuffer.o
      _sio2SoundBufferGenId in sio2_soundbuffer.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
        "sio2Shutdown()", referenced from:
            templateShutdown()    in template.o
        "sio2InitAL()", referenced from:
            -[EAGLView createFramebuffer] in EAGLView.o
        "sio2InitGL()", referenced from:
            -[EAGLView createFramebuffer] in EAGLView.o
        "sio2PngRead(png_struct_def*, unsigned char*, unsigned long)", referenced from:
            __Z11sio2PngReadP14png_struct_defPhm$non_lazy_ptr in sio2_image.o
        "_sio2", referenced from:
            _sio2$non_lazy_ptr in templateAppDelegate.o
            _sio2$non_lazy_ptr in EAGLView.o
            _sio2$non_lazy_ptr in template.o
            _sio2$non_lazy_ptr in sio2_camera.o
            _sio2$non_lazy_ptr in sio2_emitter.o
            _sio2$non_lazy_ptr in sio2_font.o
            _sio2$non_lazy_ptr in sio2_image.o
            _sio2$non_lazy_ptr in sio2_ipo.o
            _sio2$non_lazy_ptr in sio2_lamp.o
            _sio2$non_lazy_ptr in sio2_material.o
            _sio2$non_lazy_ptr in sio2_soundbuffer.o
            _sio2$non_lazy_ptr in sio2_resource.o
            _sio2$non_lazy_ptr in sio2_sensor.o
            _sio2$non_lazy_ptr in sio2_physic.o
            _sio2$non_lazy_ptr in sio2_script.o
            _sio2$non_lazy_ptr in sio2_sound.o
            _sio2$non_lazy_ptr in sio2_object.o
            _sio2$non_lazy_ptr in sio2_mist.o
            _sio2$non_lazy_ptr in sio2_widget.o
            _sio2$non_lazy_ptr in sio2_video.o
            _sio2$non_lazy_ptr in sio2_vertexgroup.o
            _sio2$non_lazy_ptr in sio2_utils.o
            _sio2$non_lazy_ptr in sio2_timer.o
            _sio2$non_lazy_ptr in sio2_stream.o
            _sio2$non_lazy_ptr in sio2_window.o
        "sio2Init(int*, char**)", referenced from:
            -[EAGLView createFramebuffer] in EAGLView.o
        "sio2OggClose(void*)", referenced from:
            _sio2SoundBufferFree in sio2_soundbuffer.o
            _sio2SoundBufferGenId in sio2_soundbuffer.o
      ld: symbol(s) not found
      collect2: ld returned 1 exit status
Build failed (7 errors)

EssentialParado

Posts : 7
Join date : 2009-07-05

View user profile

Back to top Go down

Re: Build errors trying to run the tutorial templates

Post  sio2interactive on Sun Jul 05, 2009 3:55 pm

Seems to me that you are missing the libsio2_dev / libsio2_sim, are they link properly in framework dir?

_________________
SIO2 Interactive
Free Open Source 3D Game Engine for iPhone and iPod Touch
http://sio2interactive.com
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 38
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Re: Build errors trying to run the tutorial templates

Post  EssentialParado on Sun Jul 05, 2009 5:07 pm

Hmm… I took a look, does this look correct?


EssentialParado

Posts : 7
Join date : 2009-07-05

View user profile

Back to top Go down

Re: Build errors trying to run the tutorial templates

Post  sio2interactive on Sun Jul 05, 2009 5:58 pm

I don't know... its what is linked to your project that matters... essentially SIO2 compile out of the box on the 2.2.1 firmware... for the 3.0 SDK you need to toggle the C++ library to be Dynamic (default static) and add the following compiler flags:

-fno-regmove -Wno-write-strings

That's all there is to it Wink

Cheers!

_________________
SIO2 Interactive
Free Open Source 3D Game Engine for iPhone and iPod Touch
http://sio2interactive.com
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 38
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Re: Build errors trying to run the tutorial templates

Post  EssentialParado on Mon Jul 06, 2009 6:01 am

I feel a bit silly now… How do I toggle the library to be dynamic? And where do I write the compiler flags? I'm still getting accustomed to Xcode…

I wasn't meant to "install" the SIO2 engine somehow, was I? I just plonked the folder inside my Developer directory.

I know, I know… I should be reading Xcode tutorials first, but I like to learn by getting something running and then taking it apart. cyclops

Thank you for your help.

EssentialParado

Posts : 7
Join date : 2009-07-05

View user profile

Back to top Go down

Re: Build errors trying to run the tutorial templates

Post  shaggy on Mon Jul 06, 2009 7:03 pm

Toggle dynamic library:
In xCode, in the left hand groups listing, select Targets>TutorialXX
Press 'Info' button (or Apple-I)
Change C++ Standard Library Type to Dynamic from Static.

For the libsio2_dev, *_sim.a frameworks:
If they're not already there (they were for me), right-click on the frameworks folder in the groups listing, Add > Existing Frameworks. Select the Frameworks. (You probably don't need to do this, though. I bet your problem was the Static library above.)

shaggy

Posts : 7
Join date : 2009-06-26

View user profile

Back to top Go down

Re: Build errors trying to run the tutorial templates

Post  EssentialParado on Tue Jul 07, 2009 5:26 am

Okay, I followed your advice and changed the library type for the tutorial to dynamic… did a clean and build… aaaand

…still 7 errors.

Tried changing the library type on the whole template to dynamic too, and still the same errors.

I checked the libsio2 frameworks existed under frameworks (they're definitely there).

Added those flags -fno-regmove -Wno-write-strings under "Other Warning Flags", and still 7 errors. And just to be sure, I tried building with the flags under "Linker Warning Flags", then "Other Linker Flags" and then "Other C Flags" instead, but again, all the same linking errors…

EssentialParado

Posts : 7
Join date : 2009-07-05

View user profile

Back to top Go down

Re: Build errors trying to run the tutorial templates

Post  sio2interactive on Tue Jul 07, 2009 5:45 am

Are you sure you are compiling for the right architecture cuz:

ld warning: in /Developer/SDKs/SIO2_SDK_v1/src/sio2/libsio2_dev.a, file is not of required architecture
ld warning: in /Developer/SDKs/SIO2_SDK_v1/src/sio2/libsio2_sim.a, file is not of required architecture

Go to:

Project ->Edit Project Settings -> Base SDK For All Configurations

and make sure that you have something like: iPhone Device ?.?

Also double check in the Build tab and make sure that the Base SDK is set properly...

_________________
SIO2 Interactive
Free Open Source 3D Game Engine for iPhone and iPod Touch
http://sio2interactive.com
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 38
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Re: Build errors trying to run the tutorial templates

Post  EssentialParado on Tue Jul 07, 2009 6:23 am

The Base SDK for all configs is set to iPhone Simulator 2.2.1

There are two things that could make my install unusual that might give you more information…

1) I'm running a PPC system, not Intel.
2) I originally downloaded the 3.1 iPhone SDK, but the iPhone simulator is no longer a Universal Binary, so I uninstalled all the development tools and downloaded 2.2.1 SDK and installed that.

The SDK definitely works, as I can build and run other iPhone apps… just not SIO2 – Is the engine Intel architecture only?

EssentialParado

Posts : 7
Join date : 2009-07-05

View user profile

Back to top Go down

Re: Build errors trying to run the tutorial templates

Post  sio2interactive on Tue Jul 07, 2009 6:40 am

Well its built on Intel... maybe that's why...

_________________
SIO2 Interactive
Free Open Source 3D Game Engine for iPhone and iPod Touch
http://sio2interactive.com
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 38
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Re: Build errors trying to run the tutorial templates

Post  EssentialParado on Tue Jul 07, 2009 6:54 am

Ah… pale

Anything else I could try before I give up?

I can't afford an Intel Mac yet… My plan was to develop my incredible game -> release it to the app store with the measly $99 I'll beg for on the streets -> have a hugely successful game -> make a profit -> contribute some of that to SIO2… and then buy an Intel Mac… I love you

EssentialParado

Posts : 7
Join date : 2009-07-05

View user profile

Back to top Go down

Re: Build errors trying to run the tutorial templates

Post  shaggy on Tue Jul 07, 2009 7:10 am

Well, that (PPC) maybe your problem then...

Haven't tried it, but maybe this'll help.
http://alblue.blogspot.com/2008/12/enabling-iphone-development-on-ppc-macs.html

shaggy

Posts : 7
Join date : 2009-06-26

View user profile

Back to top Go down

Re: Build errors trying to run the tutorial templates

Post  EssentialParado on Tue Jul 07, 2009 7:19 am

Thanks for the link Shaggy, but I actually already did that and successfully installed the iPhone SDK and have built and run a few apps in the simulator already. It's just the SIO2 SDK tutorials I can't get to run… SIO2interactive said the SIO2 engine was built on Intel, but I honestly have no idea if that could cause it to not run. I would've thought the engine was just frameworks that worked on any system, but I'm honestly not too familiar with using engines.

Maybe it's just the library source files in the SIO2 engine that needed re-exporting as universal binaries… but I don't know…

If there's nothing else I can do, thanks a lot for both of your helpful replies anyway. I might try looking at trying a different engine… although SIO2 really did seem the best one out there.

EssentialParado

Posts : 7
Join date : 2009-07-05

View user profile

Back to top Go down

Re: Build errors trying to run the tutorial templates

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum