Menu

#56 Error with linker when compiling 2.3.2

2.3.2
open
nobody
Compiling (1)
False
1
2017-01-02
2017-01-02
Simon Small
No

I don't know if this is still maintained. I installed this on my Raspberry Pi (using a debian package - linux). It certainly looks and plays good, and is simple to use. I decided to try to compile it, from the command line, but got an error, for which I eventually found a fix.

Download snapshot of the code; the C based code, not the Java. Using the branch for 2.3.2, i.e at

https://sourceforge.net/p/bygfoot/code/HEAD/tree/bygfoot/branches/release_2_3_2/

I run 'autogen.sh', then run 'make'. The compilation progresses fine, but with a few warnings about obsolete calls, up to the step where the object files are linked to create the binary. This last step fails with an error:

/usr/bin/ld: bet.o: undefined reference to symbol 'lrintf@@GLIBC_2.4'
//lib/arm-linux-gnueabihf/libm.SO.6: error adding symbols: DSO missing from command line

After a bit of searching, I fixed this by copying the final compile command line and adding '-lm' (minus-el-em) to the end of it. That step worked and I had a binary file that I could run (it gave an error running it from the command line, but I could run it in codeblocks, even though it would not compile there; I could skip that compiling error).

I am not very good with Makefiles and similar, so could not work out how to change it to add the required library.

Discussion


Log in to post a comment.