Question

  1. Je ne suis pas programmeur
  2. Je veux compiler Inkscape dans win32, et a trébuché sur ces messages d'erreur:
  

ui / dialogue / filedialogimpl-win32.cpp: 1379: Erreur: dans 'matrice' C ++ 98 doit être initialisé par un constructeur, et non par '{...}'
  faire [1]: *** [ui / dialogue / filedialogimpl-win32.o] Erreur 1

Le code soupçonné d'filedialogimpl-win32.cpp:

...
    // Draw the image
    if(_preview_bitmap_image)    // Is the image a pixbuf?
    {
        // Set the transformation
        const Matrix matrix = {
            scaleFactor, 0,
            0, scaleFactor,
            svgX, svgY };
        context->set_matrix (matrix);
...

Alors, comment est-il écrit dans la norme C de 98?

Je l'ai googler, mais personne ne rencontrais cette façon, pourrait-il être sans rapport?

Était-ce utile?

La solution

Au lieu de

const Matrix matrix = { scaleFactor, 0, 0, scaleFactor, svgX, svgY };

il devrait y avoir quelque chose comme ceci:

const Matrix matrix( scaleFactor, 0, 0, scaleFactor, svgX, svgY );

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top