Allegro and libcurl problem
Schyfis

I finally figured out how to use libcurl's simpler functions, but when I combine it with Allegro by including allegro.h I get some compiler errors.
It goes something like this:

22 C:\Dev-Cpp\include\windows.h:52,               from C:\Dev-Cpp\include\winsock2.h In file included from C:/Dev-Cpp/include/windows.h:52,               from C:/Dev-Cpp/include/winsock2.h 
51 C:\Dev-Cpp\include\winsock2.h:22,               from C:\Dev-Cpp\include\curl\multi.h                  from C:/Dev-Cpp/include/winsock2.h:22,               from C:/Dev-Cpp/include/curl/multi.h 
1426 C:\Dev-Cpp\include\curl\multi.h:51,               from C:\Dev-Cpp\include\curl\curl.h                  from C:/Dev-Cpp/include/curl/multi.h:51,               from C:/Dev-Cpp/include/curl/curl.h 
13 C:\Dev-Cpp\include\curl\curl.h:1426,               from Examples\libcurl\simple.c                  from C:/Dev-Cpp/include/curl/curl.h:1426,               from Examples/libcurl/simple.c 
13 C:\Dev-Cpp\Examples\libcurl\simple.c                  from Examples/libcurl/simple.c 
1222 C:\Dev-Cpp\include\wingdi.h conflicting declaration 'typedef struct tagBITMAP BITMAP' 
276 C:\Dev-Cpp\include\allegro\gfx.h 'BITMAP' has a previous declaration as `typedef struct BITMAP BITMAP' 
1222 C:\Dev-Cpp\include\wingdi.h declaration of `typedef struct tagBITMAP BITMAP' 
276 C:\Dev-Cpp\include\allegro\gfx.h conflicts with previous declaration `typedef struct BITMAP BITMAP' 
1222 C:\Dev-Cpp\include\wingdi.h declaration of `typedef struct tagBITMAP BITMAP' 
276 C:\Dev-Cpp\include\allegro\gfx.h conflicts with previous declaration `typedef struct BITMAP BITMAP' 
1222 C:\Dev-Cpp\include\wingdi.h declaration of `typedef struct tagBITMAP BITMAP' 
276 C:\Dev-Cpp\include\allegro\gfx.h conflicts with previous declaration `typedef struct BITMAP BITMAP' 
 C:\Dev-Cpp\Makefile.win [Build Error]  [Examples/libcurl/simple.o] Error 1 

I'm including allegro.h, stdio.h, iostream, and curl.h. It fails to compile immediately after I include allegro.h. Is there some trick to getting Allegro and cURL to play nice together, or am I doing something wrong again?

Edgar Reynaldo

Looks like libcurl is including windows.h, this conflicts with Allegro. Read the manual on Windows Specifics.

I think you need to do :

//
#include <allegro.h>
#include <winalleg.h>

#include <curl.h>
//

Schyfis

It works like a charm, thank you!

Edgar Reynaldo

++Edgar's cookies :D

Cookie is for me!
http://www.allegro.cc/files/attachment/595974

Thread #597128. Printed from Allegro.cc