pkviet / obs-studio

OBS - Free and open source software for live streaming and screen recording
https://obsproject.com/mantis/
GNU General Public License v2.0
151 stars 20 forks source link

Building OBS Studio Music Edition on windows CMake 'Configure' error #52

Closed RuiOrey closed 3 years ago

RuiOrey commented 3 years ago

Description I'm having a problem building obs music edition on windows, running "Configure" on cmake-gui.

I got this error

CMake Warning (dev) at plugins/win-asio/CMakeLists.txt:38 (target_link_libraries):
  Link library type specifier "optimized" is followed by specifier "debug"
  instead of a library name.  The first specifier will be ignored.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at plugins/win-asio/CMakeLists.txt:38 (target_link_libraries):
  The "debug" argument must be followed by a library.

Configuring incomplete, errors occurred!

I attach an image with my current config.

To Reproduce Steps to reproduce the behavior:

  1. Follow instructions to build on windows
  2. On cmake press 'Configure'

Expected behavior Should get 'Configuring done'

Screenshots 5h6nX

Desktop:

Additional context Building normal OBS Studio(non music edition) did build without problems on my machine. Thanks!

JonFStr commented 3 years ago

The problem is that OBS ME includes the obs-asio plugin, which requires an additional library and the according variables set in CMake. To fix the problem, you shoudl follow the setup-process in the obs-asio-wiki in addition to the normal OBS-compilation

JonFStr commented 3 years ago

Or you just remove the obs-asio plugin if you don't need it. That is probably the faster solution

RuiOrey commented 3 years ago

Thanks. Also had to remove obs-vst3 as had a similar problem. After generating project files had this problem building:

Severity    Code    Description Project File    Line    Suppression State
Error   LNK2019 unresolved external symbol "void __cdecl RegisterTwitchAuth(void)" (?RegisterTwitchAuth@@YAXXZ) referenced in function "public: __cdecl OBSBasic::OBSBasic(class QWidget *)" (??0OBSBasic@@QEAA@PEAVQWidget@@@Z)    obs C:\safe\obs-studio\build5\UI\window-basic-main.obj  1   

image

Any idea of what might be? Thanks again!

JonFStr commented 3 years ago

I have not faced this problem yet, but maybe it has something to do with changed dependencies: OBS 26.1.1 uses different build dependencies than OBS 26.0.1 (The one ME is based on). You can view the old deps by visiting te history of the installation wiki page (i.e. this one)

RuiOrey commented 3 years ago

did not appeared after setting BUILD_BROWSER to TRUE

pkviet commented 3 years ago

Hi, for obs-asio and vst3 you need to compile juce library in release and debug version. There are also cmake vars to set which you can check in the CMakeLists.txt of the plugins. For Twitch support, you need to build the browser indeed. Now that obs-studio is close to releasing v27, I'm gonna release v27 for obs ME anyway, if you're a bit patient. Also if you want obs ME to work better, I'd advise to compile ffmpeg with my aac patches (check on my github for FFmpeg/ pce2 branch).