Geode-solutions / OpenGeode

Open source framework for representing and manipulating geometric models
https://geode-solutions.com/opengeode
MIT License
150 stars 11 forks source link

absl::StrCat is not working #925

Closed BehzadHemami closed 2 months ago

BehzadHemami commented 4 months ago

When I try to use OpenGeode to run following codes:

include <geode/tests/common.h>

include <geode/basic/assert.h>

include <geode/basic/logger.h>

include <geode/geometry/point.h>

include <geode/geometry/vector.h>

include <geode/mesh/core/light_regular_grid.h>

include <geode/mesh/core/triangulated_surface.h>

include <geode/mesh/io/triangulated_surface_input.h>

include <geode/mesh/helpers/convert_surface_mesh.h>

int main() {

geode::OpenGeodeMeshLibrary::initialize();
const auto surface2d = geode::load_triangulated_surface< 2 >(
    absl::StrCat(geode::data_path, "3patches.og_tsf2d"));

DEBUG(surface2d->nb_vertices());

return 0;

}

It seems that absl::StrCat is not working. Please tell me how to fix it.

Compiler environment: Win11+VS2022

BotellaA commented 4 months ago

Could you precise what is not working? Is the string output no correct? Does the code compile and link? Do you have an error message?

BehzadHemami commented 4 months ago

The error message is C:\Users\software\example\Project1\x64\Debug\Project1.exe (process 87108) exited with code -1073741819. Press any key to close this window . . .

  1. the absl::StrCat cannot strcat geode::data_path and "3patches.og_tsf2d".
  2. The code is compile and link correctly. Other functions in OpenGeode are working.
BehzadHemami commented 4 months ago

I change the compiler setting from debug to release, absl::StrCat is working.

BotellaA commented 4 months ago

Did you do more tests? At the moment, I do not know why StrCat does not work in Debug. Do you set a specific C++ version in CMake?