OutpostUniverse / OP2Utility

C++ library for working with Outpost 2 related files and tasks.
MIT License
4 stars 0 forks source link

Improve MSVC gtest/gmock dependency #247

Closed Brett208 closed 4 years ago

Brett208 commented 5 years ago

We need to find a gtest dependency that allows us to use gmock on MSVC builds and set MSVC compilations as C++17 compliant. C++17 compliance is required for nesting namespace declarations.

I have continued working with vcpkg. I have OP2Utility compiling locally with the following settings:

'OP2UtilityTest.exe' (Win32): Loaded 'C:\Users\Brett\Documents\OutpostUniverseGitHub\OP2Utility\x86\Debug\OP2UtilityTest.exe'. Symbols loaded.
'OP2UtilityTest.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
'OP2UtilityTest.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
'OP2UtilityTest.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file.
'OP2UtilityTest.exe' (Win32): Loaded 'C:\Users\Brett\Documents\OutpostUniverseGitHub\OP2Utility\x86\Debug\gmockd.dll'. Symbols loaded.
'OP2UtilityTest.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp140d.dll'. Cannot find or open the PDB file.
'OP2UtilityTest.exe' (Win32): Loaded 'C:\Windows\SysWOW64\vcruntime140d.dll'. Cannot find or open the PDB file.
'OP2UtilityTest.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbased.dll'. Cannot find or open the PDB file.
Debug Assertion Failed!

Program: ...OutpostUniverseGitHub\OP2Utility\x86\Debug\OP2UtilityTest.exe
File: minkernel\crts\ucrt\src\appcrt\heap\debug_heap.cpp
Line: 996

Expression: __acrt_first_block == header

For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.

(Press Retry to debug the application)
'OP2UtilityTest.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel.appcore.dll'. Cannot find or open the PDB file.
'OP2UtilityTest.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Cannot find or open the PDB file.
'OP2UtilityTest.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Cannot find or open the PDB file.
'OP2UtilityTest.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Cannot find or open the PDB file.
'OP2UtilityTest.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Cannot find or open the PDB file.
'OP2UtilityTest.exe' (Win32): Loaded 'C:\Windows\SysWOW64\bcryptprimitives.dll'. Cannot find or open the PDB file.
'OP2UtilityTest.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Cannot find or open the PDB file.
'OP2UtilityTest.exe' (Win32): Loaded 'C:\Windows\SysWOW64\user32.dll'. Cannot find or open the PDB file.
'OP2UtilityTest.exe' (Win32): Loaded 'C:\Windows\SysWOW64\win32u.dll'. Cannot find or open the PDB file.
'OP2UtilityTest.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32.dll'. Cannot find or open the PDB file.
'OP2UtilityTest.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32full.dll'. Cannot find or open the PDB file.
'OP2UtilityTest.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp_win.dll'. Cannot find or open the PDB file.
'OP2UtilityTest.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbase.dll'. Cannot find or open the PDB file.
'OP2UtilityTest.exe' (Win32): Loaded 'C:\Windows\SysWOW64\imm32.dll'. Cannot find or open the PDB file.
'OP2UtilityTest.exe' (Win32): Loaded 'C:\Windows\SysWOW64\uxtheme.dll'. Cannot find or open the PDB file.
'OP2UtilityTest.exe' (Win32): Loaded 'C:\Windows\SysWOW64\combase.dll'. Cannot find or open the PDB file.
The thread 0xaf0 has exited with code 0 (0x0).

I'm not really sure how to (Press Retry to debug the application).

Any help on this would be appreciated. I feel close to getting vcpkg's gtest install to work, but I'm stuck and doubt that I will make much more progress on my own.

-Brett

DanRStevens commented 5 years ago

Thank you for looking into this.

Can you push the changes to a branch? It looks like there is some mixing of debug and release builds. The two are likely binary incompatible, so if you force linking of the wrong one, bad things can happen. It's unclear to me if this is a static library or DLL build of Google Test.

Brett208 commented 5 years ago

Added PR #248 as requested.

There doesn't appear to be a static build of Google Test available for install via vcpkg (I'm new to vcpkg so may have missed it).

See the appveyor build for details. It passed with release and failed for debug, so I guess that rules out my local machine being the problem.

-Brett