Comments (7)
The error may be the order of linking to static libraries,
Replacing $(CC) -O2 -Wall -Wno-return-type -Wno-misleading-indentation -o -lSDL2 $@ $<
by $(CC) -O2 -Wall -Wno-return-type -Wno-misleading-indentation -o $@ $< -lSDL2
in Makefile.
It works for me (Linux ubuntu).
from pokegb.
build error
cc -O2 -Wall -Wno-return-type -Wno-misleading-indentation -lSDL2 -o pokegb pokegb.cc
pokegb.cc:1:10: fatal error: SDL2/SDL.h: No such file or directory
1 | #include <SDL2/SDL.h> /******************************************/
| ^~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:2: pokegb] Error 1
from pokegb.
I used windows 10 and codeblocks 20.03. I open the file pokegb and selected codeblocks as the IDE. I click build this error appears.
from pokegb.
@M90K7 do you have SDL2 installed on your system? I'm assuming SDL2 is in your default include path, but it might not be.
@bioman3020 unforunately it won't compile on Windows directly. You can probably get it working w/ Windows Subsystem for Linux (WSL) though. I'm not sure, since I don't really develop much on Windows.
from pokegb.
The error may be the order of linking to static libraries,
Replacing
$(CC) -O2 -Wall -Wno-return-type -Wno-misleading-indentation -o -lSDL2 $@ $<
by$(CC) -O2 -Wall -Wno-return-type -Wno-misleading-indentation -o $@ $< -lSDL2
in Makefile.It works for me (Linux ubuntu).
This worked, thanks!
from pokegb.
I had the same problem as the OP, and moving -lSDL2
to the end of the build command fixed it for me too (Debian Testing, gcc 10.2.1).
from pokegb.
Thanks, fixed here: 8bcba67
from pokegb.
Related Issues (10)
- Crashes when going to the title screen HOT 13
- Game speed is slightly faster than it should be HOT 3
- crash on Arch HOT 3
- segmentation fault (core dumped)
- Original source code HOT 2
- Segmentation fault upon launch HOT 6
- Make configurable the A/B buttons HOT 3
- Crash on macOS 11.4 HOT 2
- May I translate this article and forward it? HOT 1
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 pokegb.