Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » [A4.2] allegro.h no such file or directory.

Credits go to torhu for helping out!
This thread is locked; no one can reply to it. rss feed Print
[A4.2] allegro.h no such file or directory.
Neil Black
Member #7,867
October 2006
avatar

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
Member #2,727
September 2002
avatar

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
Member #7,867
October 2006
avatar

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

torhu
Member #2,727
September 2002
avatar

Neil Black
Member #7,867
October 2006
avatar

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
Member #8,643
May 2007

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().

In capitalist America bank robs you.

Arthur Kalliokoski
Second in Command
February 2005
avatar

according to AVG, my test program is malware.

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

They all watch too much MSNBC... they get ideas.

Go to: