Open ErichZimmer opened 3 months ago
Currently, the Linux tests have the following error:
image_utils_test - pnm_load_save_test
../tests/image_utils_test.cpp:55 ............................................................................... ../tests/image_utils_test.cpp:92: FAILED: REQUIRE( im == reloaded ) with expansion: image<g
>[(0,0) -> [2560,1230]][0x7ffe654f85a0] data @ 0x7f0cd9aad010 image<g
>[(0,0) -> [2560,1230]][0x7ffe654f85d0] data @ 0x7f0cd94ab010 min: g0, max: g250, scale: 262 [1711951144551534893] (139693195174656) INFO: registered: image/x-portable-anymap [1711951144551546976] (139693195174656) INFO: registered: image/tiff [1711951144578343752] (139693195174656) DEBUG: PNM [2560, 1[230](https://github.com/ErichZimmer/openpiv-c-- qt/actions/runs/8504472916/job/23291430344#step:8:231)], 65535 [1711951144610999082] (139693195174656) DEBUG: image: 0x7ffe654f89a0 [1711951144612776143] (139693195174656) DEBUG: peaks: [image_view<g >[(59,59) -> [3,3]][0x7ffe654f89a0] data @ 0x5616ce6b4420, image_view<g >[(49,49) -> [3,3]][0x7ffe654f89a0] data @ 0x5616ce6b4420, image_view<g >[(39,39) -> [3,3]][0x7ffe654f89a0] data @ 0x5616ce6b4420]
I have no idea why the current branch does not have this issue and my branch does, even after spending the better half of today on this issue. The build logs are also practically identical...
All tests now pass. It seams that using multi-threaded testing procedures were the cause of these errors.
Preface
By default, MSVC compilers cannot be used to compile shared/dynamic libraries since symbols are not exported by default. However, manually exporting symbols if a MSVC compiler is detected is relatively straight forward and is covered in this pull request. To support MSVC, necessary classes and members of classes are exported using preprocessor directives and conforming to C4251. (e.g., no dll interface warnings). As such, openpivcore compiles using VS 2019 and VS 2022 without the use of SIMD (pocketfft uses GNU vector extensions which has no MSVC port).
New:
openpiv/core/dllexports.h
defines export macroChanges:
openpiv/core/rect.h
now exports necessary public class membersopenpiv/loaders/image_loader.h
now exports necessary public class membersopenpiv/loaders/pnm_image_loader.h
now exports necessary public class membersopenpiv/loaders/tiff_image_loader.h
now exports necessary public class membersREADME.md
Some minor enhancementsWork in Progress: