Building OBS Studio Music Edition on windows CMake 'Configure' error - windows

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:
Anyone has any idea what might be?
Thanks in advance

Related

CMake using two different NDK, why is it broken?

I am trying to build the ceres-library on android.
I am following the instructions been given on the website, but I got stuck with an error and I don't understand why.
I am not an expert in building tools so I do apologize if my question is trivial but I'd like to know why it's not working.
Essentially what happens is that cmake for some reason is using the NDK I've installed with android studio but also the NDK that comes with visual studio if you enable the android development features.
My question first of all is why is using it both? (I would assume I have something broken in my setup but I cannot manage to fix it).
The command line I've been running is the following:
cmake -DCMAKE_TOOLCHAIN_FILE="C:\Users\l.gagliano\AppData\Local\Android\Sdk\ndk\16.1.4479499\build\cmake\android.toolchain.cmake" -DEigen3_DIR=D:\DEV\ceres\eigen\build -DANDROID_ABI=arm64-v8a -DANDROID_STL=c++_shared -DANDROID_NATIVE_API_LEVEL=android-21 -DBUILD_SHARED_LIBS=ON -DMINILOG=ON D:\DEV\ceres\ceres-solver-2.1.0
But I get the following output:
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: C:/Users/l.gagliano/AppData/Local/Android/Sdk/ndk/16.1.4479499/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe
-- Check for working C compiler: C:/Users/l.gagliano/AppData/Local/Android/Sdk/ndk/16.1.4479499/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe - broken
CMake Error at C:/Program Files/CMake/share/cmake-3.25/Modules/CMakeTestCCompiler.cmake:70 (message):
The C compiler
"C:/Users/l.gagliano/AppData/Local/Android/Sdk/ndk/16.1.4479499/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: D:/DEV/ceres/ceres-android/CMakeFiles/CMakeScratch/TryCompile-lab0em
Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/MSBuild/Current/Bin/MSBuild.exe cmTC_366ff.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
ANDROID_HOME=C:\\Microsoft\AndroidSDK\25
ANT_HOME=C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Apps\apache-ant-1.9.3
JAVA_HOME=C:\Program Files\Eclipse Foundation\jdk-8.0.302.8-hotspot
NDK_ROOT=C:\\Microsoft\AndroidNDK64\android-ndk-r16b
testCCompiler.c
In file included from <built-in>:327:
<command line>(3,9): warning : '__ANDROID_API__' macro redefined [-Wmacro-redefined] [D:\DEV\ceres\ceres-android\CMakeFiles\CMakeScratch\TryCompile-lab0em\cmTC_366ff.vcxproj]
#define __ANDROID_API__ 21
^
<command line>(1,9): note: previous definition is here
#define __ANDROID_API__ 19
^
1 warning generated.
C:\\Microsoft\AndroidNDK64\android-ndk-r16b\toolchains\x86_64-4.9\prebuilt\windows-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin\ld: error: cmTC_366ff.dir\Debug\testCCompiler.o: incompatible target
clang.exe: error: linker command failed with exit code 1 (use -v to see invocation)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Application Type\Android\3.0\Android.Common.targets(119,5): error MSB6006: "clang.exe" exited with code 1. [D:\DEV\ceres\ceres-android\CMakeFiles\CMakeScratch\TryCompile-lab0em\cmTC_366ff.vcxproj]
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:60 (project)
-- Configuring incomplete, errors occurred!
See also "D:/DEV/ceres/ceres-android/CMakeFiles/CMakeOutput.log".
See also "D:/DEV/ceres/ceres-android/CMakeFiles/CMakeError.log".
The command line comes from the example given in the Ceres Android section.
Obviously my end goal, apart from understanding the error, is actually fixing it so any suggestion would be appreciated.
This sorted:
cmake -G "Visual Studio 16" -A arm64 -DCMAKE_PREFIX_PATH=D:\DEV\ceres\gflags\build-gflags -DCMAKE_TOOLCHAIN_FILE="C:\Users\l.gagliano\AppData\Local\Android\Sdk\ndk\16.1.4479499\build\cmake\android.toolchain.cmake" -DEigen3_DIR=D:\DEV\ceres\eigen\build -DANDROID_ABI=arm64-v8a -DANDROID_STL=c++_shared -DANDROID_NATIVE_API_LEVEL=android-21 -DBUILD_SHARED_LIBS=ON -DMINIGLOG=ON D:\DEV\ceres\ceres-solver-2.1.0
Mainly the -G "Visual Studio 16" -A arm64 was the big deal.

unable to build native image using quarkus graalvm app

I am trying to build a java app with quarkus and graalvm. I am currently using graalvm version graalvm-ce-java11-windows-amd64-21.2.0 and updated the JAVA_HOME, GRAALVM_HOME and system path as well. For MSVC i have downloaded visual studio and selected the option of MSVC during the installation. BUt when I build the application using mvn clean package -Pnative I am getting below error message
Error: Error compiling query code (in C:\Users\sujay\AppData\Local\Temp\SVM-3930593782158447217\AMD64LibCHelperDirectives.c). Compiler command ''C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\cl.exe' /WX /W4 /wd4244 /wd4245 /wd4800 /wd4804 /wd4214 '/FeC:\Users\sujay\AppData\Local\Temp\SVM-3930593782158447217\AMD64LibCHelperDirectives.exe' 'C:\Users\sujay\AppData\Local\Temp\SVM-3930593782158447217\AMD64LibCHelperDirectives.c'' output included error: [AMD64LibCHelperDirectives.c, C:\Users\sujay\AppData\Local\Temp\SVM-3930593782158447217\AMD64LibCHelperDirectives.c(1): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory]
com.oracle.svm.core.util.UserError$UserException: Error compiling query code (in C:\Users\sujay\AppData\Local\Temp\SVM-3930593782158447217\AMD64LibCHelperDirectives.c). Compiler command ''C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\cl.exe' /WX /W4 /wd4244 /wd4245 /wd4800 /wd4804 /wd4214 '/FeC:\Users\sujay\AppData\Local\Temp\SVM-3930593782158447217\AMD64LibCHelperDirectives.exe' 'C:\Users\A740125\AppData\Local\Temp\SVM-3930593782158447217\AMD64LibCHelperDirectives.c'' output included error: [AMD64LibCHelperDirectives.c, C:\Users\A740125\AppData\Local\Temp\SVM-3930593782158447217\AMD64LibCHelperDirectives.c(1): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory]
at com.oracle.svm.core.util.UserError.abort(UserError.java:139)
at com.oracle.svm.hosted.c.NativeLibraries.reportErrors(NativeLibraries.java:369)
at com.oracle.svm.hosted.NativeImageGenerator.processNativeLibraryImports(NativeImageGenerator.java:1616)
at com.oracle.svm.hosted.NativeImageGenerator.setupNativeLibraries(NativeImageGenerator.java:1090)
at com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:907)
at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:580)
at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$2(NativeImageGenerator.java:495)
at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1414)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:295)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1016)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1665)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1598)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
I dont know if the error is because of some version mismatch or wrong library. Please let me know if I am missing anything
This SO question seems to be about the same sort of issue, though not exactly. While I do not know if it will help, you may need to set another env variable pointing to the VC runtime

In release build getting MTOUCH : error MT5213: Duplicate symbol

Our Xamarin.iOS release build is failing with MTOUCH : error MT5213: Duplicate symbol. This error started happening recently and is likely due to a nuget package somewhere but the funny thing is none of those APIs look familiar at all. I've tried investigating the source but can't find where they're getting included.
I've tried.
1. Downgrading Xamarin forms from latest version to the last point version 2.5xxxx
2. Removing all nuget packages added since our last update in July.
3. Adding --registrar:static
4. Adding -gcc_flags -dead_strip which reduce the errors but still results in this error
___2018-08-24T22:01:20.5791820Z clang : error : linker command failed with exit code 1 (use -v to see invocation) [/Users/vsts/agent/2.136.1/work/1/s/Client/projectName.Client.Forms/iOS/projectName.Forms.iOS.csproj]
2018-08-24T22:01:20.5920220Z error MT5209 : Native linking error : reference to symbol (which has not been assigned an address) _WebPInitYUV444Converters in '_CustomSetup' from /Users/vsts/agent/2.136.1/work/1/s/Client/projectName.Client.Forms/iOS/obj/iPhone/Release/mtouch-cache/WebP.a(libwebpdecode_la-io_dec.o) for architecture armv7 [/Users/vsts/agent/2.136.1/work/1/s/Client/projectName.Client.Forms/iOS/projectName.Forms.iOS.csproj]
2018-08-24T22:01:20.6050340Z MTOUCH : error MT5201: Native linking failed. Please review the build log and the user flags provided to gcc: -dead_strip [/Users/vsts/agent/2.136.1/work/1/s/Client/projectName.Client.Forms/iOS/projectName.Forms.iOS.csproj]
2018-08-24T22:01:20.6130420Z MTOUCH : error MT5202: Native linking failed. Please review the build log. [/Users/vsts/agent/2.136.1/work/1/s/Client/projectName.Client.Forms/iOS/projectName.Forms.iOS.csproj]
2018-08-24T22:01:20.6148240Z
2018-08-24T22:01:20.6180880Z 60 Warning(s)
2018-08-24T22:01:20.6215590Z 4 Error(s)
various --linkskip options to suspect nuget dlls .
How do I get the full error? Can i by pass these ? Here's the a portion of the log file, any help/pointers is greatly appreciated.
2018-08-29T07:57:46.1674730Z duplicate symbol _WebPMultRows in:
2018-08-29T07:57:46.1761750Z /Users/vsts/agent/2.138.6/work/1/s/Client/projectName.Client.Forms/iOS/obj/iPhone/Staging/mtouch-cache/WebP.a(libwebpdspdecode_la-alpha_processing.o)
2018-08-29T07:57:46.1944120Z /Users/vsts/agent/2.138.6/work/1/s/Client/projectName.Client.Forms/iOS/obj/iPhone/Staging/mtouch-cache/liblibwebp.a(alpha_processing.o)
2018-08-29T07:57:46.2117500Z duplicate symbol _WebPMultARGBRows in:
2018-08-29T07:57:46.2265350Z /Users/vsts/agent/2.138.6/work/1/s/Client/projectName.Client.Forms/iOS/obj/iPhone/Staging/mtouch-cache/WebP.a(libwebpdspdecode_la-alpha_processing.o)
Possible reasons for this error:
The same native library is included twice.
Two distinct native libraries happen to define the same symbols.
A native library is not correctly built, and contains the same symbol
more than once. You can confirm this by using the following set of
commands from a terminal (replace i386 with x86_64/armv7/armv7s/arm64
according to which architecture you're building for):
for more information you can access link error-messages
What worked for me was adding the following to mtouch arguments in all configurations, specifically for release|iphone (simulator was working prior)
--registrar:static -gcc_flags "-framework libSkipSharp -dead_strip"
This link was instrumental including a lot trial and error: https://learn.microsoft.com/en-us/xamarin/ios/troubleshooting/mtouch-errors#mt5xxx-gcc-and-toolchain-error-messages

Debugging Qt with Visual Studio

How is it possible to debug Qt 4.8 in Visual Studio 2005?
Building release does work but if i try to debug, I always get this message:
This application has failed to start because the application configuration is incorrect. Review the manifest file for possible errors. Reinstalling the application may fix this problem. For more details, please see the application event log.
How can I fix that? Thank you!
Update
I rebuild Qt for Visual Studio 2005 using configure -platform win32-msvc2005 and jom instead of nmake (damn thats fast) and now get following Errorcode:
The application was unable to start correctly (0xc0150002).Click OK to close the application.
Update2
How can I fix the DLLs and error messages?
Dependency Walker:
Missing DLLs
MSVCP90D.DLL
MSVCR90D.DLL
API-MS-WIN-APPMODEL-RUNTIME-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ERROR-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ROBUFFER-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL
API-MS-WIN-SHCORE-SCALING-L1-1-1.DLL
DCOMP.DLL
IESHIMS.DLL
Error messages
Error: The Side-by-Side configuration information for "c:\qt\4.8.6\bin\QTGUID4.DLL" contains errors.
Error: At least one required implicit or forwarded dependency was not found.
Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
Error: Modules with different CPU types were found.
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.
Update 3
I now started from scratch:
Install qt-opensource-windows-x86-vs2008-4.8.6.exe (building from qt-everywhere-opensource-src-4.8.6.zip would even cause release mode not to work anymore, cannot find QtGuid4.lib and QtGui4.lib, but with building from installed Qt it finds the libs)
Install qt-vs-addin-1.1.11-opensource.exe
jom distclean "Error: File Makefile doesn't exist exit."
jom confclean "Error: File Makefile doesn't exist exit."
configure -platform win32-msvc2005
jom
Last few output lines of jom:
C:\Qt\4.8.6>jom
[...]
qimageiohandler.cpp
qimagereader.cpp
qimagewriter.cpp
qpaintengine_pic.cpp
qkeymapper_win.cpp
qiconloader.cpp
Code wird generiert...
Code wird generiert...
qimage.cpp
jom: C:\Qt\4.8.6\src\gui\Makefile.Release [tmp\obj\release_shared\qguiplatformpl
ugin.obj] Error 2
cl -c -FIqt_gui_pch.h -Yuqt_gui_pch.h -Fptmp\obj\release_shared\QtGui_pc
h.pch -nologo -Zm200 -Zc:wchar_t- -O2 -MD -W3 -w34100 -w34189 -GR -EHsc -DQT_SHA
RED -DQT_THREAD_SUPPORT -DUNICODE -DWIN32 -DQT_BUILD_GUI_LIB -DQT_NO_USING_NAMES
PACE -DQT_MAKEDLL -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -
DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -D_USE_MATH_DEFINES -DQT_NO_DIRECTDRAW -D
QT_USE_BUNDLED_LIBPNG -DPNG_NO_ASSEMBLER_CODE -DQT_NO_CUPS -DQT_NO_LPR -DQT_NO_O
PENTYPE -DQT_NO_STYLE_MAC -DQT_NO_STYLE_GTK -DQT_NO_STYLE_WINDOWSCE -DQT_NO_STYL
E_WINDOWSMOBILE -DQT_NO_STYLE_S60 -DQT_NO_EGL -DQ_INTERNAL_QAPP_SRC -DQT_NO_DIRE
CTWRITE -DQT_DLL -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_
HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DNDEBUG -I"..\..\include\QtCore" -I"..
\..\include" -I"..\..\include\QtGui" -I"tmp\rcc\debug_shared" -I"tmp" -I"..\3rdp
arty\wintab" -I"image" -I"..\3rdparty\libpng" -I"..\3rdparty\zlib" -I"..\3rdpart
y\zlib" -I"..\3rdparty\harfbuzz\src" -I"dialogs" -I"..\..\include\ActiveQt" -I"t
mp\moc\release_shared" -I"." -I"..\..\mkspecs\win32-msvc2005" -Fotmp\obj\release
_shared\ #C:\Users\fpieske\AppData\Local\Temp\qpicture.obj.5884.19719.jom
qpicture.cpp
qpictureformatplugin.cpp
qpixmap.cpp
qpixmapdata.cpp
Code wird generiert...
Code wird generiert...
jom: C:\Qt\4.8.6\src\gui\Makefile [release-all] Error 2
jom: C:\Qt\4.8.6\Makefile [sub-gui-make_default-ordered] Error 2
C:\Qt\4.8.6>
I got it! Was about to quit trying to debug with Visual Studio and use Qt Creator instead. While reading how to configure Qt Creator i read about installing Windows SDK. Well debugging with Qt Creator still does not work (Unknown debugger type "No Engine") but installing Windows SDK solved my debugging problem in Visual Studio!
Try the following:
Open a command prompt and traverse to the directory where your Qt .pro file resides.
Run the following command - qmake -tp vc {name of the project file}.
Open Visual Studio and browse to the same directory. There should now be a generated VS project inside it.
Open the project.
In VS Project Properties|Configuration Properties|Debugging set any Environment or Command Line Arguments.
Build a debug version of the application and run it.
Save solution.
If you encounter build problems it may be that there were incorrectly escaped strings (at least as far as VS is concerned) in the project file. For example
DEFINES+=\"DEFINE_NAME=$$quote(\\"SomeString\\")\"
Will need to be modifed temporarily to this:
DEFINES+=\"DEFINE_NAME=$$quote(\"\"\"SomeString\"\"\")\"

Building/Using CppUnit Library on VS2010

I downloaded and compiled CppUnit to compile with Visual Studio 2010.
After the conversion, I could load the CppUnitLibraries, and it gives me cppunit.lib and cppunit_dll.lib/dll. After copying the headers and libs to a directory, I run this command to get a lot of errors.
I found the conflict of libraries as follows
LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
However, the following command doesn't seem to work.
cl main.cpp complex.cpp testset.cpp /I"C:\CppUnit\include" /link /libpath:"C:\CppUnit\lib" cppunit.lib /NODEFAULTLIB:library
What's wrong with them?
This is the command that I used for compilation/link.
cl main.cpp complex.cpp testset.cpp /I"C:\CppUnit\include" /link /libpath:"C:\CppUnit\lib" cppunit.lib
This is the error message from VS2010.
cppunit.lib(TestResult.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL':
...
node###Z) already defined in LIBCMT.lib(typinfo.obj)
LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:lib
rary
main.exe : fatal error LNK1169: one or more multiply defined symbols found
ADDED
The CppUnit provides older version of project file (dsw), so I needed to convert the file to 2010 solution project manually.
For the error, missing /MD for compilation was the source of the problem. For other compilation warning, I needed to add /EHsc parameter.
cl /EHsc /MD /c /I"./CppUnit/include" main.cpp testset.cpp complex.cpp
link /libpath:"CppUnit/lib" main.obj testset.obj complex.obj cppunit.lib /out:cpptest_static.exe
link /libpath:"CppUnit/lib" main.obj testset.obj complex.obj cppunit_dll.lib /out:cpptest_dynamic.exe
seems like you compiled CppUnit in debug mode, weheras you're now compiling your current files in release mode. Those should not be mixed, and that's what the compiler is telling you.
The quickest way to resolve this would probably be to use a VS project, and check it's settings against the project used to compile CppUnit.
on your edit: you're also mixing runtime libraries (eg check that both are compiled using the /MD switch aka Multi-Threaded DLL)
I upgraded my CPPUNIT projects to visual studio 2010 and had to manually fix it.
The problem in the build was in the final actions where the output files are copied.
For the cppunit_dll project, one of the custom commands is:
copy "$(TargetPath)" ..\..\lib\$(TargetName).dll
copy "$(TargetDir)$(TargetName).lib" ..\..\lib\$(TargetName).lib
$(TargetName) is "cppunit_dll".
This conflicts with what we're actually building: if you look at the Linker options, you see that the output file name is "cppunitd_dll.dll".
The solution I used is to go to ConfigurationPropertys\General, and change "Target Name" from $(ProjectName) to"cppunitd_dll".
I had to to a similar solution for the cppunit project.
read INSTALL-VS.Net2008.txt in the cppunit folder after checking out the source code from SVN.
basically:
there is a visual studio solution under the examples folder.
that being said... i still can't get it to build without errors on vs2010 after converting it. i get 'cmd.exe' failed and failures to copy dlls.

Resources