Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Some unexpected problems

This thread is locked; no one can reply to it. rss feed Print
Some unexpected problems
polymath
Member #9,902
June 2008

I installed allegro with Dev-C++ a while ago, and it worked like a charm. Now, I'm looking to move to MSVC++, and I copied and pasted my allegro library and folder from my dev-cpp include folder to my VC++ 9.0 include folder. Using the same settings and also remembering to copy over stdint.h (which i didn't get with VC++ for some reason), I got it down to these last few errors. I have not meddled with the allegro source code in any way, but when i use #include <allegro.h> i get:

c:\program files\microsoft visual studio 9.0\vc\include\allegro/gfx.h(275) : warning C4200: nonstandard extension used : zero-sized array in struct/union
Cannot generate copy-ctor or copy-assignment operator when UDT contains a zero-sized array
c:\program files\microsoft visual studio 9.0\vc\include\allegro/rle.h(34) : warning C4200: nonstandard extension used : zero-sized array in struct/union
Cannot generate copy-ctor or copy-assignment operator when UDT contains a zero-sized array
c:\program files\microsoft visual studio 9.0\vc\include\allegro/font.h(31) : warning C4200: nonstandard extension used : zero-sized array in struct/union
Cannot generate copy-ctor or copy-assignment operator when UDT contains a zero-sized array
c:\program files\microsoft visual studio 9.0\vc\include\allegro/fix.h(45) : warning C4244: 'return' : conversion from 'double' to 'float', possible loss of data

Can anybody tell me what i'm doing wrong? I don't want to go through recompiling again :'(

gnolam
Member #2,030
March 2002
avatar

polymath said:

Can anybody tell me what i'm doing wrong?

You're copying an install from a completely different compiler and expecting it to work.

Quote:

I don't want to go through recompiling again :'(

You have to.

--
Move to the Democratic People's Republic of Vivendi Universal (formerly known as Sweden) - officially democracy- and privacy-free since 2008-06-18!

polymath
Member #9,902
June 2008

Speaking of, I don't have the source anymore (automatic install with dev-cpp), and looking at the folder, its all .h files. Since .h files do not need to be compiled, why do i need to even compile it. This is assuming that allegro does not rely on compiler-specific extensions/functions, of course. Couldn't i include the .h files and expect them to work? Is there some way i could change a line in font, gfx, fix, rle.h files to eliminate the warnings? And if i continue on, will these warnings kill my code or just sit there and not matter? Please, could you clarify a little?

nonnus29
Member #2,606
August 2002
avatar

Milan Mimica
Member #3,877
September 2003
avatar

Some .h files are modified by fix.bat. For example, include/allegro/platform/alplatf.h should define ALLEGRO_MSVC, I don't know if there is something else.

Edgar Reynaldo
Member #8,592
May 2007
avatar

Quote:

Since .h files do not need to be compiled, why do i need to even compile it.

No they don't need to be directly compiled, but what they contain is compiled into every source file that includes them. Following what Miran said, if the headers included change between platforms , that means the source files change between platforms, and that means the library needs to be recompiled.

Quote:

Please, could you clarify a little?

You can recompile the source yourself using the source files or download the precompiled binaries on the page nonnus29 linked to.

Go to: