Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
78 user(s) are online (64 user(s) are browsing Forums)

Members: 0
Guests: 78

more...

Support us!

Headlines

 
  Register To Post  

Need help with Allegro.
Home away from home
Home away from home


See User information
I trying to port some nice game based on Allegro, but can't use Alegro SDK normal at the momemnt. I have last os4 SDK (53.15) and the Allegro SDK from the os4depot.net. And there is problem:

Example:
Quote:

#include <allegro.h>
main()
{
allegro_init();
exit(0);
}


Then:
Quote:

gcc test.c


And have:
Quote:

/tmp/ccBpPVk9.o: In function `main':
test.c:(.text+0x34): undefined reference to `_install_allegro_version_check'


So, that is understanable, and need to link with the correct *.a. I do "search" on all the *.a from the allegro sdk, and found "_install_allegro_version_check" only in the "libalmasking.a". Which a bit strange, becouse i think there is must be something like "liballegro.a". But ok, i try to link with that one:
Quote:

gcc test.c -lalmasking
/tmp/ccHwBO4Q.o: In function `main':
test.c:(.text+0x34): undefined reference to `_install_allegro_version_check'


Do i something wrong (like maybe need to add some defines in all the allegro based sources, or kind), or just Allegro's SDK on os4depot does not have liballegro.a ?

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Need help with Allegro.
Just popping in
Just popping in


See User information
@kas1e

Did you remember the END_OF_MAIN macro after the main() function?

Go to top
Re: Need help with Allegro.
Home away from home
Home away from home


See User information
@Samurai_Crow

Imho error jsut say that sdk not have correct ".a" library. But i tryed anyway as you point, and source looks like that now:
Quote:

#include <allegro.h>
int main(void)
{
allegro_init();
/* more stuff goes here */
return 0;
}
END_OF_MAIN()


Still, the same " undefined reference" crap.

I also read more Spot's guide, and i see, that he use "-lallegro" on the compiling stage, but allegro_sdk on os4depot does not have liballegro.a at all.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Need help with Allegro.
Just can't stay away
Just can't stay away


See User information
@kas1e

allegro is a shared object. link with -use-dynld, you are probably linking against an old version.

Go to top
Re: Need help with Allegro.
Home away from home
Home away from home


See User information
@spotUP

Quote:

RAM> gcc -use-dynld test.c
/tmp/cco9MRbW.o: In function `main':
test.c:(.text+0x34): undefined reference to `_install_allegro_version_check'
RAM>


That allegro_sdk on os4depot are last one ?

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Need help with Allegro.
Just can't stay away
Just can't stay away


See User information
@kas1e

gcc -use-dynld test.c -lallegro

Make sure you have liballegro.so (lib*.a files are only used for static linking) in SDK:Local/newlib/lib. If you don't, just copy it there from SYS:SObjs.

Go to top
Re: Need help with Allegro.
Just popping in
Just popping in


See User information
@kas1e

Allegro 1.1 is the latest version released on OS4 Depot. If you have installed that then everything should be ready to go. Have a look in SDK:Local/Documentation/Allegro/index.html - this contains some OS4 specific documentation as well as an example makefile that can be used for compiling stuff on OS4. Plus it also contains links to the official Allegro documentation, which comes as a part of the SDK.

Hope that helps!

Go to top
Re: Need help with Allegro.
Home away from home
Home away from home


See User information
@Salas00
Thanks, it works.

@Hitman
Any reasson why you make allegro_sdk without static libs for linking ? (i mean these .a, etc. Without usage of -use-dynld) ?

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Need help with Allegro.
Not too shy to talk
Not too shy to talk


See User information
@kas1e

Updating software that use Allegro without the need for a recompile?

Go to top
Re: Need help with Allegro.
Home away from home
Home away from home


See User information
@ZeroG

Hardcore way for bring coders for making normal ports ?:) Imho coders will choice yourself what they want to do: static or dinamic (but i agree, because almost no one use sobj in sdl ports (because they all compiles statically, except very few (like "giddy"), better maybe do it like that , and release SDKs without possibility to create static bins).

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Need help with Allegro.
Just can't stay away
Just can't stay away


See User information
Hi @Hitman

Allegro 1.1 is the latest version released on OS4 Depot...
SDK:Local/Documentation/Allegro/index.html - this contains some OS4 specific documentation
Hope that helps!

I gotta start 2010 off by checking this out ~
Thanks for the info!

Go to top
Re: Need help with Allegro.
Home away from home
Home away from home


See User information
@Hitman
Can you please have a look at Tegel library (a tilemapping add-on for allegro). Many games use that for now. I tryed to compile it, and it compiles fine (libtegel.a builds fine) and all the Tegel examples compiles fine with that includes/library, but then all they are crashes heavy (many of them with pointing to the allegro.so's get_datafile_property fucntion). Like:

example/exload:
assertion "map != NULL" failed: file "src/tegbasic.c", line 1091
***Command 'exload' returned with unfreed signals C0000000!

example/exanim:
DSI on get_datafile_property fucnmtion from allegro.so.

And so on.

Source ot that library are very small (5 .c files), but dunno where problem can be, and what is wrong..

That library can be nice addon to the upcoming update of os4's version of allegro :)

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project