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

Auteur Sujet: conflits entre x64 et x86  (Lu 1176 fois)

0 Membres et 1 Invité sur ce sujet

Araghast

  • Newbie
  • *
  • Messages: 2
    • Voir le profil
    • E-mail
conflits entre x64 et x86
« le: Mars 12, 2017, 05:18:44 pm »
Bonjour, je code sur Visual Studio Entreprise 2015.
Voilà mon code :
#include <SFML/Graphics.hpp>

int main()
{
        sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
        sf::CircleShape shape(100.f);
        shape.setFillColor(sf::Color::Green);

        while (window.isOpen())
        {
                sf::Event event;
                while (window.pollEvent(event))
                {
                        if (event.type == sf::Event::Closed)
                                window.close();
                }

                window.clear();
                window.draw(shape);
                window.display();
        }

        return 0;
}
Quand j'essaie de compiler Visual Studio me dit qu'il y a un conflit entre le 64 bit et le 36.
Voilà le messages mot pour mot : module machine type 'x64' conflicts with target machine type 'X86'
Le fichier concerné : sfml-graphics-d.lib(sfr-graphics-d-2.dll)
Si quelqu'un peut m'aider se serait super simpa
J'ai déjà suivi des tutorials qui n'ont aboutti à rien comme celui-ci.

These are the things to check, in this order:

    Check your properties options in your linker settings at: Properties > Configuration Properties > Linker > Advanced > Target Machine. Select MachineX64 if you are targeting a 64 bit build, or MachineX86 if you are making a 32 bit build.

    Select Build > Configuration Manager from the main menu in visual studio. Make sure your project has the correct platform specified. It is possible for the IDE to be set to build x64 but an individual project in the solution can be set to target win32. So yeah, visual studio leaves a lot of rope to hang yourself, but that's life.

    Check your library files that they really are of the type of platform are targeting. This can be used by using dumpbin.exe which is in your visual studio VC\bin directory. use the -headers option to dump all your functions. Look for the machine entry for each function. it should include x64 if it's a 64 bit build.

    In visual studio, select Tools > Options from the main menu. select Projects and Solutions > VC++ Directories. Select x64 from the Platform dropdown. Make sure that the first entry is: $(VCInstallDir)\bin\x86_amd64 followed by $(VCInstallDir)\bin.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Messages: 32504
    • Voir le profil
    • SFML's website
    • E-mail
Re : conflits entre x64 et x86
« Réponse #1 le: Mars 12, 2017, 06:17:11 pm »
Tu as téléchargé la version 64 bits de SFML alors que ton projet est configuré pour du 32 bits.
Laurent Gomila - SFML developer

Araghast

  • Newbie
  • *
  • Messages: 2
    • Voir le profil
    • E-mail
Re : conflits entre x64 et x86
« Réponse #2 le: Mars 14, 2017, 10:25:04 pm »
Bon je sais pas trop ce que j'ai fait mais maintenant ça marche c'était le "platform project" je pense.
Merci

 

anything