HOW-TO: Build XBMC for Win32 in VC++ Express Edition
#46
Wink 
kricker Wrote:Can someone put the above info from kraqh3d on the win32 build wiki? I would, but now it's locked except for Ninjas.
so register an account and request 'ninja' access, anyone can do that Rolleyes
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#47
Gamester17 Wrote:so register an account and request 'ninja' access, anyone can do that Rolleyes
I'm registered, I just need to request Ninja status. I'll refer to the wiki for that. Blush
Reply
#48
kraqh3d Wrote:From within VC, there's a Build menu. You can Build Solution, Clean Solution, and Rebuild Solution. (Rebuild is clean followed by a build.) But this only compiles the executable. And VC may default to release type Debug (SDL) which takes a longer time to compile, so you may want to change it to Release (SDL). You'll see that on the top menu.

To make the app, run project\W32BuildSetup\BuildSetup.bat

This will compile a Release executable and put all the other stuff together into a BUILD_WIN32 folder. It'll also create an "installer version" if you have the Nullsoft Installer. If you don't, you'll get an error at the end because it couldnt create the installer version. Just ignore it. You'll still have the BUILD_WIN32 folder which will have everything in it.

To execute BuildSetup.bat is needed Visual Studio .NET 2003? I have only VC++ Studio 2008 Express. This script show me error that VSNET is not found Sad and looking the script code I see that checks if VS Net 2003 is installed, right?
Reply
#49
It should look for VC++ Studio Express if it does not find Visual Studio .NET.
I have been compiling setups with Express trouble free.
Reply
#50
buildsetup.bat works only with vs2008. Something is wrong with your environment.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#51
I tried to compile XBMC with the HOWTO guidance found here:
http://wiki.xbmc.org/?title=HOW-TO_compi...ource_code

I used Visual C++ 2008 Express Edition 9.0, and Microsoft DirectX 9.0 SDK (Summer 2004).

The build goes otherwise OK, but fails miserably on these errors:
Code:
4>guilib.lib(AudioContext.obj) : error LNK2019: unresolved external symbol _DirectSoundCreate@12 referenced in function "public: void __thiscall CAudioContext::SetActiveDevice(int)" (?SetActiveDevice@CAudioContext@@QAEXH@Z)
4>guilib.lib(AudioContext.obj) : error LNK2019: unresolved external symbol _DirectSoundEnumerateA@8 referenced in function "public: void __thiscall CAudioContext::SetActiveDevice(int)" (?SetActiveDevice@CAudioContext@@QAEXH@Z)
4>XBMC\Release (SDL)\XBMC.exe : fatal error LNK1120: 2 unresolved externals

Any idea on how I'd get further?
Reply
#52
BTW, I'm compiling on Windows Vista 64bit.
I found this section in the compilation HOWTO:

Quote:Note that the SDK path depends on your installation. The April SDK needs it platform based. So use either

C:\Program Files\Microsoft DirectX SDK (April 2007)\Lib\x86
or
C:\Program Files\Microsoft DirectX SDK (April 2007)\Lib\x64
Note2: A user report says that for the 2008 SDK the directory should be x86 in any case regardless your build platform.

I used the x64 library path, since I did not see the x86 directory at all. Could this be the problem?
Reply
#53
Kung Foo Wrote:The build goes otherwise OK, but fails miserably on these errors:
Code:
4>guilib.lib(AudioContext.obj) : error LNK2019: unresolved external symbol _DirectSoundCreate@12 referenced in function "public: void __thiscall CAudioContext::SetActiveDevice(int)" (?SetActiveDevice@CAudioContext@@QAEXH@Z)
4>guilib.lib(AudioContext.obj) : error LNK2019: unresolved external symbol _DirectSoundEnumerateA@8 referenced in function "public: void __thiscall CAudioContext::SetActiveDevice(int)" (?SetActiveDevice@CAudioContext@@QAEXH@Z)
4>XBMC\Release (SDL)\XBMC.exe : fatal error LNK1120: 2 unresolved externals

The monolog continues Big Grin

I found out where the problem was. I added also the directory "Microsoft DirectX 9.0 SDK (Summer 2004)\Lib" to the library path, and this fixed my build. So I think "Lib" contains the 32bit (x86) versions, and "Lib/x64" contains the 64bit versions. I have both paths configured in my build and that seems to work. I have not yet tried running though..
Reply
#54
Code:
Note2: A user report says that for the 2008 SDK the directory should be x86 in any case regardless your build platform.

We don't use or have Vista 64bit
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#55
I am having trouble building this.. I am using Windows XP SP3 Professional 32-bit, Visual Studio 2008 Professional SP1.

I followed all the steps on the wiki, I can do "Build Solution" and it works great. When I try to actually run it it complains about "Debug (SDL)/XBMC.exe missing" (if I browse to that folder, it is indeed missing!)

I cannot use the BuildSetup.bat script because it says I do not have VS2008 Express and just bails out.

Why VS2008 Express anyway? Please if you are a student just go download VS2008 Pro for free from DreamSpark, no need to use a cut down product.
Reply
#56
We need the compilation log in order to help you.
Why express? Because it's all we need and we aren't students but anyway I see no reason in buying it.
Feel free to adapt the buildscript that it runs with both versions.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#57
That's the thing, there's pretty much no log.. it just says "XBMC is up-to-date" and never builds the bloody thing (builds guilib, libPlatinum and UnrarXLib though!!!). My debug folder has 0 obj files in it since it doesn't even do anything.

If I build from command line
Code:
devenv "XBMC for Windows.sln" /build "Debug (SDL)"

Then it actually builds XBMC.exe and places it into the right directory, so thank goodness for that. The VS build details are messed up somewhere because if it works from command line it should work from inside VS.

.......

I also tried BuildSetup.bat, all I had to do there was point it to use devenv.exe instead of vcexpress.exe (I tried updating the script to use EITHER one of them, but unfortunately my DOS scripting skills fail, I got syntax errors when I tried to do both).

But even after I figured out I needed to install nsis I got a lot of errors about trying to copy files which weren't there. The setup file "builds" but I'm sure if I tried running it, it would be missing a lot of files. Looking at the instructions, it doesn't seem to mention the build script at all, so where should I be getting these files?
Reply
#58
If you have a proper checkout of our current svn all needed files are there.
Missing the NSIS installer isn't that bad as you get everything needed inside the build_win32 directory only the installer .exe isn't build.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#59
I installed VS2008 Express, now I'm using the BuildSetup.bat script... I followed all the win32 build wiki instructions except for "Building xbmc skinning tool", but I am still getting some "cannot file the file specified" when using the script.

Quote:Found a previous Compiled WIN32 EXE!
[1] a NEW EXE will be compiled for the BUILD_WIN32
[2] existing EXE will be updated (quick mode compile) for the BUILD_WIN32
------------------------------------------------------------
Compile a new EXE? [1/2]:2
Wait while preparing the build.
------------------------------------------------------------
Compiling Solution...
Done!
------------------------------------------------------------
Copying files...
------------------------------------------------------------
Compiling skins...
Compiling Project Mayhem III...
The system cannot find the file specified.
Copying files...
Compiling PM3.HD...
File not found - 1080i
File not found - NTSC
File not found - NTSC16x9
File not found - PAL
File not found - PAL16x9
Copying files...
The system cannot find the path specified.
------------------------------------------------------------
Compiling scripts...
The system cannot find the path specified.
------------------------------------------------------------
Compiling plugins...
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
------------------------------------------------------------
Build Succeeded!
------------------------------------------------------------
Generating installer includes...
------------------------------------------------------------
Creating installer XBMCSetup-Rev16414.exe...
------------------------------------------------------------
Done!
Setup is located at C:\Documents and Settings\igor\My Documents\Visual Studio 20
08\Projects\XBMC\project\Win32BuildSetup\XBMCSetup-Rev16414.exe
------------------------------------------------------------
View the build log in your HTML browser? [y/n]

Should I be worried about this? I am quite scared to try installing from the setup if I'm getting errors like this.
Reply
#60
No worry as the plugin directories are just empty.
If you get the done at the end with an exe everything worked fine.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply

Logout Mark Read Team Forum Stats Members Help
HOW-TO: Build XBMC for Win32 in VC++ Express Edition1