Building with vc 2005 express
by Phil Shenk · in Torque Game Builder · 11/14/2005 (12:44 am) · 31 replies
Has anyone been able to build T2D with the new VC 2005 Express?
I tried using the vc7 solution file (auto converting when prompted), but I'm getting a lot of errors of the variety:
I've verified that 2005 express is set up with the MS SDK properly.. I can build MS samples ok.
Any help is appreciated. I'm not so versed in these things, and I haven't compiled T2D before. Since vc 2005 express is free, I figured now would be a good time to try.
I tried using the vc7 solution file (auto converting when prompted), but I'm getting a lot of errors of the variety:
1>winConsole.cc 1>c:\program files\microsoft platform sdk\include\winnt.h(222) : error C2146: syntax error : missing ';' before identifier 'PVOID64' 1>c:\program files\microsoft platform sdk\include\winnt.h(222) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\program files\microsoft platform sdk\include\winnt.h(5940) : error C2146: syntax error : missing ';' before identifier 'Buffer' 1>c:\program files\microsoft platform sdk\include\winnt.h(5940) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\program files\microsoft platform sdk\include\winnt.h(5940) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
I've verified that 2005 express is set up with the MS SDK properly.. I can build MS samples ok.
Any help is appreciated. I'm not so versed in these things, and I haven't compiled T2D before. Since vc 2005 express is free, I figured now would be a good time to try.
About the author
#22
Easy solution: Turn off browse info
Better solution: Open all the .vcproj files for vc8 in a text editor and search/replace out.vc6 with out.vc8, delete all the out.* directories (engine and lib), rebuild
Also, if i rember correctly, browse info is generated after linking. If bscmake errors out you might still have a working .exe, but of course it's better to fix the projects :)
Note: I havent looked at Alpha 3 yet. I have been using my own VC8 projects since beta 2 of VS2005 so I have no idea what the official projects are like and I'm just guessing based on the error message.
T.
01/20/2006 (2:30 am)
@Philip,Easy solution: Turn off browse info
Better solution: Open all the .vcproj files for vc8 in a text editor and search/replace out.vc6 with out.vc8, delete all the out.* directories (engine and lib), rebuild
Also, if i rember correctly, browse info is generated after linking. If bscmake errors out you might still have a working .exe, but of course it's better to fix the projects :)
Note: I havent looked at Alpha 3 yet. I have been using my own VC8 projects since beta 2 of VS2005 so I have no idea what the official projects are like and I'm just guessing based on the error message.
T.
#23
I thought this was fixed in the Torque 1.4.1 core, but apparently not. Debug builds should work without problem.
01/20/2006 (4:04 am)
I'm guessing you're doing a release build? If that is the case, are you also getting an error similar to "cannot convert const char* to char*". I'm pulling this from memory at the moment, so I can't give exact details, but all you should have to do is add a typecast to char* on the line that is reporting the error.I thought this was fixed in the Torque 1.4.1 core, but apparently not. Debug builds should work without problem.
#24
I just tried building Alpha 3 with VS2005 Pro, same problem as Phillip above. The problem seems to be that the VC8 project's release build configuration is screwed. The fix is:
1. Go into the Configuration Manager (Build menu, Configuration Manager)
2. Change the active solution configuration to Release if it's not already
3. You should notice that its setup to build debug builds instead of release builds. Change them all to Release.
Now if you rebuild it should work.
T.
Edit: Or not. Still looking at it ...
Edit2: Hmm. First (fully clean) build seems to give the .sbr error. After that I did a clean rebuild, stopped it after forgetting to fix the const warning, fixed that, kicked the build off again, and it succeded. Seems that a rebuild all or just a rebuild of guitreeviewctrl.cc is enough to fix it. *shrug* bit weird.
01/20/2006 (12:59 pm)
Just a quick update ...I just tried building Alpha 3 with VS2005 Pro, same problem as Phillip above. The problem seems to be that the VC8 project's release build configuration is screwed. The fix is:
1. Go into the Configuration Manager (Build menu, Configuration Manager)
2. Change the active solution configuration to Release if it's not already
3. You should notice that its setup to build debug builds instead of release builds. Change them all to Release.
Now if you rebuild it should work.
T.
Edit: Or not. Still looking at it ...
Edit2: Hmm. First (fully clean) build seems to give the .sbr error. After that I did a clean rebuild, stopped it after forgetting to fix the const warning, fixed that, kicked the build off again, and it succeded. Seems that a rebuild all or just a rebuild of guitreeviewctrl.cc is enough to fix it. *shrug* bit weird.
#25
I realise that T2D and TGE are complicated products, but is it difficult to release files that build flawlessly in common compilers?
01/20/2006 (2:13 pm)
I don't want this to sound like a dig, as it's not meant as one - it's just a question from someone who only hacks at code for fun.I realise that T2D and TGE are complicated products, but is it difficult to release files that build flawlessly in common compilers?
#26
Right now, as far as I know, I'm the only T2D dev using vc8, but I can't make modifications to the Torque core. That is why this problem still exists. I'll make sure it is rectified for future releases.
01/20/2006 (7:45 pm)
Maintaining a project file for one compiler is simple. But maintaining them for multiple becomes a problem. Different compilers will yell at you for different things. Like, for instance, vc7 and gcc work just fine with the aforementioned code. But, vc8 doesn't like it.Right now, as far as I know, I'm the only T2D dev using vc8, but I can't make modifications to the Torque core. That is why this problem still exists. I'll make sure it is rectified for future releases.
#27
Nice job guys!
01/20/2006 (11:12 pm)
Alpha 3b builds perfectly with no mods, on VC 2005 Express. I'm guessing the "3b" .sln got updated.Nice job guys!
#28
01/21/2006 (12:23 am)
Cool. In that case I'll just grab 3b and bin 3a.
#29
@Adam,
You're not the only T2D dev using vc8. There have been a fair few people using vc8 for building TGE, TSE and T2D since vc8 was in beta. I would guess that a fair number of those people are not using the express version, but you're definately not the only one.
T.
01/21/2006 (4:12 am)
It's worth pointing out that vc8 is still very new. It's only just come out of beta in the last couple of months. There are bound to be teething problems in official support. vc8 is a lot more standards compliant then previous versions of VC and has it's own little weirdisms which adds to the complication of clean support for it. Also, T2D is still alpha, you can't reasonably expect an alpha to be flawless, especially when it comes to building.@Adam,
You're not the only T2D dev using vc8. There have been a fair few people using vc8 for building TGE, TSE and T2D since vc8 was in beta. I would guess that a fair number of those people are not using the express version, but you're definately not the only one.
T.
#30
c:\program files\microsoft platform sdk\include\winnt.h(222) : error C2059: syntax error : ';'
The corresponding code in winnt.h is
Any ideas what i can try ? i've not touched the code , simply opened in visual studio 2005 express and tried to build it. Could it be that it needs the non-express version?
01/21/2006 (6:00 am)
I open the "engine\compilers\VisualStudio 2005\T2D SDK.sln" with Visual Studio 2005 express, the free one. and when i try to build it i get the following error.c:\program files\microsoft platform sdk\include\winnt.h(222) : error C2059: syntax error : ';'
The corresponding code in winnt.h is
typedef void *PVOID; typedef void * POINTER_64; typedef void * PVOID64;
Any ideas what i can try ? i've not touched the code , simply opened in visual studio 2005 express and tried to build it. Could it be that it needs the non-express version?
#31
That was covered earlier in this thread. Did you read it ?
Anyway, delete Torque's lib/directx8/basetsd.h
T.
01/21/2006 (8:18 am)
@David,That was covered earlier in this thread. Did you read it ?
Anyway, delete Torque's lib/directx8/basetsd.h
T.
Torque Owner Philip Mansfield
Default Studio Name
I've just downloaded and installed VC2005 EE along with the Platform SDK. I've double clicked the vc8\T2D SDK.sln file and everything has opened up. I set T2D as the startup project, and then added the Platform SDK Include directory to the list of Include directories in VC++.
Hit the Rebuild Solution option and it errors out at the end with:
This is using the Alpha 3 (not b) source code.