Compiling Help
by Patrick Webber · in Torque 3D Professional · 07/25/2011 (8:42 pm) · 25 replies
I'm trying to compile a project with Visual C++ 2008. I'm down to simply creating a brand new Torque project and immediately trying to recompile it. I've searched the internet and these forums for help, but have yet to create a successful build. The errors I get when I try to compile (release version) are:
An error code from "Performing Custom Build Step"
Error BK1506 for aiClient.sbr - No such file or directory
3 fatal errors (C1083) for files -npWebGamePlugin.sbr
-npPlugin.sbr
-webCommon.sbr
all 3 say Permission denied
Fatal error (LNK1181) cannot open compile.lib
Fatal error (C1083) for atlbase.h - No such file or directory
Interestingly when I simply hit recompile, immediately after, the error list shrinks, the 3 fatal errors (C1083) for files npWebGamePlugin.sbr, npPlugin.sbr, webCommon.sbr, are gone from the list and the compile.lib error is duplicated. Not sure what's going on there.
I have the latest version of DirectX installed and have added the paths necessary to the VC++ directories. I have been messing with this thing for about a week. I have had little success, as fixing one error seems to lead to another. So I figured if I can get a new project to compile I can work from there. Any help is appreciated. Thanks.
An error code from "Performing Custom Build Step"
Error BK1506 for aiClient.sbr - No such file or directory
3 fatal errors (C1083) for files -npWebGamePlugin.sbr
-npPlugin.sbr
-webCommon.sbr
all 3 say Permission denied
Fatal error (LNK1181) cannot open compile.lib
Fatal error (C1083) for atlbase.h - No such file or directory
Interestingly when I simply hit recompile, immediately after, the error list shrinks, the 3 fatal errors (C1083) for files npWebGamePlugin.sbr, npPlugin.sbr, webCommon.sbr, are gone from the list and the compile.lib error is duplicated. Not sure what's going on there.
I have the latest version of DirectX installed and have added the paths necessary to the VC++ directories. I have been messing with this thing for about a week. I have had little success, as fixing one error seems to lead to another. So I figured if I can get a new project to compile I can work from there. Any help is appreciated. Thanks.
About the author
I'm a computer science major at Stony Brook University, and have been working with the Torque Game Engine for a number of years.
#2
07/25/2011 (11:40 pm)
Thanks for your help. The removal of the web plugins got rid of 2 of the errors. Also I installed the SDK as explained in the how to you linked me to, however I the error list didn't change. The error list now reads 3 problems: the "Performing Custom Build Step" error, the aiClient.sbr, and the compile.lib problem. Any ideas?
#3
07/26/2011 (3:54 am)
I believe this a pre SP1 issue with VS2008, install or re-install Visual Studio 2008 service pack 1 and see if that helps
#5
As for the error list and possible reasons for the error BK1506 occurring: it's not option 1 because I have had and solved that one in the past, I doubt its option 2 or 3. However, I also feel that it isn't option 4 because then everyone would be having this problem, and again I'm using a completely new, untouched torque project. If you have some sort of way to check for 2 or 3 I could try that.
Again, thanks for your help.
07/26/2011 (10:51 am)
OK so I re-installed Visual Studio Express 2008 SP1 and unfortunately there were no changes in the error list. Just making sure...I got the C++ version (2nd dwnld) from here.As for the error list and possible reasons for the error BK1506 occurring: it's not option 1 because I have had and solved that one in the past, I doubt its option 2 or 3. However, I also feel that it isn't option 4 because then everyone would be having this problem, and again I'm using a completely new, untouched torque project. If you have some sort of way to check for 2 or 3 I could try that.
Again, thanks for your help.
#6
I ask because if you use Windows Vista/Seven, you may have permission problems related to UAC.
So, make sure you have installed torque out of the Program Files folder.
07/26/2011 (11:00 am)
In which folder you installed the Torque3D?I ask because if you use Windows Vista/Seven, you may have permission problems related to UAC.
So, make sure you have installed torque out of the Program Files folder.
#7
07/26/2011 (11:09 am)
Torque is installed in C:\Torque. Also I am using Windows 7.
#8
Assuming you have everything installed correctly, platform SDK, Directx SDK and so on, heres a couple of things to try.
1) Clean and rebuild the solution
2) If the only errors you get are linker errors, build again without cleaning
if that still fails, double check your entire build log to see if there are any individual file errors that have presented, its very easy to miss individual file compilation errors as you compile the engine, the message seems to indicate that aiclient.cpp failed to compile correctly, so you might want to try and compile that file on its own (right click in solution explorer and compile) to see its error messages if any now youve installe dthe extras.
07/26/2011 (12:08 pm)
Google is nobodies friend anymore its like finding 1 straight needle amongst the 10,000 needles lost in the haystack, greater than 50% of the answers are wildly incorrect and only some level of expertise within the problem domain allows you to weed out the garbage and shortlist the potential solutions, if you are a novice you spend more time implementing or trying to implement a poor solution because its the incorrect one.Assuming you have everything installed correctly, platform SDK, Directx SDK and so on, heres a couple of things to try.
1) Clean and rebuild the solution
2) If the only errors you get are linker errors, build again without cleaning
if that still fails, double check your entire build log to see if there are any individual file errors that have presented, its very easy to miss individual file compilation errors as you compile the engine, the message seems to indicate that aiclient.cpp failed to compile correctly, so you might want to try and compile that file on its own (right click in solution explorer and compile) to see its error messages if any now youve installe dthe extras.
#9
Am I missing something...or possibly doing something wrong. I have Visual C++ 2008 Express SP1, Windows SDK v7.0, Microsoft .NET framework 3.5 SP1, and DirectX SDK (June 2010). I added the Libraries, Include folders, and Bins in the VC++ directories (in there respective directories). I also set the Visual Studio to work with SDK v7.0 in the command prompt for Visual C++, as specified in the instructions.
Thanks for your help.
EDIT: Also the file aiClient (any extension) does not exist on my computer. :/
07/26/2011 (1:51 pm)
Ok, so I tried your suggestions and had no success. Those three errors are still there. So I decided that I had probably done something wrong during the install. So I uninstalled DirectX SDK, the Windows SDK and all my Visual Express programs. I then re-installed them, however it still refuses to work. Am I missing something...or possibly doing something wrong. I have Visual C++ 2008 Express SP1, Windows SDK v7.0, Microsoft .NET framework 3.5 SP1, and DirectX SDK (June 2010). I added the Libraries, Include folders, and Bins in the VC++ directories (in there respective directories). I also set the Visual Studio to work with SDK v7.0 in the command prompt for Visual C++, as specified in the instructions.
Thanks for your help.
EDIT: Also the file aiClient (any extension) does not exist on my computer. :/
#10
Perhaps you need to re-install torque, though ive no idea why such specific files would be missing.
07/27/2011 (3:18 am)
aiClient.cpp and aiClient.h should be in the engine/source/T3D folder...Perhaps you need to re-install torque, though ive no idea why such specific files would be missing.
#11
Thanks for your help.
07/27/2011 (12:17 pm)
OK thanks, I found them. IDK why they weren't in the search. I added those to the project and compiled aiClient.cpp separately. The error went away, and was replaced by a new one, basically the same error but with another file. So I compiled that one, another error. Long story short, it's making me go through and compile each file individually. There are quite a few files in that project so before I go through and compile all of them individually, I thought I should ask if there's another way to do this.Thanks for your help.
#12
07/27/2011 (12:42 pm)
Have you done a full clean before you recompile? Sounds like you have some stray temporary files clogging up the works.
#13
Also just an update, out of boredom/desperation I went through and compiled the files. It did get rid of the error so now the list only reads two errors: the error "Performing Custom Build Step" and the error saying that it cannot find the project.lib.
EDIT: I noticed that the actual error in performing the custom build step is: nasm is unable to open platformCPUInfo.obj. Any ideas?
07/27/2011 (1:04 pm)
When you say full clean, are you referring to cleaning the solution before I build it? Or the clean-up button on the torque toolbox?Also just an update, out of boredom/desperation I went through and compiled the files. It did get rid of the error so now the list only reads two errors: the error "Performing Custom Build Step" and the error saying that it cannot find the project.lib.
EDIT: I noticed that the actual error in performing the custom build step is: nasm is unable to open platformCPUInfo.obj. Any ideas?
#14
Perhaps do a search in your project folders for platformCPUInfo.obj, then find out where nasm is expecting it to be, then put it there.... <shrug> The logs should show the nasm command line and should therefore show the relative path to the location where platformCPUInfo.obj is expected.
07/27/2011 (1:43 pm)
It can't find the project.lib file because it wasn't linked, and so not built.Perhaps do a search in your project folders for platformCPUInfo.obj, then find out where nasm is expecting it to be, then put it there.... <shrug> The logs should show the nasm command line and should therefore show the relative path to the location where platformCPUInfo.obj is expected.
#15
07/27/2011 (1:58 pm)
Under the build menu of visual studio you should have, Build Solution, Rebuild solution (which should clean and build in theory), and clean solution.
#16
When I try to input that into the VSCMD it says it can't open the file : $(IntDir)/$(InputName).obj.
I have the platformCPUInfo.asm file in my project DLL project, under Source\Engine\Platform. How would I modify that path to go there, or where exactly should I move the file to be found?
Thanks for your help.
07/27/2011 (2:28 pm)
The command Line that the project is using to try and compile it is: "C:\Torque\Torque 3D 2009 SDK 1.0.1\Engine\bin\nasm\nasmw.exe" -f win32 "$(InputPath)" -o "$(IntDir)/$(InputName).obj"When I try to input that into the VSCMD it says it can't open the file : $(IntDir)/$(InputName).obj.
I have the platformCPUInfo.asm file in my project DLL project, under Source\Engine\Platform. How would I modify that path to go there, or where exactly should I move the file to be found?
Thanks for your help.
#17
"C:TorqueTorque 3D 2009 SDK 1.0.1Enginebinnasmnasmw.exe" -f win32 "C:TorqueTorque 3D 2009 SDK 1.0.1EnginesourceplatformplatformCPUInfo.asm"
-o "C:TorqueTorque 3D 2009 SDK 1.0.1My ProjectsCompile Test 5buildFilesLinkVc2k8.Release.Win32Compile Test 5 DLLplatformCPUInfo.obj"
This led to an error with the next file I need to do. Obviously I don't want to have to do this for all the .asm files in the project. Any ideas? Thanks.
EDIT: So I did a little bit of experimenting with the Command Line and I found that it is the output path that is wrong. Still trying to figure out why though.
07/27/2011 (2:41 pm)
Ok so I was able to fix the problem with the platformCPuInfo.asm file by manually typing out the address for the command line parameters:"C:TorqueTorque 3D 2009 SDK 1.0.1Enginebinnasmnasmw.exe" -f win32 "C:TorqueTorque 3D 2009 SDK 1.0.1EnginesourceplatformplatformCPUInfo.asm"
-o "C:TorqueTorque 3D 2009 SDK 1.0.1My ProjectsCompile Test 5buildFilesLinkVc2k8.Release.Win32Compile Test 5 DLLplatformCPUInfo.obj"
This led to an error with the next file I need to do. Obviously I don't want to have to do this for all the .asm files in the project. Any ideas? Thanks.
EDIT: So I did a little bit of experimenting with the Command Line and I found that it is the output path that is wrong. Still trying to figure out why though.
#18
1st is that the slashes are '/' not '\' and the 2nd is that the directory it thought it was at before this is called could be wrong.
Why are the slashes backwards and how could I get CMD to recognize this as a valid way of changing directories, if that's even possible.
Thanks for your help.
07/27/2011 (3:07 pm)
OK I may have figured out why the output path is so messed up. The value for the $(IntDir) is ../../Link/VC2K8.Release.Win32/Compile Test 5 DLL. I believe there could be 1 of 2 problems here but I'm not sure. 1st is that the slashes are '/' not '\' and the 2nd is that the directory it thought it was at before this is called could be wrong.
Why are the slashes backwards and how could I get CMD to recognize this as a valid way of changing directories, if that's even possible.
Thanks for your help.
#19
I really dont understand how you are getting all of these problems unless its all based around VS2008 express which i dont have or use, torque has always compiled out of the box for me (a few DX SDK issues of my own making notwithstanding)
07/27/2011 (3:24 pm)
Might I suggest you get the latest version of torque, 1.1 final, that way we are all playing with the same version.I really dont understand how you are getting all of these problems unless its all based around VS2008 express which i dont have or use, torque has always compiled out of the box for me (a few DX SDK issues of my own making notwithstanding)
#20
07/27/2011 (3:38 pm)
Yeah, I'll go get it right now, I actually didn't know 1.1 was out.
Torque Owner Alfio Saitta
Collateral Studios
EDIT:
If you do not need the plugins for the web browsers, you can delete the two projects from the solution:
NP yourprojectname PLUGIN
IE yourprojectname PLUGIN