Next Generation Emulation banner

Compiling NeoPop

1046 Views 8 Replies 4 Participants Last post by  Death Metal
Hey guys, do you remember NeoPop, the Neo-Geo Pocket (Color) emulator? If you do, you also probably remember the author released its source code along with each version of the emu.

Well, I'm trying to compile my own sligtly modified version of NeoPop, but I've come across a nasty compiling error when gcc is running one of the core files. I'm receiving some error like this: ..\libmingw32.a(main.o)(.text+0x97): undefined reference to `[email protected]'. Have you guys ever received this kind of error before when compiling anything?

Just for the record, I'm using MingW to compile it, and I'm also using the latest W32API together with all the latest version of the tools I should need, so I guess I'm not missing anything on that. The emulator is written in C. I thought my makefile would possibly be missing some libraries, but I'm already using these ones (unsuccesfully, BTW): -luser32 -lgdi32 -lcomdlg32 -lcomctl32 -lshell32 -lwinmm -lkernel32 -limm32 -ladvapi32 -lsetupapi -ldxguid -lddraw -ldsound -ldinput -lz -lws2_32 -lmingw32 -mwindows -lSDL -lSDLmain. I guess this is not the problem either.

Anyone has an idea of how to solve this? My appreciation goes in advance to whoever is able to attempt to help me. Thanks.
1 - 9 of 9 Posts
Aye - the problem is that you're linking libSDL and libSDLmain in the wrong order (yes, that's right >_< It's a mingw ld bug I think)

You want to link them the other way around.

- Exo
Really? That would be a very unusual bug, but I guess it's not the problem either, since I've been getting that message even before adding the SDL libraries (IIRC...). But thanks for mentioning. :)

Anyway, I got through it by modifying the way a few files were set to be compiled in my makefile, and that fixed the problem, thankfully.

I'm amazed at how many weird warnings I get from NeoPop's source when the files are being compiled. The author says he's cleaned up the code, but apparently there's plenty of stuff left to "fix," or so MingW tells me. But even more amazing is the fact that the emulator runs without a single bug o_O

Thanks for the attempt. ;)
Well, what I said is still true (you get that error for that.. it's in the SDL docs btw). It's because SDL redefines the main function; that's why you need SDLmain to link in the real main to it.

Is this being compiled with -Wall or other obscure -W flags? A lot of things can be warnings without necessarily being bad (and GCC sometimes catches weird things) but it's good to be warning free if possible.

- Exo
Yeah, I'd seen some odd warnings where just because I did a switch on an enum, it expected me to cover all possible enums within that switch (and gave a warning for each one not covered)... that just plain doesn't make sense to do :).
KillerShots said:
Yeah, I'd seen some odd warnings where just because I did a switch on an enum, it expected me to cover all possible enums within that switch (and gave a warning for each one not covered)... that just plain doesn't make sense to do :).
The reason why it does that is because there's no default case, so if one of those other values were encountered by the switch nothing would happen, and this might not be the desireable outcome.

- Exo
Exophase said:
Is this being compiled with -Wall or other obscure -W flags? A lot of things can be warnings without necessarily being bad (and GCC sometimes catches weird things) but it's good to be warning free if possible.

- Exo
Yeah, I'm using -Wall, -W, -Wshadow and -Wno-long-long. In fact, I have absolutely no idea what they do since I'm using the makefile from FB Alpha's source modified to fit NeoPop's files. :p But do those flags make a difference?

Oh, and I think I fixed the other error not because I changed the way some files were being compiled as I said, but because I removed both libSDL and libSDLmain at once (well, since NeoPop doesn't use a SDL interface, they're not needed anyway). :laugh:
Those flags just told gcc to be very picky, so it's no wonder you are getting warnings.
I see. Thanks for the heads up.
1 - 9 of 9 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top