Comments (6)
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.
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.
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.
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.
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.
Fixed it. Sorry for the delay.
from pascal-sdl-2-headers.
Related Issues (20)
- implementation expected but ; found error in SDL2_net.pas HOT 5
- Bugs in sdlsyswm.inc HOT 5
- Missing field "last_fullscreen_flags" in TSDL_Window HOT 2
- Delphi compilation HOT 2
- f21f039 broke Free Pascal support HOT 1
- Linux jedi.inc compile problems HOT 2
- Invalid TSDL_RendererFlip declaration HOT 2
- Missing SDL_GL_GetDrawableSize HOT 2
- post link is wrong for dgl sources HOT 2
- it Can be used in the firemonkey? HOT 1
- missing some core units HOT 1
- sdl2.0.8 crashes with software rasterizer HOT 10
- Switch to GitLab? (MS bought GitHub) HOT 5
- Change license in accordance with SDL 2 library? HOT 4
- A small bug in sdl2_ttf.pas HOT 1
- Returning PAnsiChar instead of PChar HOT 4
- Compiling for Android from Delphi HOT 4
- more of s uggestion than a bug HOT 2
- Support static linking HOT 2
- Kindly asking for integrating the pull requests. 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 pascal-sdl-2-headers.