[A4.2] allegro.h no such file or directory.
Neil Black

I'm trying to install Allegro (4.2) on my new computer. I thought I had everything installed properly, but when I tried to compile I got the error: allegro.h: no such file or directory.

I'm not sure why this is happening. It seems I need help every time I install allegro.

EDIT:

By the way, I'm using Code Blocks with Mingw.

torhu

Either put Allegro's include files in MSVC's include dir, or add path/to/allegro/include to the extra headers dir in the preprocessor settings. Or add the path globally in MSVC's options, under C++ Directories or whatever. There other ways too, but 3 should do for now ;D

EDIT: An even better way might be to copy the contents of allegro/include into your project, and add $(ProjectDir) as an extra include path. That way you'll always have the same version of Allegro's header for that project, independently of your other Allegro projects.

Neil Black

I should probably mention that I'm using Code Blocks.

torhu

This seems relevant.

Neil Black

Aha, thanks, that thread helped me to fix it.

Although, according to AVG, my test program is malware.

This code:

#include <allegro.h>

int main()
{
    allegro_init();
    install_keyboard();
    return 0;
}
END_OF_MAIN()

Makes AVG sit up and take notice, with dire warnings like:

  • small executable

  • executable changed

  • window not visible

  • is terminated

The ones that really confuse me, though, are the "executes from filesystem" warning and the "injects code" warning, because I don't know what they mean. And the injects code has a big, ominous red bar next to it. This program MUST be dangerous! ;D

EDIT:

I do have one more actual question, though. Where does the alleg42.dll need to be, because right now I'm having to stick it into the directory of the .exe

Vanneto

I do have one more actual question, though. Where does the alleg42.dll need to be, because right now I'm having to stick it into the directory of the .exe

Thats where it should be. If you want to have all DLL's in a "dll" folder then you can also use SetDllDirectory().

Arthur Kalliokoski

according to AVG, my test program is malware.

http://www.allegro.cc/forums/thread/601007

Thread #606960. Printed from Allegro.cc