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

size_t definition missing in picopng library header #134

Closed
jansalleine opened this issue Aug 16, 2021 · 5 comments · Fixed by #135
Closed

size_t definition missing in picopng library header #134

jansalleine opened this issue Aug 16, 2021 · 5 comments · Fixed by #135
Assignees
Labels
bug Something isn't working

Comments

@jansalleine
Copy link

Hi,

when compiling on linux I got tons of errors because of size_t not being declared in picopng library.

Including cstddef in picopng.h will fix this:

#pragma once

#include <vector>
#include <cstddef>

namespace PicoPNG
{
	int decodePNG(std::vector<unsigned char>& out_image, unsigned long& image_width, unsigned long& image_height, const unsigned char* in_png, size_t in_size, bool convert_to_rgba32);
}
@jansalleine jansalleine added the bug Something isn't working label Aug 16, 2021
@micheldebree
Copy link
Collaborator

Hi there, what version of Linux are you compiling on?
What are the steps you use to compile?
I am asking because our reference linux build is succeeding for the master branch, so it does work on some linuxes.
Thanks for reporting!

@micheldebree
Copy link
Collaborator

P.S. picopng is an external dependency so I would prefer to not change anything in the source code for picopng.

@jansalleine
Copy link
Author

I'm using Arch Linux with gcc 11.1.0. Steps to compile: "make" :-)
After asking google: I think older versions of gcc weren't so picky about missing standard headers.

@micheldebree
Copy link
Collaborator

I did the suggested fix on the bug/134 branch: https://github.com/Chordian/sidfactory2/tree/bug/134
@jansalleine Could you confirm this fixes the issue?

@jansalleine
Copy link
Author

@micheldebree Yes, current head -> master of SF2 compiles fine now on Arch / gcc 11.1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants