FileReaderFactory not reading files
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:
- 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).
- 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
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);.
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.
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.