GithubHelp home page GithubHelp logo

Compiling error. about msdf-atlas-gen HOT 14 CLOSED

chlumsky avatar chlumsky commented on July 26, 2024
Compiling error.

from msdf-atlas-gen.

Comments (14)

Chlumsky avatar Chlumsky commented on July 26, 2024

There is no '&' on line 39. What did you pass as GEN_FN?

from msdf-atlas-gen.

Stanlyhalo avatar Stanlyhalo commented on July 26, 2024

That's what I'm confused about, I didn't change any code. All libs and includes are referenced correctly.

from msdf-atlas-gen.

Chlumsky avatar Chlumsky commented on July 26, 2024

I get no such error in MSVC 2022, even with ISO C++20. How are you calling the library?

from msdf-atlas-gen.

Stanlyhalo avatar Stanlyhalo commented on July 26, 2024

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).

from msdf-atlas-gen.

Chlumsky avatar Chlumsky commented on July 26, 2024

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.

from msdf-atlas-gen.

Stanlyhalo avatar Stanlyhalo commented on July 26, 2024

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.

from msdf-atlas-gen.

Stanlyhalo avatar Stanlyhalo commented on July 26, 2024

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.

from msdf-atlas-gen.

Stanlyhalo avatar Stanlyhalo commented on July 26, 2024

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.

from msdf-atlas-gen.

Stanlyhalo avatar Stanlyhalo commented on July 26, 2024

I removed the & from msdfGenerator when creating the generator, and now it compiles, however I get some unresolved external symbols I need to solve.

from msdf-atlas-gen.

Stanlyhalo avatar Stanlyhalo commented on July 26, 2024

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.
image

from msdf-atlas-gen.

Stanlyhalo avatar Stanlyhalo commented on July 26, 2024

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.

from msdf-atlas-gen.

Chlumsky avatar Chlumsky commented on July 26, 2024

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.

from msdf-atlas-gen.

Stanlyhalo avatar Stanlyhalo commented on July 26, 2024

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.

from msdf-atlas-gen.

Stanlyhalo avatar Stanlyhalo commented on July 26, 2024

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.

from msdf-atlas-gen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.