Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem with string representation #14

Open
hschwane opened this issue Jun 28, 2022 · 4 comments
Open

problem with string representation #14

hschwane opened this issue Jun 28, 2022 · 4 comments

Comments

@hschwane
Copy link

Hi, I encountered a problem when generating the string representation. The result of:

    UUIDv4::UUIDGenerator<std::mt19937_64> uuidGenerator {};
    std::cout << uuidGenerator.getUUID().str() << std::endl;

comes out as:

e4-718a-83ba179eb88d6589-a33a-  a69d

Any idea what could be wrong?

@drux007
Copy link

drux007 commented Sep 26, 2022

When I try to print the generated UUIDs (using the code above) it didn't even compile due to the following error:

error: inlining failed in call to always_inline ‘__m256i _mm256_set1_epi8(char)’: target specific option mismatch

so I needed to set:

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")

in my CMakeLists.txt.

Then, the string representation looks fine to me.

@hschwane
Copy link
Author

That makes sense. I don't think I compiled with arch=native enabled. Tanks for the info.

When I was not able get the UUID generation working back in June, found a different way of solving my problem, not using any UUIDs at all. So I am not using the package at the moment.

@xjsxujingsong
Copy link

Anyway to fix it in Windows?

@crashoz
Copy link
Owner

crashoz commented Mar 16, 2023

You need to enable at least -msse4.1 -mavx -mavx2 to use this library. The -march=native will enable everything you cpu support so will enable these flags automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants