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.

Beginners > undefined reference to __modsi3

#7297 - hnager - Sat Jun 14, 2003 3:50 am

I'm getting that error when compiling gcc from vc++, but only when trying to wrap a block in a conditional thta looks like:

if(!(count%20)){

...

}

I don't get that error if compiling by means of a makefile outside of vc++.

THe answer to the problem is describe on devr's as:

The library libgcc.a is either not getting properly linked with your project or it is an incorrect version.

how would I remedy that?

#7299 - tepples - Sat Jun 14, 2003 3:59 am

Division on ARM processors must be done in software.

hnager wrote:
The library libgcc.a is either not getting properly linked with your project or it is an incorrect version.

Look at the commands your Visual Studio project issues when building your program. Does it use ld or gcc to link the object files into an elf executable? It should either use gcc or place -lgcc -lc -lgcc at the end of the ld command line.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#7300 - hnager - Sat Jun 14, 2003 4:19 am

Thanks - that was the problem - my makefile just got a lot simpler too.