Code Monkey home page Code Monkey logo

Comments (7)

stinos avatar stinos commented on July 21, 2024 3

It's not too hard to write a script which fetches the latest version and creates a header-only by taking lodepng.h and appending lodepng.cpp to it (except the #include "lodepng.h" line)

from lodepng.

McNopper avatar McNopper commented on July 21, 2024 2

It would be much more convenient, if it would be just header only like GLI or GLM is.

See, sometimes I need to build for WIndows, Linux (Desktop and embedded), Android (all platforms), Integrity and QNX. Then, you also have 32 / 64 bit and so on. So, as soon as a new release comes out, all these libs need to be built.

When using GLI or GLM, you just include the header and that's it. Would be just great, if this would be possible somehow with lodepng as well.

from lodepng.

lvandeve avatar lvandeve commented on July 21, 2024

Lodepng is already easily included in projects as a single source file plus header, without being a separate library. Does that help for this use case?

from lodepng.

lvandeve avatar lvandeve commented on July 21, 2024

In addition, the script would have to make all functions static or inline.

Would that work? Or #including the .cpp file and placing an anonymous namespace around it?

from lodepng.

McNopper avatar McNopper commented on July 21, 2024

I need to try it out, if this works out.

from lodepng.

stinos avatar stinos commented on July 21, 2024

In addition, the script would have to make all functions static or inline.

Hmm, only if it's included from multiple files I think. Else it will just work.

from lodepng.

McNopper avatar McNopper commented on July 21, 2024

Oh, I made some further research. I found a repo, which provides a header only solution:
https://github.com/nothings/stb

from lodepng.

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.