Most Windows API headers are not designed to be included individually, so
try adding #include <windows.h> before the other headers you want to
include. MinGW GCC 3.2 had a problem with it automatically including
windows.h, so the fact that it worked that way was accidental. Do not
specify standard include directories on the command line.
Luke
----- Original Message -----
From: "Cristiano" <cristiano@...>
To: <mingw-users@...>
Sent: Friday, February 27, 2004 10:34 PM
Subject: [Mingw-users] Include ODBC32
> Hi all.
>
> I've tried to compile a C++ library interface to ODBC32 using MinGW (gcc
3.3.1).
> When I include sqltypes.h in omne of my files it gives me a lot of errors
due to unknown types.
>
> Later I've tried the same compilation using Dev-cpp (gcc 3.2) and it works
fine. What I notice is that if I don't pass include directories such as
include/c++ include/c++/backward include/c++/3.2 using Dev-cpp the same
erros occur.
>
> I've tried to pass the same include directories to gcc 3.3.1 as above, but
it didn't work.
>
> I made a really simple test program to reproduce the problem:
>
> ---------------------------
> #include <iostream>
> #include <sqltypes>
>
> int main () {
> return 0;
> }
> ---------------------------
>
> or the same if I use one of the types that gives me erros
>
> ---------------------------
> #include <iostream>
>
> int main () {
> ULONG var;
> return 0;
> }
> ---------------------------
>
>
> Does anyone can give me a solution.
>
> Thanks.
>
>
> --
> #################################
> # Cristiano Costa Neves
> # BRASMAP Sistemas, Consultoria e Comércio Ltda.
> # Engenharia em Aquisição de Dados
> # http://www.brasmap.com.br - info@...
> # Fone: (48) 333-2218 ramal 2114
> # Fax: (48) 333-3745
> #################################
|