Followers 0

# Can't get files to compile on Code:Blocks

## 3 posts in this topic

Basically I'm having a problem with getting an Allegro binding (D + Allegro) to work with Code:Blocks.
I think it's a settings problem, but I'm not sure where.
So here's what I've done so far...

Error: module base is in file 'allegro5\base.d' which cannot be read|


This is the error I keep getting. I'm using Windows 7, DAllegro5, Code:Blocks, and the D language DMD compiler.

Code:Blocks works. Compiling a regular D project works. I've added the DAllegro5 files to the project, but I keep getting this error. What else should I do to get this error to go away?

0

##### Share on other sites

I normaly get this, if the module can't be found (not added to the include directories).

I'm not used with CB or Allegro, but how did you added the DAllegro5 files to the project?

I think you have to add both the library and the include files (.d).

Just look in your settings and what you set to get DMD working and add the simmilar paths for Allegro. (in my old CB version 10.05 in Settings>Compiler and debugger>... or Project>Build Otions>... and then in ...>Linker Settings and ...>Search Paths)

Edited by Weton
1

##### Share on other sites

You have two options here. *You can copy all the modules into your project*, and just use them like that. Alternatively, you can compile the binding into a static library for convenience:

I did the bolded. Just copied the actual .d files to my project.

Edited by Alpha_ProgDes
0

##### Share on other sites

Then your folders should propably look like this:

-main.d | with import allegro5.base

+allegro5

-base.d | module allegro5.base

0

## Create an account

Register a new account