Game Development Community

Code: Fading Transparent GuiTextCtrl - Errors when compiling

by Otto Itkonen · in Torque Game Engine · 09/03/2008 (9:36 am) · 3 replies

Here's the link: www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=13537

I did, what the tutorial said, but when I tried to compile main.cc, I got these errors:

1>------ Build started: Project: Torque Demo, Configuration: Debug_FastRelight Win32 ------
1>Compiling...
1>guiTextCtrl.cc
1>c:\users\otto\desktop537.guitextctrl\guitextctrl.cc(27) : error C2065: 'startFadein' : undeclared identifier
1>c:\users\otto\desktop537.guitextctrl\guitextctrl.cc(28) : error C2065: 'fadeinDone' : undeclared identifier
1>c:\users\otto\desktop537.guitextctrl\guitextctrl.cc(29) : error C2065: 'fadeinTime' : undeclared identifier
1>c:\users\otto\desktop537.guitextctrl\guitextctrl.cc(30) : error C2065: 'fadeinStartTime' : undeclared identifier
1>c:\users\otto\desktop537.guitextctrl\guitextctrl.cc(31) : error C2065: 'startFadeout' : undeclared identifier
1>c:\users\otto\desktop537.guitextctrl\guitextctrl.cc(32) : error C2065: 'fadeoutDone' : undeclared identifier
1>c:\users\otto\desktop537.guitextctrl\guitextctrl.cc(33) : error C2065: 'fadeoutTime' : undeclared identifier
1>c:\users\otto\desktop537.guitextctrl\guitextctrl.cc(34) : error C2065: 'fadeoutStartTime' : undeclared identifier
1>c:\users\otto\desktop537.guitextctrl\guitextctrl.cc(35) : error C2065: 'fadeCtrl' : undeclared identifier
1>c:\users\otto\desktop537.guitextctrl\guitextctrl.cc(59) : error C2039: 'startFadein' : is not a member of 'GuiTextCtrl'
1>        c:\torque\tge_1_5_2\engine\gui\controls\guitextctrl.h(19) : see declaration of 'GuiTextCtrl'
1>c:\users\otto\desktop537.guitextctrl\guitextctrl.cc(60) : error C2039: 'fadeinDone' : is not a member of 'GuiTextCtrl'
1>        c:\torque\tge_1_5_2\engine\gui\controls\guitextctrl.h(19) : see declaration of 'GuiTextCtrl'
1>c:\users\otto\desktop537.guitextctrl\guitextctrl.cc(61) : error C2039: 'fadeinTime' : is not a member of 'GuiTextCtrl'
1>        c:\torque\tge_1_5_2\engine\gui\controls\guitextctrl.h(19) : see declaration of 'GuiTextCtrl'
1>c:\users\otto\desktop537.guitextctrl\guitextctrl.cc(62) : error C2039: 'startFadeout' : is not a member of 'GuiTextCtrl'
1>        c:\torque\tge_1_5_2\engine\gui\controls\guitextctrl.h(19) : see declaration of 'GuiTextCtrl'
1>c:\users\otto\desktop537.guitextctrl\guitextctrl.cc(63) : error C2039: 'fadeoutDone' : is not a member of 'GuiTextCtrl'
1>        c:\torque\tge_1_5_2\engine\gui\controls\guitextctrl.h(19) : see declaration of 'GuiTextCtrl'
1>c:\users\otto\desktop537.guitextctrl\guitextctrl.cc(64) : error C2039: 'fadeoutTime' : is not a member of 'GuiTextCtrl'
1>        c:\torque\tge_1_5_2\engine\gui\controls\guitextctrl.h(19) : see declaration of 'GuiTextCtrl'
1>c:\users\otto\desktop537.guitextctrl\guitextctrl.cc(65) : error C2039: 'fadeCtrl' : is not a member of 'GuiTextCtrl'
1>        c:\torque\tge_1_5_2\engine\gui\controls\guitextctrl.h(19) : see declaration of 'GuiTextCtrl'
1>c:\users\otto\desktop537.guitextctrl\guitextctrl.cc(239) : error C2065: 'fadeinStartTime' : undeclared identifier
1>c:\users\otto\desktop537.guitextctrl\guitextctrl.cc(271) : error C2065: 'fadeoutStartTime' : undeclared identifier

#1
09/03/2008 (9:36 am)
1>c:\users\otto\desktop537.guitextctrl\guitextctrl.cc(306) : error C2039: 'beginFadein' : is not a member of 'GuiTextCtrl'
1>        c:\torque\tge_1_5_2\engine\gui\controls\guitextctrl.h(19) : see declaration of 'GuiTextCtrl'
1>c:\users\otto\desktop537.guitextctrl\guitextctrl.cc(308) : error C2065: 'fadeinStartTime' : undeclared identifier
1>c:\users\otto\desktop537.guitextctrl\guitextctrl.cc(312) : error C2039: 'beginFadeout' : is not a member of 'GuiTextCtrl'
1>        c:\torque\tge_1_5_2\engine\gui\controls\guitextctrl.h(19) : see declaration of 'GuiTextCtrl'
1>c:\users\otto\desktop537.guitextctrl\guitextctrl.cc(314) : error C2065: 'fadeoutStartTime' : undeclared identifier
1>c:\users\otto\desktop537.guitextctrl\guitextctrl.cc(321) : error C2039: 'beginFadein' : is not a member of 'GuiTextCtrl'
1>        c:\torque\tge_1_5_2\engine\gui\controls\guitextctrl.h(19) : see declaration of 'GuiTextCtrl'
1>c:\users\otto\desktop537.guitextctrl\guitextctrl.cc(327) : error C2039: 'beginFadeout' : is not a member of 'GuiTextCtrl'
1>        c:\torque\tge_1_5_2\engine\gui\controls\guitextctrl.h(19) : see declaration of 'GuiTextCtrl'
1>Creating browse information file...
1>Microsoft Browse Information Maintenance Utility Version 9.00.21022
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>Build log was saved at "file://c:\Torque\TGE_1_5_2\tools\out.VC8.DEBUG_FAST\BuildLog.htm"
1>Torque Demo - 24 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 6 up-to-date, 0 skipped ==========

I'm using VC 2008 Express Edition, but those errors shoulden't dependent of that.
(I know C++ pretty well, but but I don't actually have got acquainted to TGE.)
#2
09/03/2008 (10:50 am)
Why not post this to the comments in the resource? If I hadn't randomly seen this thread I wouldn't have caught it.

As for the errors, it looks like all of them stem from the fact that it doesn't recognize the new variables (startFadein, fadeinDone, etc) that are established in GuiTextCtrl.h. So the first question would be, are you sure you made the appropriate changes to GuiTextCtrl.h? Or if you're using the downloaded file, are you sure you replaced the old GuiTextCtrl.h?
#3
09/04/2008 (3:22 am)
I did, but... Yeah, thanks for saying, it seems it hasn't changed...
It's probably because of the "Source files" -folder is normally for cpp, cc, ect. files.

Well, thanks anyway and sorry for posting here.