Compiling TSE with VS 2005 Express Edition
by Willbkool · in Torque Game Engine Advanced · 11/25/2005 (10:04 am) · 66 replies
This is the error I'm getting when I try to compile:
LINK : fatal error LNK1104: cannot open file 'ljpeg.lib'
Any thoughts on fixing this error?
LINK : fatal error LNK1104: cannot open file 'ljpeg.lib'
Any thoughts on fixing this error?
#2
11/25/2005 (11:30 am)
Thanks, I got rid of that error, but more have popped up, guess I'll go back to my VC++ 2002 compiler that works, but doesn't optimize the code.
#3
0) (No Change) All install directories default.
1) (Change) Installed the Visual C++ 2005 Express Edition
2) (Change) 2) Downloaded and installed the Platform Core SDK, PSDK-x86.exe for 32-bit processors. (If you have 64-bit Windows feel free to try the other SDK appropriate for your processor.) Create a folder PlatformSDK under C:\Program Files\Microsoft Visual Studio 8\VC. Copy the bin, include, and lib folders from C:\Program Files\Microsoft Platform SDK to the new folder.
http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en
3) (Change) Using your favorite text editor, change the following file:
C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults\corewin_express.vsprops
Add the following entries to the "Additional Entries" section:
user32.lib
gdi32.lib
winspool.lib
comdlg32.lib
advapi32.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
odbc32.lib
odbccp32.lib
4) (Change) Now we need to point Visual Studio at the files in the DirectX SDK so that it can use them for compilation:
Goto Tools->Options. Expand "Projects and Solutions" on the left and click on "VC++ Directories"
Choose "Include files" from the "Show directories for:" drop down in the top right. Add these two entries (click on the folder looking button):
C:\Program Files\Microsoft DirectX 9.0 SDK (August 2005)\include
Choose "Library files" from the "Show directories for:" drop down in the top right. Add this entry (click on the folder looking button):
C:\Program Files\Microsoft DirectX 9.0 SDK (August 2005)\Lib\x86
5) (Path change) Open up Visual C++ 2005 Express Edition. Choose File->Open->Project/Solution and browse to\vc7\TSE SDK.sln
6) (No change) At this point it will open up the Visual Studio Conversion Wizard. Hit Next, choose Yes, create a backup before converting (if you like), Next, and Finish. It will convert the projects.
7) (Change) Now right-click on Torque Shader Engine in the Solution Explorer and choose "Properties" (at the bottom). Under "Configuration Properties" on the left click on "Debugging". On the right put in ../example in the "Working Directory" property. Next, choose "Release" from the "Configuration" drop down at the top left. Put in ../example in the "Working Directory" property here also.
Now to compile:
8) In the menu goto Build->Build Torque Demo or right-click on the top toolbar and select "Build" from the menus listed there. This'll bring up a floating menu (I always doc mine immediately). The button on the left builds the current project, the middle button builds the entire solution, and the right button cancels an in-progress build. You can just hit the one on the left.
9) Assuming we have it all configured correctly you should see a bunch of warnings but in the end you will get:
Torque Shader Engine - 0 error(s), 1 warning(s)
========== Build: 5 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
The only warning I get is:
..\engine\gfx\D3D\gfxD3DDevice.cpp(31) : warning C4482: nonstandard extension used: enum 'GFXVertexColor::ColorOrdering' used in qualified name
11/28/2005 (10:08 am)
I just got the latest TSE CVS to build using Visual C++ 2005 Express Edition. I basically followed the steps Matt, Brian, and Phil outlined in a seprate resource, but had to make some slight changes to get it to work. 0) (No Change) All install directories default.
1) (Change) Installed the Visual C++ 2005 Express Edition
2) (Change) 2) Downloaded and installed the Platform Core SDK, PSDK-x86.exe for 32-bit processors. (If you have 64-bit Windows feel free to try the other SDK appropriate for your processor.) Create a folder PlatformSDK under C:\Program Files\Microsoft Visual Studio 8\VC. Copy the bin, include, and lib folders from C:\Program Files\Microsoft Platform SDK to the new folder.
http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en
3) (Change) Using your favorite text editor, change the following file:
C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults\corewin_express.vsprops
Add the following entries to the "Additional Entries" section:
user32.lib
gdi32.lib
winspool.lib
comdlg32.lib
advapi32.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
odbc32.lib
odbccp32.lib
4) (Change) Now we need to point Visual Studio at the files in the DirectX SDK so that it can use them for compilation:
Goto Tools->Options. Expand "Projects and Solutions" on the left and click on "VC++ Directories"
Choose "Include files" from the "Show directories for:" drop down in the top right. Add these two entries (click on the folder looking button):
C:\Program Files\Microsoft DirectX 9.0 SDK (August 2005)\include
Choose "Library files" from the "Show directories for:" drop down in the top right. Add this entry (click on the folder looking button):
C:\Program Files\Microsoft DirectX 9.0 SDK (August 2005)\Lib\x86
5) (Path change) Open up Visual C++ 2005 Express Edition. Choose File->Open->Project/Solution and browse to
6) (No change) At this point it will open up the Visual Studio Conversion Wizard. Hit Next, choose Yes, create a backup before converting (if you like), Next, and Finish. It will convert the projects.
7) (Change) Now right-click on Torque Shader Engine in the Solution Explorer and choose "Properties" (at the bottom). Under "Configuration Properties" on the left click on "Debugging". On the right put in ../example in the "Working Directory" property. Next, choose "Release" from the "Configuration" drop down at the top left. Put in ../example in the "Working Directory" property here also.
Now to compile:
8) In the menu goto Build->Build Torque Demo or right-click on the top toolbar and select "Build" from the menus listed there. This'll bring up a floating menu (I always doc mine immediately). The button on the left builds the current project, the middle button builds the entire solution, and the right button cancels an in-progress build. You can just hit the one on the left.
9) Assuming we have it all configured correctly you should see a bunch of warnings but in the end you will get:
Torque Shader Engine - 0 error(s), 1 warning(s)
========== Build: 5 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
The only warning I get is:
..\engine\gfx\D3D\gfxD3DDevice.cpp(31) : warning C4482: nonstandard extension used: enum 'GFXVertexColor::ColorOrdering' used in qualified name
#4
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=9253
11/28/2005 (11:01 am)
I hope you posted this extremely useful tip to the resource as well! :)www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=9253
#5
11/28/2005 (11:05 am)
Not yet Ben ... thanks for reminding me. ;)
#6
Thanks for this "how to" however I have come across a couple of problems...
VS2005express complains that it cannot find:
ODBC32.LIB
ODBCCP32.LIB
If I copy these files from my VS6 install (I run VS2005 on a VMWARE virtual machine)
it then compiles. all be it with 3 warnings, the one you mentioned, and the folowing:
LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
Dunno why the missing libs are no longer included in vs2005, but this will cause some peeps problems.
Also (cos I'm dumb maybe) I had to play with adding the libs to the corewin_express.vsprops
file, cos I didn't know how to correctly add multiple references in this file.. for those who also have
the same disability as me, you simply add the lib names with a space inbetween, like so:
AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib" />
Thanks again for this info, and I hope my input can lead to a "fool proof" resaurce for using 2005 express.
Hewster
btw, to those viewing this thread that do not know, MicroSoft VS2005 express is FREE !!!
http://msdn.microsoft.com/vstudio/express/support/faq/default.aspx#pricing
I know its hard to believe, but its true, its even free to make commercial products with it...
go figure... although I personally believe its Bills way to mass test his software, cos
its only free if you download it before Nov 2006, and you can bet that Dec 2006 there will
be a "significant" update for VS2005, which will address "critical security" issues, and to
update to "VS2006" you'll have to pay.. hay ho, but maybe I'm just a sceptic lol...
11/29/2005 (5:23 pm)
Hi Nathan,Thanks for this "how to" however I have come across a couple of problems...
VS2005express complains that it cannot find:
ODBC32.LIB
ODBCCP32.LIB
If I copy these files from my VS6 install (I run VS2005 on a VMWARE virtual machine)
it then compiles. all be it with 3 warnings, the one you mentioned, and the folowing:
LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
Dunno why the missing libs are no longer included in vs2005, but this will cause some peeps problems.
Also (cos I'm dumb maybe) I had to play with adding the libs to the corewin_express.vsprops
file, cos I didn't know how to correctly add multiple references in this file.. for those who also have
the same disability as me, you simply add the lib names with a space inbetween, like so:
AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib" />
Thanks again for this info, and I hope my input can lead to a "fool proof" resaurce for using 2005 express.
Hewster
btw, to those viewing this thread that do not know, MicroSoft VS2005 express is FREE !!!
http://msdn.microsoft.com/vstudio/express/support/faq/default.aspx#pricing
I know its hard to believe, but its true, its even free to make commercial products with it...
go figure... although I personally believe its Bills way to mass test his software, cos
its only free if you download it before Nov 2006, and you can bet that Dec 2006 there will
be a "significant" update for VS2005, which will address "critical security" issues, and to
update to "VS2006" you'll have to pay.. hay ho, but maybe I'm just a sceptic lol...
#7
cl : Command line error D8016 : '/O2' and '/RTC1' command-line options are incompatible
and
BSCMAKE: error BK1506 : cannot open file '..\engine\out.vc7.win32.debug\audioBuffer.sbr': No such file or directory
11/29/2005 (7:54 pm)
I did everything posted above but I still get 2 errors:cl : Command line error D8016 : '/O2' and '/RTC1' command-line options are incompatible
and
BSCMAKE: error BK1506 : cannot open file '..\engine\out.vc7.win32.debug\audioBuffer.sbr': No such file or directory
#8
I'm looking int the LNK4098 Errors.
11/30/2005 (4:37 pm)
Hewster: I tracked down the ODBC32 and ODBCCP32.LIB errors down to the SQL Server Express which I installed at the same time as I installed VC05.I'm looking int the LNK4098 Errors.
#9
12/02/2005 (7:47 pm)
@Bkool - did you verify that file was there in the source? (audioBuffer.sbr??)
#10
[edit]
After deleting my cvs checkout from Nov 13, and getting a new one, I have no errors!!
12/02/2005 (9:12 pm)
Yes there is an audiobuffer.cpp and .h file in the source code if that's what you mean. I also tried upgrading my dx9 files as I was using Dec 2004, but that didn't make any difference either. I can get the Express Edition to compile 1.4 with no problems, but still no luck with TSE yet. I think I'm going to delete my TSE files and download them again.[edit]
After deleting my cvs checkout from Nov 13, and getting a new one, I have no errors!!
#11
I basically did what Nathan King did above, except for a couple of differences.
- In step 2, he copied over some files to a different location. I instead added the original locations (bin, include and lib) to my executable path. Same result, different approach.
For the record, thats tools -> options and then Projects and Solutions -> VC++ Directories. Executable Files should be selected in the "Show Directories For" dropdown box, and then just add the 3 platform sdk paths in there.
- my dtsSDK build failed, but I quickly realised it was an old issue that has cropped up before and has been fixed in 1.4 I believe. But line 587 of DTSShape.cpp has a variable "int i" declared in a for loop that is then used outside the for loop, so you just declare it above the for loop to clear it up. Its discussed at the top of this resource, but the line number is different back then.
That was it. Fairly painless, although I haven't really tested it out yet.
12/27/2005 (9:58 am)
Just thought I'd add my experience as I compiled TSE for the first time just now without too much fuss in VS2005 express.I basically did what Nathan King did above, except for a couple of differences.
- In step 2, he copied over some files to a different location. I instead added the original locations (bin, include and lib) to my executable path. Same result, different approach.
For the record, thats tools -> options and then Projects and Solutions -> VC++ Directories. Executable Files should be selected in the "Show Directories For" dropdown box, and then just add the 3 platform sdk paths in there.
- my dtsSDK build failed, but I quickly realised it was an old issue that has cropped up before and has been fixed in 1.4 I believe. But line 587 of DTSShape.cpp has a variable "int i" declared in a for loop that is then used outside the for loop, so you just declare it above the for loop to clear it up. Its discussed at the top of this resource, but the line number is different back then.
That was it. Fairly painless, although I haven't really tested it out yet.
#12
12/27/2005 (10:51 am)
Cool, glad to hear the process is gelling for people. :)
#13
I am really glad that tge comes pre-built. I sure do wish that the lighting pack and tse came pre-built like tge.
12/27/2005 (11:09 am)
Man, i can't get express edition to compile tge, the lighting pack or tse. I am really glad that tge comes pre-built. I sure do wish that the lighting pack and tse came pre-built like tge.
#14
What problems are you having specifically Anton. Did you follow all the above steps in Nathans post exactly? If you /whois me on irc and I appear to be around, hit me up and I'll try to help.
12/27/2005 (4:23 pm)
I don't think having TSE prebuilt at this stage would be a good idea, with it in a constant state of development.What problems are you having specifically Anton. Did you follow all the above steps in Nathans post exactly? If you /whois me on irc and I appear to be around, hit me up and I'll try to help.
#15
Nevermind I screwed up by miss spelling some stuff still workin on it lol =p.
Ok finished it got 3 errors the 2 that were mentioned above about the lib and this one
c:\tse\engine\gfx\d3d\gfxd3ddevice.cpp(31) : warning C4482: nonstandard extension used: enum 'GFXVertexColor::ColorOrdering' used in qualified name
any ideas? did you guys figure that one out yet by chance?
@Nathan what did you mean you tracked the lib errors down to the sql server you downloaded at the same time cause I just downloaded the sql server express and installed it and reran vs2005 express and I still got those lib errors, did you have to direct sql at vs2005 somehow?
12/30/2005 (1:51 pm)
I got the latest head version of the tse tried doing the steps that nathan posted and right away I had a problem with vs2005 express converting the files so when I finally tried to build I got 4 built 1 failed and 20 errors any ideas what wouldn't of converted and if that would probably be my problem?Nevermind I screwed up by miss spelling some stuff still workin on it lol =p.
Ok finished it got 3 errors the 2 that were mentioned above about the lib and this one
c:\tse\engine\gfx\d3d\gfxd3ddevice.cpp(31) : warning C4482: nonstandard extension used: enum 'GFXVertexColor::ColorOrdering' used in qualified name
any ideas? did you guys figure that one out yet by chance?
@Nathan what did you mean you tracked the lib errors down to the sql server you downloaded at the same time cause I just downloaded the sql server express and installed it and reran vs2005 express and I still got those lib errors, did you have to direct sql at vs2005 somehow?
#16
Sorry for bringing up an old post.
The files listed above are not included with the "core platform" sdk.
You must install the "Microsoft Data Access Services (MDAC) SDK" part of the platform sdk,
after I did that the above files were added to the platform sdk.
02/07/2006 (9:48 pm)
Quote:
Thanks for this "how to" however I have come across a couple of problems...
VS2005express complains that it cannot find:
ODBC32.LIB
ODBCCP32.LIB
Sorry for bringing up an old post.
The files listed above are not included with the "core platform" sdk.
You must install the "Microsoft Data Access Services (MDAC) SDK" part of the platform sdk,
after I did that the above files were added to the platform sdk.
#17
Now any chance of that being free? And anyway you could point me in the direction to get it I installed the sdk I thought but still doesn't work for me.
02/09/2006 (12:00 pm)
Thanks man really appreciate it! and please any time an "old" post goes unanswered please answer it anyhow cause people like me might be waiting and hoping for just such a thing ;).Now any chance of that being free? And anyway you could point me in the direction to get it I installed the sdk I thought but still doesn't work for me.
#18
Jim Wuerch helped me to resolve the warning C4482: nonstandard extension used: enum 'GFXVertexColor::ColorOrdering' used in qualified name issue. Here is his fix:
I have implemented and tested this to work with TSE on Visual C++ 2005 Express. Simply change Line 31 in /engine/gfx/D3D/gfxD3DDevice.cpp to reflect the code above and re-compile.
02/25/2006 (2:03 am)
@ Nathan and Scott (and anyone else who hasn't solved this):Jim Wuerch helped me to resolve the warning C4482: nonstandard extension used: enum 'GFXVertexColor::ColorOrdering' used in qualified name issue. Here is his fix:
Quote:This warning is telling you that you dont need to specify the enum name, so changing the line to say:
GFXVertexColor::sVertexColorOrdering = GFXVertexColor::ColorOrdering::BGRA;
I have implemented and tested this to work with TSE on Visual C++ 2005 Express. Simply change Line 31 in /engine/gfx/D3D/gfxD3DDevice.cpp to reflect the code above and re-compile.
#19
This seems to be a VS 2005 Express only warning and changing it to make that one compiler happy isn't always a best solution for an engine base.
02/25/2006 (7:39 am)
One thing that you didn't bring over from the other thread:This seems to be a VS 2005 Express only warning and changing it to make that one compiler happy isn't always a best solution for an engine base.
#20
So, yes...this is only for VC++2005.
02/25/2006 (8:34 pm)
Thanks, Stephen. I did mention VC2k5, but not that this was an "only" change...So, yes...this is only for VC++2005.
Torque Owner Dan Partelly
including building libraries and tools. TSE solutin does not, and engine project depends by
having some libs prebuilt.
Dan