Bienvenue, Invité. Merci de vous connecter ou de vous inscrire.
Avez-vous perdu votre e-mail d'activation ?

Auteur Sujet: Impossible de compiler avec SFML-devel installé mais possible sans  (Lu 39 fois)

0 Membres et 1 Invité sur ce sujet

guigui0246

  • Newbie
  • *
  • Messages: 1
    • Voir le profil
m.cpp:
```
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>

int main() {
    sf::RenderWindow window(sf::VideoMode(400, 200), "Error");

    while (window.isOpen()) {
    }
}
```

```
[guigui0246_EPITECH@fedora ex3]$ g++ m.cpp -lsfml-graphics -lsfml-window -lsfml-system -lstdc++ -Wall -Wextra -std=c++20 -Werror -g3
[guigui0246_EPITECH@fedora ex3]$ sudo dnf install SFML-devel -y
Updating and loading repositories:
Repositories loaded.
Package                                                            Arch            Version                                                            Repository                                Size
Installing:
 SFML-devel                                                        x86_64          2.6.1-5.fc41                                                       updates                               11.7 MiB

Transaction Summary:
 Installing:        1 packages

Total size of inbound packages is 855 KiB. Need to download 855 KiB.
After this operation, 12 MiB extra will be used (install 12 MiB, remove 0 B).
[1/1] SFML-devel-0:2.6.1-5.fc41.x86_64                                                                                                                      100% |   5.5 MiB/s | 855.3 KiB |  00m00s
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[1/1] Total                                                                                                                                                 100% |   1.4 MiB/s | 855.3 KiB |  00m01s
Running transaction
[1/3] Verify package files                                                                                                                                  100% | 200.0   B/s |   1.0   B |  00m00s
[2/3] Prepare transaction                                                                                                                                   100% |   2.0   B/s |   1.0   B |  00m00s
[3/3] Installing SFML-devel-0:2.6.1-5.fc41.x86_64                                                                                      100% [==================] |  56.1 MiB/s |  11.8 MiB | -00m00s
>>> Running trigger-install scriptlet: glibc-common-0:2.40.9000-1.fc42.x86_64warning: posix.fork(): .fork(), .exec(), .wait() and .redirect2null() are deprecated, use rpm.spawn() or rpm.execute() instead
warning: posix.wait(): .fork(), .exec(), .wait() and .redirect2null() are deprecated, use rpm.spawn() or rpm.execute() instead
[3/3] Installing SFML-devel-0:2.6.1-5.fc41.x86_64                                                                                                           100% |  15.5 MiB/s |  11.8 MiB |  00m01s
Complete!
[guigui0246_EPITECH@fedora ex3]$ g++ m.cpp -lsfml-graphics -lsfml-window -lsfml-system -lstdc++ -Wall -Wextra -std=c++20 -Werror -g3
/usr/bin/ld : /tmp/cc6II8cm.o : dans la fonction « main » :
/home/guigui0246_EPITECH/B-CPP-500-PAR-5-1-bsrtype-guillaume.deplaine/ex3/m.cpp:14:(.text+0xc2) : référence indéfinie vers « sf::Window::isOpen() const »
collect2: erreur: ld a retourné le statut de sortie 1
[guigui0246_EPITECH@fedora ex3]$ ```