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

Can't compile on Windows #173

Closed
Ericchi opened this issue Apr 15, 2017 · 6 comments
Closed

Can't compile on Windows #173

Ericchi opened this issue Apr 15, 2017 · 6 comments

Comments

@Ericchi
Copy link

Ericchi commented Apr 15, 2017

The latest release is not the latest version and I'm unable to compile on Windows because libpng is not available to me. I have GnuWin32 and MinGW. Output is:
PS D:\GitHub\rgbds> make CC=gcc
Package libpng was not found in the pkg-config search path.
Perhaps you should add the directory containing `libpng.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libpng' found
src/asm/lexer.o: file not recognized: File format not recognized
collect2.exe: error: ld returned 1 exit status
make.exe": *** [rgbasm] Error 1

@BenHetherington
Copy link
Contributor

If you want to compile rgbgfx, you'll need to install libpng. I'm unfamiliar with GnuWin32 myself, but this page may be a good place to start. As described in the readme, you can check that it's installed properly by running pkg-config --cflags libpng.

Alternatively, if you don't want to compile rgbgfx, you can compile each of the other programs individually, like so:

make rgbasm
make rgblink
make rgbfix

Hope this resolves your issue. If it's of any help, a new release should be coming in the near future.

@AntonioND
Copy link
Member

AntonioND commented Apr 15, 2017

As @Ben10do has said, you need libpng to compile all targets. Just one detail, if you follow his instructions, you'll have to rename rgbasm, rgblink and rgbfix to add the exe extension.

@AntonioND
Copy link
Member

It is true that compiling rgbgfx for Windows is a pain. The other 3 are quite easy in MinGW, either in Windows or cross compiling from Linux, but rgbgfx is quite problematic because of libpng (and libpng depends on zlib...). And Debian doesn't have packages for libpng and zlib for MinGW, so they have to be cross-compiled from source. Cygwin, for some reason, crashes when flex is executed. Some kind of internal error. This is getting ridiculous.

@AntonioND
Copy link
Member

I managed to get a working environment by using a Fedora VM and installing MinGW for 32 and 64 bits, with the packages of libpng and zlib. I've updated the Makefile with the command I need to compile them, but it is not very portable. At least now I can generate Windows binaries easily.

@Ericchi
Copy link
Author

Ericchi commented Apr 17, 2017

Thanks for the release!

@AntonioND
Copy link
Member

I'm going to close this. Compiling rgbgfx on Windows isn't easy, I guess we'll have to live with that... It isn't really updated that often, so the binaries that I upload with each release are probably good enough in most cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants