Closed sardaukar closed 7 years ago
Crystal searches lib
in the current directory, not relative to main file.
cd examples && crystal diagnostics.cr
Same thing if I run from the examples dir.
examples git:master ❯ tree
.
├── diagnostics.cr
├── echo.cr
├── flippy_bird.cr
├── gl.cr
├── lib
│ └── crsfml -> ../../src
├── README.md
├── resources
│ ├── background.jpg
│ ├── bird.png
│ ├── font
│ │ ├── Cantarell-Regular.otf
│ │ └── COPYING
│ ├── keyboard-layout.yaml
│ └── shaders
│ ├── blur.frag
│ ├── pixelate.frag
│ └── wave.vert
├── shader.cr
├── shapes.cr
├── simple.cr
├── snakes.cr
├── sound_capture.cr
└── transformable.cr
5 directories, 19 files
examples git:master ❯ crystal diagnostics.cr
Error in diagnostics.cr:2: while requiring "crsfml": can't find file 'crsfml' relative to '/home/sardaukar/Code/FOREIGN/crsfml/examples'
require "crsfml"
^
I don't know...
Might as well show the tree of what's above examples.
The tree was just to show the link is there under lib
but it's still not being picked up by Crystal. Well, thanks anyway.
I actually meant that it could show some information if you provided a tree above.
Anyway, I'd be glad to fix this for you but I don't have the ability to do that through GitHub and don't have any guesses.
The tree above is the rest of this repo.
I've installed SFML and CSFML and VoidCSFML (I think, new Fedora setup - sorry). This is what I get when I run
sudo ldconfig -v | grep sfml
:I had to add
/usr/local/lib
to/etc/ld.so.conf
for it to work. But now when I run an example, I get:This is odd, since
lib/crsfml
relative to examples points to../../src
.What am I doing wrong? Thanks.