# OBS-Studio with Visual Studio 2013



## rich2020 (Oct 23, 2015)

This may be answered somewhere, but I have not been able to find the answer on the forums.

I'd like to use VS2013 to build and debug OBS-Studio. I have got the older OBS to work, but as I understand it, development is focused on the Multi-platform version.

I've tried to follow the following document: https://github.com/jp9000/obs-studio/wiki/Install-Instructions#windows

However, I can't get find the include folder for x264. I have downloaded the x264 source, as well as the compiled version, but there is no include folder.

Does anyone here use VS2013 to develop OBS-Studio? If not, what IDE are you guys using to code & debug?


----------



## Jim (Oct 23, 2015)

VS2013 is what I use on windows.  Just configure it via cmake and as long as you enter in the cmake variables it'll work fine.  You can get the pre-built dependencies (excluding Qt5) for windows here:  http://code.fosshub.com/OBS/downloads


----------



## rich2020 (Oct 23, 2015)

Thank you, Jim. The dependencies file really helped me. Building cURL was not happening ;) (It kept screaming that CURL_LIB was not found. I found out that compiling x264 is no fun, either!

Anyhow, I managed to get it to generate the solution file, but did get one error: libdshowcapture/source/capture-filter.cpp is not found.

Perhaps this is just something that was accidentally left in the CMakeLists file? 
Or, have I not installed something? The project "win-dshow" is unavailable in VS2013, although the obs-mp does compile and run in debug.

Running Windows 10 (if that makes any difference)

======================================================================

Below is the output from the CMake GUI.

=======================================================================

The C compiler identification is MSVC 18.0.40629.0

The CXX compiler identification is MSVC 18.0.40629.0

Check for working C compiler using: Visual Studio 12 2013 Win64

Check for working C compiler using: Visual Studio 12 2013 Win64 -- works

Detecting C compiler ABI info

Detecting C compiler ABI info - done

Check for working CXX compiler using: Visual Studio 12 2013 Win64

Check for working CXX compiler using: Visual Studio 12 2013 Win64 -- works

Detecting CXX compiler ABI info

Detecting CXX compiler ABI info - done

Detecting CXX compile features

Detecting CXX compile features - done

OBS_VERSION: 0.0.1

Found FFmpeg: C:/DEV/obs-studio/dependencies/win64/include/../bin/avcodec.lib (found version "57.3.100") found components: avcodec avfilter avdevice avutil swscale avformat swresample

Jansson >=2.5 not found, building bundled version

Found FFmpeg: C:/DEV/obs-studio/dependencies/win64/include/../bin/avformat.lib (found version "57.2.100") found components: avformat avutil swscale swresample avcodec

Using libavcodec for image loading in libobs

Found FFmpeg: C:/DEV/obs-studio/dependencies/win64/include/../bin/avcodec.lib (found version "57.3.100") found components: avcodec avutil

Libfdk not found - obs-libfdk plugin disabled

Found FFmpeg: C:/DEV/obs-studio/dependencies/win64/include/../bin/avcodec.lib (found version "57.3.100") found components: avcodec avfilter avdevice avutil swscale avformat swresample

Found FFmpeg: C:/DEV/obs-studio/dependencies/win64/include/../bin/avcodec.lib (found version "57.3.100") found components: avcodec avutil avformat

Configuring done

*CMake Error at plugins/win-dshow/CMakeLists.txt:46 (add_library):
Cannot find source file:

libdshowcapture/source/capture-filter.cpp

Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
.hxx .in .txx

CMake Error: CMake can not determine linker language for target: win-dshow*

Generating done

=============================================================================

-Rich


----------



## Chris Barnett (Oct 23, 2015)

Hi Jim,

I'm running into a similar issue getting things to build.. I'm on Windows 7 and VS 2013, but am getting the similar results... i.e. "Building cURL was not happening ;) (It kept screaming that CURL_LIB was not found."... I tried the link you posted with the pre-built dependencies, but looks like that link is now dead... Any chance you can send a new link for the dependencies...?

Cheers,
Chris


----------



## rich2020 (Oct 23, 2015)

Hi Chris,

The link is not dead, just not complete it seems - just search that site for observed and then downloads is at the top.

This one should work: dependencies

-rich


----------



## Gol D. Ace (Oct 24, 2015)

@rich2020
Did you do
git submodule update --init


----------



## rich2020 (Oct 24, 2015)

@Gol D. Ace 

Hmm, don't remember doing so. I downloaded the source from GitHub. From which directory should I run that command?


----------



## Gol D. Ace (Oct 24, 2015)

Well you''re not supposed to download the zip from GitHub.

Get Git or a GUI for Git and clone the repo and init the submodules.


----------



## rich2020 (Oct 24, 2015)

Gol D. Ace said:


> Well you''re not supposed to download the zip from GitHub.



Okay, that's unexpected and not mentioned anywhere that I can tell. Thanks for the info, I will give your suggestion a go. 

Thanks again.


----------



## Jack0r (Oct 24, 2015)

Added the clone step to the wiki.


----------



## shefft (Feb 15, 2016)

I was able to get the obs-studio.sln to manifest using the cmake tool, but the final build step in VS2013 is choking.  Anyone know why I"m getting a whole ton of errors like this?

Error   2   error LNK2001: unresolved external symbol "__declspec(dllimport) public: unsigned int __thiscall QWidget::winId(void)const " (__imp_?winId@QWidget@@QBEIXZ)   C:\Users\ts\Documents\Visual Studio 2013\Projects\obs_build002\obs-studio\obs\qt-display.obj   obs
Error   3   error LNK2001: unresolved external symbol "__declspec(dllimport) void __cdecl qt_assert(char const *,char const *,int)" (__imp_?qt_assert@@YAXPBD0H@Z)   C:\Users\ts\Documents\Visual Studio 2013\Projects\obs_build002\obs-studio\obs\obs_automoc.obj   obs
Error   4   error LNK2001: unresolved external symbol "__declspec(dllimport) void __cdecl qt_assert(char const *,char const *,int)" (__imp_?qt_assert@@YAXPBD0H@Z)   C:\Users\ts\Documents\Visual Studio 2013\Projects\obs_build002\obs-studio\obs\window-log-reply.obj   obs


----------



## Siriö Astarot (Mar 20, 2016)

@rich2020 you can create new project in Visual Studio Community 2015 from OBS source?


----------



## david.fan (Apr 7, 2016)

when i click dependencies.zip download link,it redirect to http://code.fosshub.com/ .
how can i download this file?


----------



## Jack0r (Apr 7, 2016)

Just go to: http://code.fosshub.com/OBS/downloads 
and then click on the dependencies.zip, it worked for me.


----------



## Beast96GT (Jul 14, 2016)

The install docs might need to be updated, but to fix the libdshowcapture error:

1.  Go here:  https://github.com/jp9000.  Looks like Jim's repo.
2.  Download libdshowcapture with Git.
3.  Copy it to the ../obs-studio/plugins/win-dshow/ directory.
4.  Press Generate with CMake again.

Hope this helps for the next guy.

-Chris


----------



## Osiris (Jul 14, 2016)

That's not how to do it, if you follow the install instructions you will get the libdshowcapture submodule.


----------



## Beast96GT (Jul 17, 2016)

You're correct.  The mistake is not doing the git clone recursively.  Seems GitKraken doesn't do that by default or I'm missing something.   Just install Git command line and run it in the directory where you want it to clone to.

Also, I had to hit the CMake 'Configure' button twice after checking 'COPY_DEPENDENCIES' otherwise it left a 'libavcodec_DIR-NOTFOUND' there.  Not sure if that makes a difference, but the message went away.  Thanks.


----------

