FreeImage: Erreur de Compilation Sous Ubuntu 10.10

La compilation de la librairie FreeImage 3.14.1 sous Ubuntu 10.10 gènère cette erreur:

In file included from Source/OpenEXR/IlmImf/ImfChromaticities.h:47,
from Source/OpenEXR/./IlmImf/ImfChromaticities.cpp:43:
Source/OpenEXR/Imath/ImathMatrix.h: In constructor ‘Imath::Matrix44::Matrix44() [with T = float]’:
Source/OpenEXR/./IlmImf/ImfChromaticities.cpp:110: instantiated from here
Source/OpenEXR/Imath/ImathMatrix.h:1813: error: ‘memset’ was not declared in this scope

La solution à ce problème: ajouter l’include string.h dans le fichier

#include "ImathPlatform.h"
#include "ImathFun.h"
#include "ImathExc.h"
#include "ImathVec.h"
#include "ImathShear.h"

#include <iostream>
#include <iomanip>

#if (defined _WIN32 || defined _WIN64) && defined _MSC_VER
// suppress exception specification warnings
#pragma warning(disable:4290)

#include <string.h>

namespace Imath {

Après cette modif, la compilation du projet complet FreeImage avec make devrait se dérouler sans problème.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

− 3 = 3