vgmrips / vgmplay-legacy

VGM file command-line player and Winamp plugin.
http://vgmrips.net
221 stars 52 forks source link

Can't compile under WSL Ubuntu #91

Closed OscarCapac closed 1 year ago

OscarCapac commented 1 year ago

I get this error trying to compile at the linking phase

Linking vgmplay ...
/usr/bin/ld: obj/VGMPlay_AddFmts.o:(.bss+0x4): multiple definition of `VGMEnd'; obj/VGMPlay.o:(.bss+0x2a): first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:241: vgmplay] Error 1
ValleyBell commented 1 year ago

I have no idea why it errors out.

The variable is defined once in VGMPlay.c: https://github.com/vgmrips/vgmplay/blob/6f6bf46deee3ca741c529124f6123231e7954827/VGMPlay/VGMPlay.c#L401

but in VGMPlay_AddFmts.c it is marked as extern: https://github.com/vgmrips/vgmplay/blob/6f6bf46deee3ca741c529124f6123231e7954827/VGMPlay/VGMPlay_AddFmts.c#L121

This should definitely work.

It used to be incorrectly defined, but this was fixed in commit https://github.com/vgmrips/vgmplay/commit/fe6ffaf0afe2158344967f1bb8605892edc3ce17.

Are you sure that you're compiling the current Git source and not some older release? (because those don't work with GCC 10 and above)

OscarCapac commented 1 year ago

You are right. I was using the latest release instead of the latest commit. I was able to compile now. Closed