Git Product home page Git Product logo

ubgi's People

Contributors

julstrat avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

rchastain

ubgi's Issues

[Linux, SDL_bgi 2.6.0] Error while linking: undefined reference to 'xkbhit'

Hello! Congratulations for this very nice project.

I installed on Linux SDL_bgi 2.6.0. When I try to compile an example from ubgi, I get this error:

[roland@localhost examples (master)]$ fpc -B -Fu.. exus.pas
Free Pascal Compiler version 3.2.0 [2020/07/05] for x86_64
Copyright (c) 1993-2020 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling exus.pas
exus.pas(3,2) Note: APPTYPE is not supported by the target OS
Compiling /home/roland/Documents/pascal/sources/ubgi/ubgi.pas
Linking exus
/usr/bin/ld : /home/roland/Documents/pascal/sources/ubgi/ubgi.o : dans la fonction « UBGI_$$_KEYPRESSED$$BOOLEAN » :
ubgi.pas:(.text.n_ubgi_$$_keypressed$$boolean+0xa) : référence indéfinie vers « kbhit »
Error: Error while linking
Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode

After taking a look into ubgi.pas, I tried this.

function KeyPressed(): Boolean;
begin
{$IFDEF LINUX}
  Result := XKbHit() <> 0;
{$ELSE}
  Result := KbHit() <> 0;
{$ENDIF}
end;

With that modification, I can compile the example. (But I understood later that it wasn't the correct solution. See correct solution below.)

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.