Thank you, Peter, that helped tremendously. I was trying to see what you did
differently than me because this isn't supposed to be rocket science. I just
couldn't believe that something as simple as pressing a "Build" button could
be so over-complicated by anyone, but Code::Blocks has outdone itself here.
Your path for allegro didn't match the dirtree you sent, so I changed the path
in Project Settings, which worked for the compiler, but still didn't work for
the linker because I had to change the path three times instead of two: Once
in Debug and Release like you would logically expect, and once in AGUP, which
makes no sense since it is then redundant. So that was my problem, I couldn't
randomly guess where Code::Blocks wanted to put the include file pathname
because Code::Blocks doesn't tell you any of this. It also doesn't tell you
that you need to select codeblocks.exe to open the installed version of
Code::Blocks, but cblauncher.exe is for when you are using it in portable mode
only. And worst of all, those error messages tell you nothing about what is
wrong. "Could not find file" would do wonders.

I can see that I haven't missed much by not being a part of the open source
world for all these years until now. I just hope it doesn't get worse than
this. 


On 5/25/2016 at 8:51 AM, Peter Hull <[email protected]> wrote: 
OK, attached. I put the projects inside the agup folder and I had allegro
itself alongside (see tree.txt)

Pete



On Tue, 24 May 2016 at 18:02 Andrew Robinson <[email protected]> wrote:

Could you post or send me a copy of your *.cbp files from your project?


On 5/24/2016 at 3:07 AM, Peter Hull <[email protected]> wrote: 
On Tue, 24 May 2016 at 04:11 Andrew Robinson <[email protected]> wrote:

That did nothing.


I had a go myself using Code::Blocks 16.01 (with build-in mingw), agup 1.0
from sourceforge and allegro-4.4.2-mingw-4.5.2.zip from allegro.cc.


I set up an empty project called agup_lib in C::B and added all the .h and .c
files from agup, except examp.c. I also had to put allegro's include dir for
the project in Project Build Options -> Search Directories -> Compiler. 

That built the library OK.


I then set up a second project called agup with examp.c. I set the include dir
as before. I then added the libraries in Project Build Options -> Linker
Settings -> Link libraries. I did it separately for the Debug and Release
configurations.

In Debug I put <agup-path>\Debug\libagup_lib.a and
<allegro-path>\lib\liballegro-4.4.2-monolith-md-debug.a 

In Release I put <agup-path>\Release\libagup_lib.a and
<allegro-path>\lib\liballegro-4.4.2-monolith-md.a

(Where I've used <> I mean to substiture wherever they are on your system)

Note that libagup_lib.a comes before allegro in the list (use the little
up/down arrows to swap them)


Hope that helps.

Pete

ps. when it came to running I had to copy the corresponding allegro DLLs in to
the same directory as the executable and also alex.pcx and clean8.pcx.
_______________________________________________
Allegro-developers mailing list
[email protected]
https://mail.gna.org/listinfo/allegro-developers

Reply via email to