Another .NET issue, not covered thus far that I can see
by Darren Bridle · in Technical Issues · 08/01/2003 (9:42 pm) · 7 replies
C:\active_frontier\engine\game\net\netTest.cc(74): error C2248: 'NetObject::Parent' : cannot access private typedef declared in class 'NetObject'
c:\active_frontier\engine\game\main.cc(72): error C2248: 'SimObject::Parent' : cannot access private typedef declared in class 'SimObject'
c:\active_frontier\engine\game\guiNoMouseCtrl.cc(19): error C2248: 'GuiControl::Parent' : cannot access private typedef declared in class 'GuiControl'
c:\active_frontier\engine\game\banList.cc(13): error C2248: 'SimObject::Parent' : cannot access private typedef declared in class 'SimObject'
They are all related to IMPLEMENT_CO_NETOBJECT_V1(SimpleNetObject);
VC 7.1, everything else was fixed using the suggestions on the other .Net posts. I have searched the forum for this and found no luck. Any advice?
- Daz
c:\active_frontier\engine\game\main.cc(72): error C2248: 'SimObject::Parent' : cannot access private typedef declared in class 'SimObject'
c:\active_frontier\engine\game\guiNoMouseCtrl.cc(19): error C2248: 'GuiControl::Parent' : cannot access private typedef declared in class 'GuiControl'
c:\active_frontier\engine\game\banList.cc(13): error C2248: 'SimObject::Parent' : cannot access private typedef declared in class 'SimObject'
They are all related to IMPLEMENT_CO_NETOBJECT_V1(SimpleNetObject);
VC 7.1, everything else was fixed using the suggestions on the other .Net posts. I have searched the forum for this and found no luck. Any advice?
- Daz
#2
08/02/2003 (4:46 pm)
Err, I just checked and these are all fixed in Torque HEAD...do you have the latest version?
#3
However, my copy of VS7.1 compiles Torque without a hitch, so I suspect the problem might really be elsewhere.
08/02/2003 (11:28 pm)
This might be related to how MSVC handles access? (ie, the default is private)However, my copy of VS7.1 compiles Torque without a hitch, so I suspect the problem might really be elsewhere.
#4
In any case though, you should not be getting these errors with the latest version of Torque because those typedefs are in.
08/02/2003 (11:46 pm)
HEAD has these fixes checked in. I may have checked them in myself, because I remember running into them and swearing.In any case though, you should not be getting these errors with the latest version of Torque because those typedefs are in.
#5
- Daz
08/03/2003 (6:29 pm)
Here was my issue. I am not currenly using the head version. I did some file checks with the head version and found the typdef changes, implemented them and it builds fine. Thankyou for your help!- Daz
#6
- Daz
08/03/2003 (6:48 pm)
Here was my issue. I am not currenly using the head version. I did some file checks with the head version and found the typdef changes, implemented them and it builds fine. Thankyou for your help!- Daz
#7
my errors are
c:\Torque\frontier\engine\game\guiNoMouseCtrl.cc(19): error C2248: 'GuiControl::Parent' : cannot access private typedef declared in class 'GuiControl'
c:\Torque\frontier\engine\game\net\netTest.cc(74): error C2248: 'NetObject::Parent' : cannot access private typedef declared in class 'NetObject'
c:\Torque\frontier\engine\game\main.cc(71): error C2248: 'SimObject::Parent' : cannot access private typedef declared in class 'SimObject'
c:\Torque\frontier\engine\game\banList.cc(13): error C2248: 'SimObject::Parent' : cannot access private typedef declared in class 'SimObject'
02/09/2005 (8:28 pm)
I have this problem too. I am upgrading some 1.1.2 source to compile in .net 2k3 i took care of all the other problems I'm down to 4 of these. where in the class do i have to put the typedef's and which classes do i have to?my errors are
c:\Torque\frontier\engine\game\guiNoMouseCtrl.cc(19): error C2248: 'GuiControl::Parent' : cannot access private typedef declared in class 'GuiControl'
c:\Torque\frontier\engine\game\net\netTest.cc(74): error C2248: 'NetObject::Parent' : cannot access private typedef declared in class 'NetObject'
c:\Torque\frontier\engine\game\main.cc(71): error C2248: 'SimObject::Parent' : cannot access private typedef declared in class 'SimObject'
c:\Torque\frontier\engine\game\banList.cc(13): error C2248: 'SimObject::Parent' : cannot access private typedef declared in class 'SimObject'
Torque 3D Owner Pat Wilson
The error is this, though. When you use the IMPLEMENT_CONOBJECT, or IMPLEMENT_CO_NETOBJECT macros, it assumes that your class header has the following line:
class FooObject : public NetObject { typedef NetObject Parent; protected: ... public: ... };That typedef is the key there, and it is (should be always) a private typedef. What the error was about was the macro trying to get at that Parent typedef and not being allowed to.