Hi Efren

Could be an 'ANSI Purity' issue.  I've found gcc 4.5 is quite strongly committed to preventing use of those horrible old non-ANSI names (the ones with no leading underscore) when in ANSI mode.  Any of the following flags put it into some flavor of that mode:
-std=C99, -D_ISOC99_SOURCE, -D_POSIX_C_SOURCE=200112
and probably others will too.  One consequence is the compiler automatically #defines _NO_OLDNAMES and/or __STRICT_ANSI__

In this case _NO_OLD_NAMES was evidently not defined, as the line was compiled.  But gcc has other means of defense...

Cheers, Tom


On Thu, Sep 16, 2010 at 12:36 PM, Efren Bravo <efrenba@yahoo.es> wrote:
I'm trying to build a mini project on Eclipse CDT + MinGW
but g++ is throwing me the error that I describe below.


OS: WinXP Pro ES
Packages:
---
ImageMagick (C:\Archivos de programa\ImageMagick-6.6.3-Q16)
MinGW (C:\MinGW)

main.cpp:
---
#include <Magick++.h>
#include <iostream>

using namespace std;
using namespace Magick;

int main(int argc, char *argv[])
{
   //...
}

g++ error:
---
declaration does not declare anything
line 118, external location c:\mingw\include\sys\type.h:

#ifndef _SSIZE_T_
#define _SSIZE_T_
typedef long _ssize_t;

#ifndef _NO_OLDNAMES
typedef _ssize_t ssize_t;     //(line 118)
#endif
#endif /* Not _SSIZE_T_ */


I followed through the header Magick++.h to Magick++/Include.h
and in the line 23 there's this fragment of code:

#if defined(MAGICKCORE_HAVE_SYS_TYPES_H)
# include <sys/types.h>
#endif


Looking for MAGICKCORE_HAVE_SYS_TYPES_H definition I found it was declared
inside magick/magick-config.h (line 223) as:

// Define to include the <sys/types.h> header file
#define MAGICKCORE_HAVE_SYS_TYPES_H 1


Now at this point I don't know what to do.
Why the g++ is throwing me this error?

Thanks in advance.




------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
MinGW-users mailing list
MinGW-users@lists.sourceforge.net

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users