Giter Club home page Giter Club logo

Comments (6)

frostney avatar frostney commented on September 25, 2024

I believe that's the case because the unit names themselves are lowercased in the files themselves. If the unit name would be SDL2_image in the file itself, this would work as expected and may be a better choice than lowercasing all the filenames.

from pascal-sdl-2-headers.

Free-Pascal-meets-SDL-Website avatar Free-Pascal-meets-SDL-Website commented on September 25, 2024

Good idea. Did you experience this issue, too?

For me though, your suggestion doesn't seem to be the reason for this
(although I like the idea to change the unit names to match exactly
their file names.)

Some units have matching file and unit names already:

  • SDL2_gfx,
  • SDL2_mixer,
  • SDL2_net.

The remaining files mismatch the unit names in terms of
letter-capitalization:

  • SDL2.pas' name is "sdl2",
  • SDL2_image is "sdl2_image",
  • SDL2_ttf is "sdl2_ttf".

For me all of them compile well under Linux Mint (Debian/Ubuntu based).
For code completion (ctrl+space) I indeed experienced something strange
for different projects. Usually code completion worked but sometimes it
didn't. This was independent of the actually SDL2 units used. On closer
look when checking for the sdl2 source path (Project > Project
Options... > Paths), the field "Other unit files (-Fu)" was
(surprisingly) empty if the error occured.
For this project to compile
though, it had to be filled at least one time (at least for the first
compile the other day) because otherwise the project will refuse to
compile at all.

I'm a little bit confused at the moment. Lazarus bug?

from pascal-sdl-2-headers.

JazzMaster avatar JazzMaster commented on September 25, 2024

theres a working sdl bgi driver for c but im a massively confused here. c uses as a system path. the code is similar to old bgi pascal flavors. Im just wonder ing how trip it and if this code does the same?

#include <SDL2/SDL_bgi.h>
seems to be the offender.

should I use
uses
SDL_BGI;

instead? and yes, im aware of the c linkage

from pascal-sdl-2-headers.

ev1313 avatar ev1313 commented on September 25, 2024

If you include sdl.pas it should include everything. The only exceptions are sublibraries of SDL like net, audio, etc (which are in separate .pas files).
So it should work, if you just include sdl.pas, else i've missed converting sdl_bgi.h || it was included in a new version.

from pascal-sdl-2-headers.

suve avatar suve commented on September 25, 2024

My comment to #54 went unanswered, so I'm going to re-post it here.

To quote the FPC User Guide: (link)

On systems where filenames are case sensitive (such as UNIX and Linux), the compiler will :

    Search for the original file name, i.e. preserves case.
    Search for the filename all lowercased.
    Search for the filename all uppercased.

As such, I think this issue could be fixed by just changing all the units to use all-lowercase filenames.

from pascal-sdl-2-headers.

ev1313 avatar ev1313 commented on September 25, 2024

Fixed it. Sorry for the delay.

from pascal-sdl-2-headers.

Related Issues (20)

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.