Closed Stanlyhalo closed 1 year ago
There is no '&' on line 39. What did you pass as GEN_FN
?
That's what I'm confused about, I didn't change any code. All libs and includes are referenced correctly.
I get no such error in MSVC 2022, even with ISO C++20. How are you calling the library?
What do you mean by calling, if by linking, at least for msdf-atlas-gen, I'm including the directory just above the source files so I can than have my include statement work exactly like examples. Do I also need to set the library and linking paths (I'm doing that for the other libraries that are required for this project).
This is not a link error. You quoted a compilation error originating in a template header file, but you didn't say which CPP file it was emitted for (or which template instance). I am not getting this error from any CPP file in the project, so you have to provide more information.
That's all the info it tells me, it was that error at line 39 in ImmediateAltasGenerator.hpp, I can continue checking, I'll look into some implementation files. I'll also rewrite some of my linking for includes and lib directories. I'm hoping it was just a weird linking error.
Okay, I think I'm getting close, it actually has to do something with the example code I'm using, the only thing I changed in the example code, is I added the include statements for the regular msdf library, and I replace the myProject...
bit with attempting to see if I can call the savePng function.
Edit*: It's not the savePng, I'm gonna just do some testing with commenting to see which code statement is causing the compiling error.
Alright, I have narrowed it down to this statement: generator.generate(glyphs.data(), glyphs.size());
. I'll see if I can just quickly fix what's going on here.
I removed the &
from msdfGenerator
when creating the generator, and now it compiles, however I get some unresolved external symbols I need to solve.
I'm still stuck on the compiling errors, in my main project (the engine), it compiles just fine, but in my other project (the editor), which includes the engine and all the exact same include, libraries, and links as the engine, I get 10 unresolved external symbol errors when trying to use the example code.
I have all the same libraries being included & linked correctly almost 1:1 with the msdf-atlas-gen solution projects. The only difference is that skia didn't compile nor came with a skia.lib so I didn't add that. Could that be it?
Edit*: I'm gonna look around to see how I can compile skia, from the description of skia and these errors, it may be that I don't have a skia.lib.
Yes, these are due to Skia not being linked, however, you can use this project without Skia by turning off MSDFGEN_USE_SKIA
in CMake configuration or by removing the define in MSVC project configuration if you don't use CMake.
Yes, these are due to Skia not being linked, however, you can use this project without Skia by turning off
MSDFGEN_USE_SKIA
in CMake configuration or by removing the define in MSVC project configuration if you don't use CMake.
Oh wow, thanks so much, I'll look into that right now.
Oh my gosh, thank you so much, been tackling with these compiling issues with this library for quite some time. So far, it's already much easier to understand than utilizing something like freetype by hand, so I already appreciate you making this library to do these font atlas generation methods for me. And I think I can say the same for everyone.
I'm trying to link this to my project, and I seem to only have one compiling error at the moment, and it's
'&' requires I-value
at ImmediateAtlasGenerator.hpp at line 39 on the most recent source code download.Is this simply a linking error? Just as an FYI, I use C++ 20 on the msvc build compiler.