Comments (1)
This depends on your Linux distribution and how the SDL2 development files were packaged.
For example, on my distro (Void Linux), and on the MSYS2/MINGW64 Windows version, there is this useful file: /usr/include/SDL2/SDL_config.h
/* Comment this if you want to build without any C library requirements */
#define HAVE_LIBC 1
#ifdef HAVE_LIBC
#define STDC_HEADERS 1
#define HAVE_CTYPE_H 1
#define HAVE_STDIO_H 1
#define HAVE_STRING_H 1
However, when I tried to cross compile a Windows 64-bit build on Linux, these were the contents of: /usr/local/x86_64-w64-mingw32/include/SDL2/SDL_config.h
/* This is disabled by default to avoid C runtime dependencies and manifest requirements */
#ifdef HAVE_LIBC
So it turns out the source code relied in some places to have the standard C headers automatically included when using the SDL2 library:
#include <SDL2/SDL.h>
// #include <ctype.h>
// #include <stdio.h>
// #include <string.h>
Since I had installed additional headers and libraries in /usr/local/
directory without using a package manager, and that SDL2 is included in all builds (either as a Window API or a Controller Backend), then my workaround was to change the /usr/local/x86_64-w64-mingw32/bin/sdl2-config
file in the following way:
--cflags)
# echo -I${prefix}/include/SDL2 -Dmain=SDL_main
echo -I${prefix}/include -Dmain=SDL_main -DHAVE_STDIO_H -DHAVE_STRING_H -DHAVE_CTYPE_H
from sm64coopdx.
Related Issues (20)
- [Suggestion] Automatically reconnect to CoopNet
- A way to access player's coopnet id's (via lua) HOT 3
- bring back sex in minecraft mod HOT 5
- the game 64/32bit supporter HOT 1
- A way to straight up remove water from a level, via lua HOT 4
- libSDL2-2.0.so.0: cannot open shared object file: No such file or directory HOT 7
- Chat API HOT 2
- Game does not start HOT 3
- wheres mario HOT 1
- Auto-Refresh
- No "Reset Controls" button. HOT 1
- Plugging in a controller causes the game to freeze HOT 1
- Crash on macOS (arm64) when touching a flame HOT 4
- Unable to run the program (Linux) HOT 31
- Can't bind joystick movements HOT 1
- (not a copy of #19) any other ways to run sm64coopdx on android besides winlator? HOT 12
- Lua engine crash (likely memory corruption, possibly custom voices?)
- Can't enable anti-aliasing HOT 1
- SDL controller API crash on boot
- Unable to open game on Linux Mint; Unknown file type HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sm64coopdx.