ami-iit / matio-cpp

A C++ wrapper of the matio library, with memory ownership handling, to read and write .mat files.
https://ami-iit.github.io/matio-cpp/
BSD 2-Clause "Simplified" License
59 stars 9 forks source link

*.tpp files throw syntax error #62

Open Chasikanaft opened 2 years ago

Chasikanaft commented 2 years ago

Hello there What I got when I tried to load this library into vcpkg:

Severity Code Description Project File String Suppression Status
Error C2760 syntax error: expected token ';' not 'id' wtf c:\temp\vcpkg\installed\x64-windows\include\matiocpp\impl\multidimensionalarray.tpp 70
Severity Code Description Project File String Suppression Status
Error C2760 syntax error: expected token ';' not 'identifier' wtf c:\temp\vcpkg\installed\x64-windows\include\matiocpp\impl\multidimensionalarray.tpp 93
Error C2760 syntax error: expected token ';' not 'id' wtf c:\temp\vcpkg\installed\x64-windows\include\matiocpp\impl\multidimensionalarray.tpp 159
Error C2760 syntax error: expected token ';' not 'identifier' wtf c:\temp\vcpkg\installed\x64-windows\include\matiocpp\impl\multidimensionalarray.tpp 248
Error C2589 (: invalid token to the right of "::" wtf c:\temp\vcpkg\installed\x64-windows\include\matiocpp\impl\vector.tpp 265
Error C2589 (: invalid token to the right of "::" wtf c:\temp\vcpkg\installed\x64-windows\include\matiocpp\impl\vector.tpp 274
Error C7510 "index_type": when using dependent name type, you must prefix "type name" wtf c:\temp\vcpkg\installed\x64-windows\include\matiocpp\impl\multidimensionalarray.tpp 70
Error C7510 "index_type": When using dependent name type, you must prefix "type name" wtf c:\temp\vcpkg\installed\x64-windows\include\matiocpp\impl\multidimensionalarray.tpp 248

I tried compiling the dll and lib via just cmake on VS2017 and got the same results...

What am I doing wrong?)

S-Dafarra commented 2 years ago

Hi @Chasikanaft, thanks for opening the issue. Could you please post here the commands you run with cmake and the corresponding output?

Chasikanaft commented 2 years ago

Thank you for your quick reply, if I understood correctly: this a cmake config: image

This a tests results on VS2017 RUN_TESTS build.


Start testing: Nov 17 10:23 RTZ 2 (ceia)
----------------------------------------------------------
1/12 Testing: MatvarHandlerUnitTests
1/12 Test: MatvarHandlerUnitTests
Command: "C:/Softtools/matio-cpp-master/Build/bin/Release/MatvarHandlerUnitTests.exe"
Directory: C:/Softtools/matio-cpp-master/Build/test
"MatvarHandlerUnitTests" start time: Nov 17 10:23 RTZ 2 (ceia)
Output:
----------------------------------------------------------
Randomness seeded to: 3777003555
[ERROR][matioCpp::WeakMatvar::importMatvar] Cannot import inputPtr. A WeakMatvar cannot modify the matvar pointer.
[ERROR][matioCpp::WeakMatvar::duplicateFromMatio] Cannot duplicate from inputPtr. A WeakMatvar cannot modify the matvar pointer.
===============================================================================
All tests passed (65 assertions in 10 test cases)

<end of output>
Test time =   0.03 sec
----------------------------------------------------------
Test Passed.
"MatvarHandlerUnitTests" end time: Nov 17 10:23 RTZ 2 (ceia)
"MatvarHandlerUnitTests" time elapsed: 00:00:00
----------------------------------------------------------

2/12 Testing: SpanUnitTests
2/12 Test: SpanUnitTests
Command: "C:/Softtools/matio-cpp-master/Build/bin/Release/SpanUnitTests.exe"
Directory: C:/Softtools/matio-cpp-master/Build/test
"SpanUnitTests" start time: Nov 17 10:23 RTZ 2 (ceia)
Output:
----------------------------------------------------------
Randomness seeded to: 107679422
===============================================================================
All tests passed (391 assertions in 30 test cases)

<end of output>
Test time =   0.03 sec
----------------------------------------------------------
Test Passed.
"SpanUnitTests" end time: Nov 17 10:23 RTZ 2 (ceia)
"SpanUnitTests" time elapsed: 00:00:00
----------------------------------------------------------

3/12 Testing: VariableUnitTests
3/12 Test: VariableUnitTests
Command: "C:/Softtools/matio-cpp-master/Build/bin/Release/VariableUnitTests.exe"
Directory: C:/Softtools/matio-cpp-master/Build/test
"VariableUnitTests" start time: Nov 17 10:23 RTZ 2 (ceia)
Output:
----------------------------------------------------------
Randomness seeded to: 435809710
===============================================================================
All tests passed (142 assertions in 6 test cases)

<end of output>
Test time =   0.13 sec
----------------------------------------------------------
Test Passed.
"VariableUnitTests" end time: Nov 17 10:23 RTZ 2 (ceia)
"VariableUnitTests" time elapsed: 00:00:00
----------------------------------------------------------

4/12 Testing: VectorUnitTests
4/12 Test: VectorUnitTests
Command: "C:/Softtools/matio-cpp-master/Build/bin/Release/VectorUnitTests.exe"
Directory: C:/Softtools/matio-cpp-master/Build/test
"VectorUnitTests" start time: Nov 17 10:23 RTZ 2 (ceia)
Output:
----------------------------------------------------------
Randomness seeded to: 2854327966
===============================================================================
All tests passed (282 assertions in 6 test cases)

<end of output>
Test time =   0.03 sec
----------------------------------------------------------
Test Passed.
"VectorUnitTests" end time: Nov 17 10:23 RTZ 2 (ceia)
"VectorUnitTests" time elapsed: 00:00:00
----------------------------------------------------------

5/12 Testing: MultiDimensionalArrayUnitTests
5/12 Test: MultiDimensionalArrayUnitTests
Command: "C:/Softtools/matio-cpp-master/Build/bin/Release/MultiDimensionalArrayUnitTests.exe"
Directory: C:/Softtools/matio-cpp-master/Build/test
"MultiDimensionalArrayUnitTests" start time: Nov 17 10:23 RTZ 2 (ceia)
Output:
----------------------------------------------------------
Randomness seeded to: 86456203
===============================================================================
All tests passed (297 assertions in 6 test cases)

<end of output>
Test time =   0.03 sec
----------------------------------------------------------
Test Passed.
"MultiDimensionalArrayUnitTests" end time: Nov 17 10:23 RTZ 2 (ceia)
"MultiDimensionalArrayUnitTests" time elapsed: 00:00:00
----------------------------------------------------------

6/12 Testing: ElementUnitTests
6/12 Test: ElementUnitTests
Command: "C:/Softtools/matio-cpp-master/Build/bin/Release/ElementUnitTests.exe"
Directory: C:/Softtools/matio-cpp-master/Build/test
"ElementUnitTests" start time: Nov 17 10:23 RTZ 2 (ceia)
Output:
----------------------------------------------------------
Randomness seeded to: 2629716540
===============================================================================
All tests passed (94 assertions in 6 test cases)

<end of output>
Test time =   0.03 sec
----------------------------------------------------------
Test Passed.
"ElementUnitTests" end time: Nov 17 10:23 RTZ 2 (ceia)
"ElementUnitTests" time elapsed: 00:00:00
----------------------------------------------------------

7/12 Testing: CellArrayUnitTests
7/12 Test: CellArrayUnitTests
Command: "C:/Softtools/matio-cpp-master/Build/bin/Release/CellArrayUnitTests.exe"
Directory: C:/Softtools/matio-cpp-master/Build/test
"CellArrayUnitTests" start time: Nov 17 10:23 RTZ 2 (ceia)
Output:
----------------------------------------------------------
Randomness seeded to: 744760710
===============================================================================
All tests passed (399 assertions in 4 test cases)

<end of output>
Test time =   0.03 sec
----------------------------------------------------------
Test Passed.
"CellArrayUnitTests" end time: Nov 17 10:23 RTZ 2 (ceia)
"CellArrayUnitTests" time elapsed: 00:00:00
----------------------------------------------------------

8/12 Testing: FileUnitTests
8/12 Test: FileUnitTests
Command: "C:/Softtools/matio-cpp-master/Build/bin/Release/FileUnitTests.exe"
Directory: C:/Softtools/matio-cpp-master/Build/test
"FileUnitTests" start time: Nov 17 10:23 RTZ 2 (ceia)
Output:
----------------------------------------------------------
Randomness seeded to: 18718019
[ERROR][matioCpp::File::Create] The path /shouldFail does not exists (input file name /shouldFail/test.mat).
[ERROR][matioCpp::File::write] The variable name can contain only alphanumeric characters or underscores (Variable name = "Should Fail").
[ERROR][matioCpp::File::Create] Failed to open the file named test73.mat.
[ERROR][matioCpp::File::write] The file is not open.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
FileUnitTests.exe is a Catch2 v3.0.1 host application.
Run with -? for options

-------------------------------------------------------------------------------
Write version 7.3
-------------------------------------------------------------------------------
C:\Softtools\matio-cpp-master\test\FileUnitTest.cpp(372)
...............................................................................

C:\Softtools\matio-cpp-master\test\FileUnitTest.cpp(379): FAILED:
  REQUIRE( file.write(doubleVar) )
with expansion:
  false

===============================================================================
test cases:  11 |  10 passed | 1 failed
assertions: 240 | 239 passed | 1 failed

<end of output>
Test time =   0.04 sec
----------------------------------------------------------
Test Failed.
"FileUnitTests" end time: Nov 17 10:23 RTZ 2 (ceia)
"FileUnitTests" time elapsed: 00:00:00
----------------------------------------------------------

9/12 Testing: StructUnitTests
9/12 Test: StructUnitTests
Command: "C:/Softtools/matio-cpp-master/Build/bin/Release/StructUnitTests.exe"
Directory: C:/Softtools/matio-cpp-master/Build/test
"StructUnitTests" start time: Nov 17 10:23 RTZ 2 (ceia)
Output:
----------------------------------------------------------
Randomness seeded to: 3071866313
===============================================================================
All tests passed (252 assertions in 4 test cases)

<end of output>
Test time =   0.03 sec
----------------------------------------------------------
Test Passed.
"StructUnitTests" end time: Nov 17 10:23 RTZ 2 (ceia)
"StructUnitTests" time elapsed: 00:00:00
----------------------------------------------------------

10/12 Testing: StructArrayUnitTests
10/12 Test: StructArrayUnitTests
Command: "C:/Softtools/matio-cpp-master/Build/bin/Release/StructArrayUnitTests.exe"
Directory: C:/Softtools/matio-cpp-master/Build/test
"StructArrayUnitTests" start time: Nov 17 10:23 RTZ 2 (ceia)
Output:
----------------------------------------------------------
Randomness seeded to: 2805266372
===============================================================================
All tests passed (436 assertions in 3 test cases)

<end of output>
Test time =   0.03 sec
----------------------------------------------------------
Test Passed.
"StructArrayUnitTests" end time: Nov 17 10:23 RTZ 2 (ceia)
"StructArrayUnitTests" time elapsed: 00:00:00
----------------------------------------------------------

11/12 Testing: StructArrayElementUnitTests
11/12 Test: StructArrayElementUnitTests
Command: "C:/Softtools/matio-cpp-master/Build/bin/Release/StructArrayElementUnitTests.exe"
Directory: C:/Softtools/matio-cpp-master/Build/test
"StructArrayElementUnitTests" start time: Nov 17 10:23 RTZ 2 (ceia)
Output:
----------------------------------------------------------
Randomness seeded to: 3603409240
===============================================================================
All tests passed (62 assertions in 1 test case)

<end of output>
Test time =   0.03 sec
----------------------------------------------------------
Test Passed.
"StructArrayElementUnitTests" end time: Nov 17 10:23 RTZ 2 (ceia)
"StructArrayElementUnitTests" time elapsed: 00:00:00
----------------------------------------------------------

Unable to find executable: C:/Softtools/matio-cpp-master/Build/bin/Release/ExogenousConversionsUnitTests.exe
12/12 Testing: ExogenousConversionsUnitTests
12/12 Test: ExogenousConversionsUnitTests
Command: ""
Directory: C:/Softtools/matio-cpp-master/Build/test
"ExogenousConversionsUnitTests" start time: 
Output:
----------------------------------------------------------
<end of output>
Test time =   0.00 sec
----------------------------------------------------------
Test Passed.
"ExogenousConversionsUnitTests" end time: Nov 17 10:23 RTZ 2 (ceia)
"ExogenousConversionsUnitTests" time elapsed: 00:00:00
----------------------------------------------------------

End testing: Nov 17 10:23 RTZ 2 (ceia)

so vcpkg portfile.cmake file:

vcpkg_from_github(
  OUT_SOURCE_PATH SOURCE_PATH
  REPO ami-iit/matio-cpp
  REF 12022e5fae6127cea7b3f957899e32cf36a30882 #matio-cpp-0.2.1
  SHA512 7f26e64cda9b9742e2a88e3e0cc5eda4e0940b37cc2866a1d70df106f8ba1b08088e9d0780ec461b7f77688957944eddeff2d60416c320c341ed97b564e58b2e
  HEAD_REF master
)

vcpkg_configure_cmake(
  SOURCE_PATH "${SOURCE_PATH}"
)
vcpkg_install_cmake()

vcpkg_fixup_cmake_targets(
CONFIG_PATH "share/matioCpp"
TARGET_PATH "share/matioCpp"
)

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

file(
  INSTALL "${SOURCE_PATH}/LICENSE"
  DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}"
  RENAME copyright)
S-Dafarra commented 2 years ago

Looking at the output of the tests, I see the error

Unable to find executable: C:/Softtools/matio-cpp-master/Build/bin/Release/ExogenousConversionsUnitTests.exe

This may mean that the compilation was not completed successfully. Could you please paste here the ALL_BUILD output? Did you have to edit the matioCpp CMakeLists in any way?

Chasikanaft commented 2 years ago

That ALL BUILD output when compile Release x64 on VS2017 CE

------ Rebuild of all files started: project: ZERO_CHECK, Configuration: Release x64 ------
1>Checking Build System
2>------ Rebuild of all files started: project: matioCpp, Configuration: Release x64 ------
2>Building Custom Rule C:/Softtools/matio-cpp-master/CMakeLists.txt
2>Variable.cpp
2>ConversionUtilities.cpp
2>MatvarHandler.cpp
2>SharedMatvar.cpp
2>WeakMatvar.cpp
2>CellArray.cpp
2>File.cpp
2>Struct.cpp
2>StructArray.cpp
2>ExogenousConversions.cpp
2>Generating code...
2>Auto build dll exports
2> Created library C:/Softtools/matio-cpp-master/Build/lib/Release/matioCpp.lib and object C:/Softtools/matio-cpp-master/Build/lib/Release/matioCpp.exp
2>matioCpp.vcxproj -> C:\Softtools\matio-cpp-master\Build\bin\Release\matioCpp.dll
3>------ Rebuild of all files started: project: CellArrayUnitTests, Configuration: Release x64 ------
4>------ Rebuild of all files started: Project: ElementUnitTests, Configuration: Release x64 ------
5>------ Rebuild of all files started: Project: ExogenousConversionsUnitTests, Configuration: Release x64 ------
6>------ Rebuild of all files started: Project: FileUnitTests, Configuration: Release x64 ------
7>------ Rebuild of all files started: project: MatvarHandlerUnitTests, Configuration: Release x64 ------
8>------ Rebuild of all files started: project: MultiDimensionalArrayUnitTests, Configuration: Release x64 ------
9>------ Rebuild of all files started: Project: SpanUnitTests, Configuration: Release x64 ------
10>------ Rebuild of all files started: project: StructArrayElementUnitTests, Configuration: Release x64 ------
11>------ Rebuild of all files started: project: StructArrayUnitTests, Configuration: Release x64 ------
12>------ Rebuild of all files started: Project: StructUnitTests, Configuration: Release x64 ------
13>------ Rebuild of all files started: Project: VariableUnitTests, Configuration: Release x64 ------
14>------ Rebuild of all files started: Project: VectorUnitTests, Configuration: Release x64 ------
10>Building Custom Rule C:/Softtools/matio-cpp-master/test/CMakeLists.txt
4>Building Custom Rule C:/Softtools/matio-cpp-master/test/CMakeLists.txt
3>Building Custom Rule C:/Softtools/matio-cpp-master/test/CMakeLists.txt
3>CellArrayUnitTest.cpp
10>StructArrayElementUnitTest.cpp
4>ElementUnitTest.cpp
13>Building Custom Rule C:/Softtools/matio-cpp-master/test/CMakeLists.txt
5>Building Custom Rule C:/Softtools/matio-cpp-master/test/CMakeLists.txt
7>Building Custom Rule C:/Softtools/matio-cpp-master/test/CMakeLists.txt
6>Building Custom Rule C:/Softtools/matio-cpp-master/test/CMakeLists.txt
9>Building Custom Rule C:/Softtools/matio-cpp-master/test/CMakeLists.txt
8>Building Custom Rule C:/Softtools/matio-cpp-master/test/CMakeLists.txt
11>Building Custom Rule C:/Softtools/matio-cpp-master/test/CMakeLists.txt
13>VariableUnitTest.cpp
12>Building Custom Rule C:/Softtools/matio-cpp-master/test/CMakeLists.txt
5>ExogenousConversionsUnitTest.cpp
7>MatvarHandlerUnitTest.cpp
6>FileUnitTest.cpp
14>Building Custom Rule C:/Softtools/matio-cpp-master/test/CMakeLists.txt
9>SpanUnitTest.cpp
8>MultiDimensionalArrayUnitTest.cpp
11>StructArrayUnitTest.cpp
12>StructUnitTest.cpp
14>VectorUnitTest.cpp
5>C:\Softtools\matio-cpp-master\test\ExogenousConversionsUnitTest.cpp(60): error C2061: syntax error: identifier "array"
5>C:\Softtools\matio-cpp-master\test\ExogenousConversionsUnitTest.cpp(60): error C2143: syntax error: missing ")" before "{"
5>C:\Softtools\matio-cpp-master\test\ExogenousConversionsUnitTest.cpp(60): error C4430: missing type specifier - expected int. Note. C++ does not support int by default
5>C:\Softtools\matio-cpp-master\test\ExogenousConversionsUnitTest.cpp(60): warning C4183: VISITABLE_DIRECT_INIT: no return type; member function is supposed to return "int"
5>C:\Softtools\matio-cpp-master\test\ExogenousConversionsUnitTest.cpp(60): error C2059: syntax error: )
5>C:\Softtools\matio-cpp-master\test\ExogenousConversionsUnitTest.cpp(60): error C2143: syntax error: missing ";" before "}"
5>C:\Softtools\matio-cpp-master\test\ExogenousConversionsUnitTest.cpp(210): error C2039: array: not a member of "nestedStruct"
5>C:\Softtools\matio-cpp-master\test\ExogenousConversionsUnitTest.cpp(56): note: see "nestedStruct" declaration
5>C:\Softtools\matio-cpp-master\test\ExogenousConversionsUnitTest.cpp(210): error C2672: "checkSameVectors": No matching overloaded function found
5>C:\Softtools\matio-cpp-master\test\ExogenousConversionsUnitTest.cpp(243): error C2672: "matioCpp::make_cell_array": no corresponding overloaded function found
5>C:\Softtools\matio-cpp-master\test\ExogenousConversionsUnitTest.cpp(243): error C2783: matioCpp::CellArray matioCpp::make_cell_array(const std::string &,const iterator &,const iterator &): cannot compose template argument for '__formal'
5>C:\Softtools\matio-cpp-master\include\matioCpp/ExogenousConversions.h(111): note: see note
traversaro commented 2 years ago

The tests are failing because the compilation of the test is failing, so the original error are the compilation errors C2061, C2143, etc etc. In the CI we never test VS2017, only VS2019, so it is possible that that files does not support VS2017 at all. If you could use VS2019, I guess everything should work smooth. Anyhow, if the only objective is using other functionalities of the library that work fine under VS2017, probably you could just set BUILD_TESTING to OFF?

Chasikanaft commented 2 years ago

Build was successful but I can't use the library.. When adding the "include" directory to the project properties (Is it mandatory, right?) to the project (taking into account the addition of all lib and dll), it gives an error "*.tpp" file, which is the case with vcpkg, which is the usual addition of dll, lib, and include dir. (see first post)

1>------ Build Started: Project: ZERO_CHECK, Configuration: Release x64 ------
2>------ Build started: project: matioCpp, Configuration: Release x64 ------
2>Variable.cpp
2>ConversionUtilities.cpp
2>MatvarHandler.cpp
2>SharedMatvar.cpp
2>WeakMatvar.cpp
2>CellArray.cpp
2>File.cpp
2>Struct.cpp
2>StructArray.cpp
2>ExogenousConversions.cpp
2>Generating code...
2>matioCpp.vcxproj -> C:\Softtools\matio-cpp-master\Build\lib\Release\matioCpp.lib
3>------ Build Started: Project: ALL_BUILD, Configuration: Release x64 ------
========== Build: Success: 3, Errors: 0, No Change: 0, Skipped: 0 ==========
traversaro commented 2 years ago

Ah ok, so you basically have the same error of the test but in your code? Then I guess the only option is to update to VS2019.

S-Dafarra commented 2 years ago

I think it could also be related to the version of visit_struct. Can you try unticking USE_SYSTEM_visit_struct in the CMake configuration?

Chasikanaft commented 2 years ago

Its no like test error, its different error like that: Looks like simple syntax error, but why. Cpp standart: ISO C++17 (/std:c++17)

Severity Code Description Project File String Suppression Status
Error C2760 syntax error: expected token ';' not 'id' wtf c:\temp\vcpkg\installed\x64-windows\include\matiocpp\impl\multidimensionalarray.tpp 70
Severity Code Description Project File String Suppression Status
Error C2760 syntax error: expected token ';' not 'identifier' wtf c:\temp\vcpkg\installed\x64-windows\include\matiocpp\impl\multidimensionalarray.tpp 93
Error C2760 syntax error: expected token ';' not 'id' wtf c:\temp\vcpkg\installed\x64-windows\include\matiocpp\impl\multidimensionalarray.tpp 159
Error C2760 syntax error: expected token ';' not 'identifier' wtf c:\temp\vcpkg\installed\x64-windows\include\matiocpp\impl\multidimensionalarray.tpp 248
Error C2589 (: invalid token to the right of "::" wtf c:\temp\vcpkg\installed\x64-windows\include\matiocpp\impl\vector.tpp 265
Error C2589 (: invalid token to the right of "::" wtf c:\temp\vcpkg\installed\x64-windows\include\matiocpp\impl\vector.tpp 274
Error C7510 "index_type": when using dependent name type, you must prefix "type name" wtf c:\temp\vcpkg\installed\x64-windows\include\matiocpp\impl\multidimensionalarray.tpp 70
Error C7510 "index_type": When using dependent name type, you must prefix "type name" wtf c:\temp\vcpkg\installed\x64-windows\include\matiocpp\impl\multidimensionalarray.tpp 248
Chasikanaft commented 2 years ago

I think it could also be related to the version of visit_struct. Can you try unticking USE_SYSTEM_visit_struct in the CMake configuration?

all build succesfully without tests, but syntax error throw just into include

S-Dafarra commented 2 years ago

I would separate two problems at the moment:

  1. Standalone compilation failures (https://github.com/ami-iit/matio-cpp/issues/62#issuecomment-1318368778)
  2. Inclusion of the library (https://github.com/ami-iit/matio-cpp/issues/62#issuecomment-1318405071)

Problem 1

Looking at the errors, it fails on this line https://github.com/ami-iit/matio-cpp/blob/e951ef357224501bc3ea77761d1b8900e4862cfa/test/ExogenousConversionsUnitTest.cpp#L60 In this case array is supposed to be the name of the field whose type is array_3f. The fact that it throws an error there, it could be related to the version of visit_struct and the availability of the macro VISITABLE_DIRECT_INIT. Please, let us know if the tests also compile fine when unticking USE_SYSTEM_visit_struct

Problem 2

In order to use the library, you don't need to include the folders manually. You would need to use cmake. In particular, you can follow the Inclusion section of the README.

First, you need to install matio-cpp defining a CMAKE_INSTALL_PREFIX, let's say C:\my_folder\my_install (please do not copy and paste this path). Then, you need to add C:\my_folder\my_install\bin (note that I added \bin) to the PATH env variable, and append C:\my_folder\my_install to the CMAKE_PREFIX_PATH env variable (or create that variable if it does not exists already).

Then, you need to add the following lines to your CMakeLists

find_package(matioCpp REQUIRED)

# definition of yourTarget ...

target_link_libraries(yourTarget PRIVATE matioCpp::matioCpp)
S-Dafarra commented 2 years ago

Regarding problem 1, I have tried on my system (running Ubuntu), with the master version of visit_struct, but I haven't found any issue. Hence, the remaining possible cases are:

traversaro commented 2 years ago

your system version of visit_struct is old

This may be a good lead indeed. vcpkg has a version of visit_struct that does not contain the features necessary by matio-cpp (see https://github.com/garbageslam/visit_struct/issues/25 and https://github.com/conda-forge/visit_struct-feedstock/pull/1).

S-Dafarra commented 1 year ago

Hi @Chasikanaft, is the problem solved?

Chasikanaft commented 1 year ago

Hi @Chasikanaft, is the problem solved?

Hello, thanks for reply :) While i took a break in this matter, couse i temporarily decided trough my own visit struct - matio shell. About visit struct version, now i have 1.0.0 like that repo last tag - https://github.com/cbeck88/visit_struct.

I will try to return to this task soon with an updated VS from 2017 to 2022. Really not sure if that would work, that be weird.

traversaro commented 1 year ago

About visit struct version, now i have 1.0.0 like that repo last tag - https://github.com/cbeck88/visit_struct.

That would not be enough unfortuantly, if I remember correctly matio-cpp uses some features that are not releases in 1.0.0 .