Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Allegro and libcurl problem

Credits go to Edgar Reynaldo for helping out!
This thread is locked; no one can reply to it. rss feed Print
Allegro and libcurl problem
Schyfis
Member #9,752
May 2008
avatar

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?

________________________________________________________________________________________________________
[freedwill.us]
[unTied Games]

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Schyfis
Member #9,752
May 2008
avatar

It works like a charm, thank you!

________________________________________________________________________________________________________
[freedwill.us]
[unTied Games]

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Go to: