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

FileReaderFactory not reading files #1037

Open
HowDoesOneMath opened this issue Dec 30, 2023 · 3 comments
Open

FileReaderFactory not reading files #1037

HowDoesOneMath opened this issue Dec 30, 2023 · 3 comments

Comments

@HowDoesOneMath
Copy link

Hello

I'm trying to get Draco working as a library for my C++ project, but have bad experiences with manually linking libraries - as such am trying to get it to work via VCPKG (which I also have limited experience with, but it worked easy enough for certain other libraries like CGAL).

There are two primary issues I've run into:

  1. Draco by default wants Multi-threaded DLL to be the preset for code generation, but this conflicts with certain other libraries I have - can I force it to instead use Multi-threaded? (This is the more minor of the two issues, as I can just create a separate project for draco if all else fails).
  2. I've seen this mentioned earlier, but FileReaderFactory seems to be unable to read any files I feed it. I saw a solution earlier related to -Wl,--whole-archive or /WHOLEARCHIVE but when I tried to set up a sample cmake project, it could not recognize either command. Is there a way to get it to work just through VCPKG?

Thank you

@ondys
Copy link
Collaborator

ondys commented Jan 9, 2024

as for the FileReaderFactory, make sure the project links stdio_file_reader.cc. The std file reader then should automatically register to the FileReaderFactory. If that doesn't work you can manually register the reader using FileReaderFactory::RegisterReader(StdioFileReader::Open);.

@HowDoesOneMath
Copy link
Author

Ah, thank you! That worked!

I have one more issue that cropped up however - this time for the obj_decoder. It's telling me there's an error in valence_cache.h, specifically on this line ("Illegal token on right side of ::") - I can't tell exactly what it's complaining about though, as it looks fine to me.

ValenceCacheError

@ondys
Copy link
Collaborator

ondys commented Jan 11, 2024

I think the issue may be that some windows header contain a macro that defines max as some function so it clashes with the std::numerical_limits max function.

One solution is to add #define NOMINMAX before you include windows headers or to add the NOMINMAX to your compiler flags.

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

2 participants