gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

C/C++ > Function pointers

#4414 - Alunze - Sun Mar 30, 2003 5:28 pm

I was wondering, is it safe to assign function pointers in an obj file, then use (call the functions) in another obj file linked to the first one?

Thanks in *advance* XD.

#4450 - Quirky - Mon Mar 31, 2003 2:41 pm

Yes, I've used that technique plenty of times without problems.

The linker knows at link time the address in ROM/RAM of the function, the object file the actual function is in doesn't matter.

#4462 - Alunze - Mon Mar 31, 2003 5:45 pm

All right, thanks, way to go!! :D