Coder Social home page Coder Social logo

Build error about pokegb HOT 7 CLOSED

binji avatar binji commented on June 8, 2024
Build error

from pokegb.

Comments (7)

LF-Lin avatar LF-Lin commented on June 8, 2024 2

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.

M90K7 avatar M90K7 commented on June 8, 2024

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.

bioman3020 avatar bioman3020 commented on June 8, 2024

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.

1
2
3

from pokegb.

binji avatar binji commented on June 8, 2024

@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.

Midnoclose avatar Midnoclose commented on June 8, 2024

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.

Screwtapello avatar Screwtapello commented on June 8, 2024

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.

binji avatar binji commented on June 8, 2024

Thanks, fixed here: 8bcba67

from pokegb.

Related Issues (10)

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.