-
Notifications
You must be signed in to change notification settings - Fork 12
Troubleshooting
Oleh Prypin edited this page Feb 22, 2015
·
3 revisions
If you're having problems making nim-csfml work, the most likely cause is incorrectly installed dependencies. The message such as could not load: libcsfml-graphics.so
does not necessarily mean that the library was not found; maybe CSFML just doesn't work (possibly because SFML is missing). So first make sure that you can run the following C program:
#include <SFML/Window.h>
int main() {
sfVideoMode mode = {800, 600, 32};
sfWindow* window = sfWindow_create(mode, "CSFML works!", sfDefaultStyle, NULL);
while (sfWindow_isOpen(window)) {
sfEvent event;
while (sfWindow_pollEvent(window, &event)) {
if (event.type == sfEvtClosed)
sfWindow_close(window);
}
sfWindow_display(window);
}
sfWindow_destroy(window);
return 0;
}
Compile with gcc -lcsfml-window -lcsfml-system main.c
or same with clang
.
One of the typical problems is incompatible versions of SFML and CSFML. CSFML lags behind with updates, so you may need to get an older matching version of SFML.