# How to compile OBS Project ?



## Yusufmm (Jan 26, 2013)

I am very interesting in software development even i never develop any software yet. When i looking for a free and open source streaming software i found OBS. Now i want to compile OBS from source before added some stuff because i want to test if i can compile it. I am using MS Visual C++ 2008 Express Edition. I extract OBS_0466a_Source.zip and open up OBS-All.sln then build -> build solution and get many error says "fatal error C1902: Program database manager mismatch; please check your installation". I dont know what really happen so i ask it here. Can someone give me the correct steps to compile OBS ? 

I compile it using MSVC9 from VS2008ExpressENUX1397868.iso -> md5 = ecbcdd918194df9a091261e65fe7b6cd
i think my installation is not corrupt. I also try to reinstall it.


----------



## Jim (Jan 26, 2013)

I unfortunately don't know why you'd get that error.  Also, just so you know, the express edition requires some hacking to get working properly if I recall


----------



## Yusufmm (Jan 27, 2013)

Btw, What MSVC version you have to get OBS working ?


----------



## Muf (Jan 27, 2013)

I would suggest running clean solution and then try again.


----------



## Yusufmm (Jan 27, 2013)

Yes, i already done clean solution and build again but still showing above error. Maybe i will look around for other MSVC version.


----------



## chris84 (Jan 27, 2013)

Most likely it comes from the already compiled .lib's that come with the source. You have to re-compile everything yourself (good luck with x264), have a look at INSTALL for that. Or get the right VS version.


----------



## Jim (Jan 28, 2013)

You don't have to recompile the pre-existing lib files.  x264 and libmp3lame should be fine.


----------



## Grimio (Jan 28, 2013)

Jim said:
			
		

> You don't have to recompile the pre-existing lib files.  x264 and libmp3lame should be fine.


Only if you are running the same compiler version.
I tried compiling with Visual Studio 2008(non SP1), it just couldn't compile the x64 version(debug and release).
After installing the VS service pack, everything went just fine.


----------



## chris84 (Jan 28, 2013)

actually you don't have to recompile x264 since it's not compiled with VS, but you do have to recompile lame if you're not using the same VS version.


----------



## Grimio (Jan 28, 2013)

Yes, chris84 is right. A month or so ago I solved it by recompiling lame, which was a pain in the ass on a whole new level.
Just updating to SP1 is recommended ^^

Jim, did you compile lame with the /GL flag? That might be the issue.


> The format of files produced with /GL in the current version may not be readable by subsequent versions of Visual C++. You should not ship a .lib file comprised of .obj files that were produced with /GL unless you are willing to ship copies of the .lib file for all versions of Visual C++ you expect your users to use, now and in the future.


http://msdn.microsoft.com/en-us/library ... 90%29.aspx


----------



## dougal (Feb 25, 2013)

I'm trying to compile OBS myself and running into a few errors.

I'm using VS2008 SP1.

Trying to build everything at once with OBS-all.sln. I've added the directX lib and include paths to the project directories. Are there others that need to be added?

The steps I'm taking : Open VS, right click OBS-all solution, then build-solution.

Getting quite a few errors from the build. Here's the build output on pastebin: http://pastebin.com/ggNiwWfK

Thanks!


----------



## Muf (Feb 25, 2013)

Install the Windows SDK.


----------



## Jim (Feb 25, 2013)

The latest version requires the windows 8 SDK in addition to the directx SDK now.


----------



## dougal (Feb 25, 2013)

Thanks for the quick replies.

Installed both of those and added them to project directories. Everything seemed to compile fine, and OBS.exe popped up in rundir. 

When i run it I get an error about libx264-129.dll missing.

Any ideas?

Edit: checked the build log, found one error:

4>LINK : fatal error LNK1104: cannot open file 'OBSApi.lib'
4>GraphicsCapture - 1 error(s), 0 warning(s)

Then the final result is:

Build: 8 succeeded, 1 failed, 0 up-to-date, 0 skipped

Really appreciate any help!I've been looking for something to contribute to for a while and this is the first project I use regularly so it makes sense to do some dev work.


----------



## Jim (Feb 25, 2013)

you have to run the batch files included in rundir to copy over the x264 dll.


----------



## dougal (Feb 25, 2013)

agh, silly mistake, thanks.

that errors gone, now i'm getting : "The application was unable to start correctly(0xc000007b). click OK to close the application."  Does this point to anything obvious?

Sorry to be bothering you guys with this trivial stuff, i'm sure you're busy enough as it is. Once i get it going I hopefully won't need to ask anymore questions!


----------



## Jim (Feb 25, 2013)

You copied the wrong build.  If you build with 32bit debug, you need to run copydebug.bat.  if you build 64bit debug, you need to run copydebug64.bat.  etc.


----------



## dougal (Feb 25, 2013)

That fixed it!

Everythings up and running! I noticed there wasn't a build guide I could find, if you'd like I could write one up with the steps I took? might help people like me trying to get started.

Again, thank you!


----------



## Jim (Feb 26, 2013)

it's the INSTALL file that comes with the project


----------

