OpenGeode icon indicating copy to clipboard operation
OpenGeode copied to clipboard

absl::StrCat is not working

Open BehzadHemami opened this issue 1 year ago • 4 comments

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

BehzadHemami avatar May 18 '24 08:05 BehzadHemami

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?

BotellaA avatar May 18 '24 13:05 BotellaA

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 avatar May 20 '24 00:05 BehzadHemami

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

BehzadHemami avatar May 20 '24 09:05 BehzadHemami

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?

BotellaA avatar May 22 '24 11:05 BotellaA