Yet, that would make sense.KanedaFr wrote:no, I don't mean I want the Spritesmind logo !
Why not Stef' URL ?
Moderator: Stef
Linkers have for quite some time only included those functions of a lib that are used. This DOES make link order an issue - link in the wrong order and it won't know if a function is needed or not. In that case, it includes nothing and you get a link error stating functions could not be found. In this case, it's really not much of an issue: the "startup" object file goes first (I hope you noticed that... it was the only part of the kit that didn't go in the library), then all the program object files, then the library, then libm (if you use it) then libc (if you use it), then libgcc. If you looked at the particle example, it's just the start object, the program objects, the lib, and libgcc, in that order.KanedaFr wrote:COOOOL!! I was about to make itChilly Willy wrote:I made a makefile for the functions, and made a library out of it. That makes it much easier to handle.
I just need to confirm something...I know it could be some kind of newbie question, but I never worked with my own lib :
with a lib, will the linker include ONLY used functions or the full lib ?
This appeared in linked errors after I've added const char string into a function. Strange thing that I also have an array of const strings in the same code, and it compiles and works fine.game.c:(.text+0x61c): undefined reference to `memcpy'
Code: Select all
void f(void)
{
const char *strarr[]={"bla","bla","bla"}; //this is fine
const char str[]="blablabla"; //adding this causes the error
}
Code: Select all
static const char str[]="blablabla";
ThanksVincent wrote:Bonjour Stephane,
Congratz pour ton devkit. I am looking forward for the documentation, tutorials and small samples.
Vincent