Author Topic: [Solved] Yaml-cpp.dll or static library for x64  (Read 3134 times)

Offline Drago888

  • Captain
  • ***
  • Posts: 57
    • View Profile
[Solved] Yaml-cpp.dll or static library for x64
« on: October 15, 2020, 02:30:22 pm »
Hi,

Does anybody have a compiled version of yaml.cpp that is working and compatible with oxce?

Tried compiling it but always hit unreolved external dependency error when linking oxce.

I am using vs2019 and requires x64 as changing the images in cutscenes, background (not yet done) and ufopedia (not yet done) to resolution 2560 x 1600.
Encounter memory allocation error if changed all cutscenes images.
Suspect due to memory exceeding (i believe is 2gb) for win32.

Thank you
« Last Edit: February 06, 2023, 11:33:43 am by Meridian »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8628
    • View Profile
Re: Yaml-cpp.dll or static library for x64
« Reply #1 on: October 15, 2020, 03:04:22 pm »
x64 deps attached.

PS: I'm 99.9% sure your issue is not the 4gb win32 limit

Offline Drago888

  • Captain
  • ***
  • Posts: 57
    • View Profile
Re: Yaml-cpp.dll or static library for x64
« Reply #2 on: October 15, 2020, 04:22:33 pm »
Thanks. Will investigate more.

Offline Drago888

  • Captain
  • ***
  • Posts: 57
    • View Profile
Re: Yaml-cpp.dll or static library for x64
« Reply #3 on: October 16, 2020, 05:00:49 am »
Thanks Meridian for his help and guidance.

Attached is my dep files for both win32 and x64. (Both working on my local copy)

And the issue is caused by the program using 5GB to load the cutscenes. (Up to 2GB to load all the images and 3GB to upsize the fonts to 8x X-axis, 8x Y-axis).
Will rethink my strategy to use two sets of fonts (big and small) for each size instead of upscaling every couple fonts per slide.

Thanks again for your sharing your expertise


EDIT - Do not use this attachment as does not works for debug. Use the attachment in the below post instead
« Last Edit: October 16, 2020, 10:10:22 pm by Drago888 »

Offline Drago888

  • Captain
  • ***
  • Posts: 57
    • View Profile
Re: Yaml-cpp.dll or static library for x64
« Reply #4 on: October 16, 2020, 09:41:57 am »
Can anybody guide me on how to create the yaml-cppd.lib and yaml-cppd.dll files for debug?

As getting the below error when debugging in both versions
Severity   Code   Description   Project   File   Line   Suppression State
Error   LNK1104   cannot open file 'yaml-cppd.lib'   OpenXcom   D:\oxce\OpenXcom\src\LINK   1   

Thanks

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8628
    • View Profile
Re: Yaml-cpp.dll or static library for x64
« Reply #5 on: October 16, 2020, 10:18:40 am »
Take the ones from the deps_debug/libs/x64 folder and rename them.

Offline Drago888

  • Captain
  • ***
  • Posts: 57
    • View Profile
Re: Yaml-cpp.dll or static library for x64
« Reply #6 on: October 16, 2020, 11:54:46 am »
Thanks Meridian for guidance and pointing to correct direction.

Able to compile and link but running hit read access violation when debugging. (Release version no issue).
This is caused by cannot use 1 set of libraries for both debug and release.


Will try to figure out compiling using older yaml-cpp version based on version v1.6.3 makefile.
« Last Edit: October 16, 2020, 01:02:57 pm by Drago888 »

Offline Drago888

  • Captain
  • ***
  • Posts: 57
    • View Profile
Re: Yaml-cpp.dll or static library for x64
« Reply #7 on: October 16, 2020, 10:14:44 pm »
For those who encounter read access issues like me, please use the attachment in this post for the dependencies.

However, there is some changes to the VS 2019 solution required.

Change for all the configuration (Release - Win32, Debug - Win32, Release - x64, Debug - x64)

1. Linker -> General -> Additional Library Directories
   Change $(ProjectDir)..\deps\lib\$(Platform) to $(ProjectDir)..\deps\lib\$(Platform)\$(Configuration)
2. Build Events -> Post-Build Event -> Command Line
   Change copy /y "$(ProjectDir)..\deps\lib\$(Platform)\*.dll" "$(ProjectDir)..\bin\$(Platform)\"
   to copy /y "$(ProjectDir)..\deps\lib\$(Platform)\$(Configuration)\*.dll" "$(ProjectDir)..\bin\$(Platform)\$(Configuration)\"