Game Development Community

Building torque 1.3 on OSX - ResManager

by Roxor Games (#0002) · in Torque Game Engine · 06/12/2007 (12:50 pm) · 3 replies

Hi, I'm trying to build TGE 1.3 on OSX 10.4 with Xcode 2.4, gcc 4.0.1, and I've got 26 errors from go. Stripped down to the first error message:

../engine/audio/audioDataBlock.cc -o /Users/denshi/roxor/example/torque_pb_2_1.build/Development/Torque-MacCarb-Debug.build/Objects-normal/i386/audioDataBlock.o
../engine/core/resManager.h: In member function 'void Resource::unlock()':
../engine/core/resManager.h:255: error: invalid use of undefined type 'struct ResManager'
../engine/core/resManager.h:38: error: forward declaration of 'struct ResManager'
../engine/core/resManager.h: In member function 'void Resource::purge()':
../engine/core/resManager.h:263: error: invalid use of undefined type 'struct ResManager'
../engine/core/resManager.h:38: error: forward declaration of 'struct ResManager'

...ad infinitum

Anything obvious I'm missing?

About the author

Recent Threads


#1
06/13/2007 (3:54 pm)
GCC 4 is much more pedantic than most other compilers. In this error, it's complaining about a forward reference to a template ( template class Resource ).

You need to move the offending code in the header file to the bottom of that header file.

Share and Enjoy,

/Paul
#2
06/13/2007 (5:03 pm)
Did that, thanks. I also found the event.h bug and corrected that as well. Now I'm trying to puzzle out this:

StandaloneExecutable.LinkUsingFileList "~/example/Development/Torque Demo Debug OSX.app/Contents/MacOS/Torque Demo Debug OSX" ~/example/torque_pb_2_1.build/Development/Torque-MacCarb-Debug.build/Objects-normal/LinkFileList
/usr/bin/c++ -o "~/example/Development/Torque Demo Debug OSX.app/Contents/MacOS/Torque Demo Debug OSX" "-L~/example/Development" "-L../lib/vorbis/macosx" "-F~/example/Development" "-F../lib/openal/macCarb" -filelist ~/example/torque_pb_2_1.build/Development/Torque-MacCarb-Debug.build/Objects-normal/LinkFileList "-arch" "i386" "-prebind" "-Wl,-no_arch_warnings" "-flat_namespace" "-framework" "AGL" "-framework" "Carbon" "-framework" "OpenGL" "-framework" "CoreFoundation" "-framework" "DrawSprocket" "-framework" "CoreServices" "-logg" "-lvorbis"
/usr/bin/ld: warning prebinding disabled because of undefined symbols
/usr/bin/ld: Undefined symbols:
typeinfo for Grid
typeinfo for MovePoint
ScreenFXManager::ScreenFXManager()
ScreenFXManager::~ScreenFXManager()
Platform::getDiffTime(Platform::LocalTime, Platform::LocalTime)
Platform::setLocalTime(Platform::LocalTime)
Platform::getAdjustedTime(Platform::LocalTime&, int)
_gScreenFXMgr
ScreenFXManager::render(RectI const&)
OggMixedStreamSource::OggMixedStreamSource(char const*)
_ogg_page_continued
_ogg_page_eos
_ogg_page_granulepos
_ogg_page_serialno
_ogg_stream_clear
_ogg_stream_init
_ogg_stream_packetout
_ogg_stream_packetpeek
_ogg_stream_pagein
_ogg_stream_reset
_ogg_sync_buffer
_ogg_sync_clear
_ogg_sync_init
_ogg_sync_pageseek
_ogg_sync_reset
_ogg_sync_wrote
_vorbis_block_clear
_vorbis_block_init
_vorbis_comment_clear
_vorbis_comment_init
_vorbis_dsp_clear
_vorbis_info_blocksize
_vorbis_info_clear
_vorbis_info_init
_vorbis_packet_blocksize
_vorbis_synthesis
_vorbis_synthesis_blockin
_vorbis_synthesis_headerin
_vorbis_synthesis_init
_vorbis_synthesis_pcmout
_vorbis_synthesis_read
collect2: ld returned 1 exit status
#3
06/13/2007 (7:30 pm)
Well, it looks like you've got some files missing from the Xcode project, namely whatever cc or cpp file contains ScreenFXManager.

Also, I'm guessing that you're using an old ogg / vorbis libs that are not universal binary. Try including the ogg / vorbis frameworks from the latest TGE ( TGE 1.5.2 ) in your project.

Those frameworks likely contain more code & features than your app will need, so if download size is a factor, if you want to save space, you can grab the ogg & vorbis libs' source and compile some static libs to link with your app.

/Paul