Page 1 of 2

'mType' was not declared in this scope

Posted: 10 Apr 2008, 17:43
by allenmoatallen
I am trying to compile the 0.0.24 branch on MacOSX 10.5.2 and receive the following error:


/Users/trevor/Desktop/client/XCode/../src/gui/windowlistener.h:44: error: 'mType' was not declared in this scope
/Users/trevor/Desktop/client/XCode/../src/gui/windowlistener.h: In member function 'int WindowEvent::getType() const':
/Users/trevor/Desktop/client/XCode/../src/gui/windowlistener.h:51: error: 'mType' was not declared in this scope
/Users/trevor/Desktop/client/XCode/../src/gui/windowlistener.h:44: error: 'mType' was not declared in this scope
/Users/trevor/Desktop/client/XCode/../src/gui/windowlistener.h:51: error: 'mType' was not declared in this scope

Re: 'mType' was not declared in this scope

Posted: 10 Apr 2008, 18:23
by Sanga
allenmoatallen wrote:I am trying to compile the 0.0.24 branch on MacOSX 10.5.2 and receive the following error:


/Users/trevor/Desktop/client/XCode/../src/gui/windowlistener.h:44: error: 'mType' was not declared in this scope
/Users/trevor/Desktop/client/XCode/../src/gui/windowlistener.h: In member function 'int WindowEvent::getType() const':
/Users/trevor/Desktop/client/XCode/../src/gui/windowlistener.h:51: error: 'mType' was not declared in this scope
/Users/trevor/Desktop/client/XCode/../src/gui/windowlistener.h:44: error: 'mType' was not declared in this scope
/Users/trevor/Desktop/client/XCode/../src/gui/windowlistener.h:51: error: 'mType' was not declared in this scope
I just saw that one about 10 minutes ago. It was an issue with a mismatch between the client revision and the guichan version. For the latest client from SVN, you need guichan 0.8.0. For older revisions of the client, use guichan 0.7.1.

Re: 'mType' was not declared in this scope

Posted: 10 Apr 2008, 18:36
by allenmoatallen
Oh ok, is there anyway to create a UB framework for the new guichan? I have found it easier to use frameworks then trying to link them. And it is possible do you know how?

Re: 'mType' was not declared in this scope

Posted: 10 Apr 2008, 19:38
by allenmoatallen
Is that for guichan 0.8.0 ?? I added it to /Library/Frameworks overwriting the previous one and still no change with the mType scope.

Re: 'mType' was not declared in this scope

Posted: 11 Apr 2008, 09:13
by trapdoor
Actually the 0.0.24 branch still uses guichan 0.7.1.

Which version of guichan were you using?

I get the same error on UNIX when trying to compile 0.0.24 branch with guichan 0.8 installed.

If you want a pre-packaged 0.0.24.1 for Mac, I have created one, and it should be available on the TMW sourceforge downloads.

--
trapdoor

Re: 'mType' was not declared in this scope

Posted: 11 Apr 2008, 09:37
by allenmoatallen
I am really just trying to get an XCode project for the source that will work correctly :-).

This was trying to compile TMW 0.0.24.1

I tried whichever framework was linked above. If I can find a 0.7.1 guichan.framework that would be great. The only other one I have is a 0.6.1.

Re: 'mType' was not declared in this scope

Posted: 11 Apr 2008, 10:09
by trapdoor
I hope to put my .xcodeproj folders into SVN as soon as I can, I haven't had much time with my Mac lately, but this weekend I should get chance, and will also upload TMW 0.0.24.1 with music.

--
trapdoor

Re: 'mType' was not declared in this scope

Posted: 11 Apr 2008, 20:31
by trapdoor

Re: 'mType' was not declared in this scope

Posted: 11 Apr 2008, 20:45
by allenmoatallen
Thanks, I changed which one it looked for, then it couldn't find physfs.h which I have a physfs.framework for, so I changed the include to <physfs/physfs.h> which seemed to work but now I get:
<code>
cd /Users/trevor/Desktop/client/LoM_MacOSX
/Developer/usr/bin/gcc-4.0 -x c++ -arch i386 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility-inlines-hidden -mfix-and-continue -mmacosx-version-min=10.4 -gdwarf-2 -I/Users/trevor/Desktop/client/LoM_MacOSX/build/LoM_MacOSX.build/Debug/LoM_MacOSX.build/LoM_MacOSX.hmap -F/Users/trevor/Desktop/client/LoM_MacOSX/build/Debug -I/Users/trevor/Desktop/client/LoM_MacOSX/build/Debug/include -I/Users/trevor/Library/Frameworks/guichan.framework/Headers -I/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/guichan.framework/Headers -I/Users/trevor/Library/Frameworks/enet.framework/Headers -I/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/enet.framework/Headers -I/Users/trevor/Library/Frameworks/SDL_ttf.framework/Headers -I/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/SDL_ttf.framework/Headers -I/Users/trevor/Library/Frameworks/SDL_net.framework/Headers -I/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/SDL_net.framework/Headers -I/Users/trevor/Library/Frameworks/SDL_mixer.framework/Headers -I/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/SDL_mixer.framework/Headers -I/Users/trevor/Library/Frameworks/SDL_image.framework/Headers -I/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/SDL_image.framework/Headers -I/Users/trevor/Library/Frameworks/SDL.framework/Headers -I/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/SDL.framework/Headers -I/Users/trevor/Library/Frameworks/libxml.framework/Headers -I/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/libxml.framework/Headers -I/Users/trevor/Library/Frameworks/libpng.framework/Headers -I/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/libpng.framework/Headers -I/Users/trevor/Desktop/client/LoM_MacOSX/build/LoM_MacOSX.build/Debug/LoM_MacOSX.build/DerivedSources -isysroot /Developer/SDKs/MacOSX10.4u.sdk -include /Library/Caches/com.apple.Xcode.501/SharedPrecompiledHeaders/LoM_MacOSX_Prefix-dvnjsarhjdicbxczeqqbtudqlnzi/LoM_MacOSX_Prefix.pch -c /Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp -o /Users/trevor/Desktop/client/LoM_MacOSX/build/LoM_MacOSX.build/Debug/LoM_MacOSX.build/Objects-normal/i386/buddywindow.o
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp: In constructor 'BuddyWindow::BuddyWindow()':
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:51: error: 'talk' was not declared in this scope
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:51: error: expected type-specifier before 'Button'
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:51: error: expected `;' before 'Button'
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:52: error: invalid use of member (did you forget the '&' ?)
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:52: error: expected type-specifier before 'Button'
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:52: error: expected `;' before 'Button'
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:53: error: no match for 'operator*' in 'Button * kStdCancelItemIndex'
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:53: error: expected type-specifier before 'Button'
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:53: error: expected `;' before 'Button'
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:56: error: invalid use of member (did you forget the '&' ?)
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:56: error: base operand of '->' is not a pointer
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:57: error: base operand of '->' is not a pointer
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:57: error: invalid use of member (did you forget the '&' ?)
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:57: error: base operand of '->' is not a pointer
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:59: error: no matching function for call to 'BuddyWindow::add(<type error>)'
/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/guichan.framework/Headers/widgets/container.hpp:117: note: candidates are: virtual void gcn::Container::add(gcn::Widget*)
/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/guichan.framework/Headers/widgets/container.hpp:127: note: virtual void gcn::Container::add(gcn::Widget*, int, int)
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:60: error: no matching function for call to 'BuddyWindow::add(<unknown type>)'
/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/guichan.framework/Headers/widgets/container.hpp:117: note: candidates are: virtual void gcn::Container::add(gcn::Widget*)
/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/guichan.framework/Headers/widgets/container.hpp:127: note: virtual void gcn::Container::add(gcn::Widget*, int, int)
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:61: error: no matching function for call to 'BuddyWindow::add(<anonymous enum>)'
/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/guichan.framework/Headers/widgets/container.hpp:117: note: candidates are: virtual void gcn::Container::add(gcn::Widget*)
/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/guichan.framework/Headers/widgets/container.hpp:127: note: virtual void gcn::Container::add(gcn::Widget*, int, int)
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:51: error: 'talk' was not declared in this scope
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:51: error: expected type-specifier before 'Button'
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:51: error: expected `;' before 'Button'
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:52: error: invalid use of member (did you forget the '&' ?)
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:52: error: expected type-specifier before 'Button'
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:52: error: expected `;' before 'Button'
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:53: error: no match for 'operator*' in 'Button * kStdCancelItemIndex'
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:53: error: expected type-specifier before 'Button'
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:53: error: expected `;' before 'Button'
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:56: error: invalid use of member (did you forget the '&' ?)
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:56: error: base operand of '->' is not a pointer
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:57: error: base operand of '->' is not a pointer
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:57: error: invalid use of member (did you forget the '&' ?)
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:57: error: base operand of '->' is not a pointer
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:59: error: no matching function for call to 'BuddyWindow::add(<type error>)'
/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/guichan.framework/Headers/widgets/container.hpp:117: note: candidates are: virtual void gcn::Container::add(gcn::Widget*)
/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/guichan.framework/Headers/widgets/container.hpp:127: note: virtual void gcn::Container::add(gcn::Widget*, int, int)
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:60: error: no matching function for call to 'BuddyWindow::add(<unknown type>)'
/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/guichan.framework/Headers/widgets/container.hpp:117: note: candidates are: virtual void gcn::Container::add(gcn::Widget*)
/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/guichan.framework/Headers/widgets/container.hpp:127: note: virtual void gcn::Container::add(gcn::Widget*, int, int)
/Users/trevor/Desktop/client/LoM_MacOSX/../src/gui/buddywindow.cpp:61: error: no matching function for call to 'BuddyWindow::add(<anonymous enum>)'
/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/guichan.framework/Headers/widgets/container.hpp:117: note: candidates are: virtual void gcn::Container::add(gcn::Widget*)
/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/guichan.framework/Headers/widgets/container.hpp:127: note: virtual void gcn::Container::add(gcn::Widget*, int, int)

</code>

Re: 'mType' was not declared in this scope

Posted: 12 Apr 2008, 08:19
by trapdoor
I have added the xcode project files I use to build the official Mac releases of The Mana World to SVN in the 0.0.24 branch.

I have the physfs source in src/physfs, so you may need to make some minor changes if you use a framework for it instead.

--
trapdoor

Re: 'mType' was not declared in this scope

Posted: 13 Apr 2008, 00:08
by allenmoatallen
Ok got all that working but I seem to have a problem with SDLTrueTypeFont as I get these following errors.

Code: Select all

"_TTF_Quit", referenced from:
      TrueTypeFont::~TrueTypeFont()in truetypefont.o
      TrueTypeFont::~TrueTypeFont()in truetypefont.o
  "_TTF_SizeUTF8", referenced from:
      TrueTypeFont::getWidth(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) constin truetypefont.o
  "_TTF_SizeText", referenced from:
      gcn::SDLTrueTypeFont::getWidth(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) constin sdltruetypefont.o
  "_TTF_OpenFont", referenced from:
      TrueTypeFont::TrueTypeFont(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)in truetypefont.o
      gcn::SDLTrueTypeFont::SDLTrueTypeFont(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)in sdltruetypefont.o
  "_TTF_RenderText_Solid", referenced from:
      gcn::SDLTrueTypeFont::drawString(gcn::Graphics*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int)in sdltruetypefont.o
  "_TTF_RenderText_Blended", referenced from:
      gcn::SDLTrueTypeFont::drawString(gcn::Graphics*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int)in sdltruetypefont.o
  "_TTF_RenderUTF8_Blended", referenced from:
      TextChunk::generate(_TTF_Font*)     in truetypefont.o
  "_TTF_FontHeight", referenced from:
      TrueTypeFont::getHeight() const in truetypefont.o
      gcn::SDLTrueTypeFont::getHeight() constin sdltruetypefont.o
  "_TTF_CloseFont", referenced from:
      TrueTypeFont::~TrueTypeFont()in truetypefont.o
      TrueTypeFont::~TrueTypeFont()in truetypefont.o
      gcn::SDLTrueTypeFont::~SDLTrueTypeFont()in sdltruetypefont.o
      gcn::SDLTrueTypeFont::~SDLTrueTypeFont()in sdltruetypefont.o
  "_TTF_Init", referenced from:
      TrueTypeFont::TrueTypeFont(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)in truetypefont.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
[/size]

thanks for the project by the way :-)

Re: 'mType' was not declared in this scope

Posted: 13 Apr 2008, 08:50
by trapdoor
Have you tried adding the SDL_ttf.framework to the project?

I must admit I dont see these errors, and I dont link to SDL_ttf.

--
trapdoor

Re: 'mType' was not declared in this scope

Posted: 13 Apr 2008, 18:55
by allenmoatallen
yeah, I have SDL_ttf.framework in my project, and I also have the guichan addon source files:

SDLTrueTypeFont.cpp
SDLTrueTypeFont.hpp

so I don't know what is up.

Edit: is that 0.7 guichan you linked actually 0.7.0? or 0.7.1? I am helping leeor_net get his project working on the mac and it needs to be linked to 0.7.0 (which might be the one you linked) since im getting the mtype error on that version as well.

Re: 'mType' was not declared in this scope

Posted: 13 Apr 2008, 20:51
by trapdoor
The framework is built from 0.7.1 sources.

Although theres no difference between 0.7.0 and 0.7.1 as we dont use HGE or OpenLayer support.

--
trapdoor

Re: 'mType' was not declared in this scope

Posted: 13 Apr 2008, 21:02
by allenmoatallen
Ok, he and I are trying to figure out why I get that error on that client is all :-)

Can you tell me how you make the frameworks? I need one for guichan 8 (he is upgrading the client to use 8)