Bryan #1 Posted April 26, 2004 I've downloaded MinGW & all the other stuff that you unzip over it. I've set up my path, and I've tried both the 069 and the 081 sources, and I always get the same compile error in XP: Compiling src/usrintrf.c... src/usrintrf.c: In function `do_loadsave': src/usrintrf.c:3772: `va_start' used in function with fixed args src/usrintrf.c:3772: `va_start' used in function with fixed args src/usrintrf.c:3772: `va_start' used in function with fixed args src/usrintrf.c:3772: `va_start' used in function with fixed args make: *** [obj/mame/usrintrf.o] Error 1 Looking through the code, it appears that glibc is to blame, but I don't know what the fix is. What the heck should I do? I can't seem to find any info on this in Google. -Bry Quote Share this post Link to post Share on other sites
xulchris #2 Posted April 26, 2004 huh? Did you get this code from mame.net?! This error is most definatly not coming from the latest official source code. Quote Share this post Link to post Share on other sites
Bryan #3 Posted April 26, 2004 Yup. Got everything from MAME.net: mame081s.zip 9177 kB Source code archive of MAME 0.81. MinGW-2.0.0-3.exe 12525 kB MinGW 2.0.0 compile environment for use in Windows. Execute the file to install MinGW. mingw-over.zip 549 kB Other files needed to compile MAME in the MinGW compile environment. Uncompress this over the MinGW directory. gcc-3.2.2-20030208-1.tar.gz 7148 kB GCC 3.2.2, required for MAME 0.66 and newer. Uncompress this over the MinGW directory. dx70_mgw.zip 240 kB DirectX 7.0 headers, required for MAME 0.68 and newer. Uncompress this over the MinGW directory, after mingw-over.zip. Add c:mingwbin to your PATH. Compile the Win32 version by typing make. I even tried a newer GCC library... no luck, same error. For the moment I'm using an old version of MAME which I can compile. -Bry Quote Share this post Link to post Share on other sites
Bakasama #4 Posted April 26, 2004 I got a question. Did you make a new folder for the new srcs or did you overwrite the old ones? Quote Share this post Link to post Share on other sites
Bryan #5 Posted April 26, 2004 New folder. In fact, I deleted it and extracted everything twice... in order. Then I extracted the MAME sources into a mame folder inside mingw, set the path, then ran make. It only gets so far, though. I found the exact line in the code that causes the problem (in the interface code), and it's not a valid error as far as I can tell. Anyway, I found some different stuff on the Net about the error, but not pertaining to MAME. So, I'm still stuck. -Bry Quote Share this post Link to post Share on other sites
Bakasama #6 Posted April 26, 2004 Well, it's been a long time since I've compiled anything on a PC and it was just MAME32. I mainly compile MacMAME + now. I don't think I can help you too much. Hopefully this will point you to the right direction, did you ask this question on the mame.net boards? I think they would know what's up. mameworld.net has a compiling board and think they could help you too. Quote Share this post Link to post Share on other sites
xulchris #7 Posted April 27, 2004 mame081s.zip9177 kB Source code archive of MAME 0.81. Well that can't be becuase the funtion do_loadsave() starts at line 3801, and your error is occuring at line 3772 which claims to be inside the do_loadsave() function, so something is seriously messed up on your end. I would reverify that you have the correct source code installed. :wink: Quote Share this post Link to post Share on other sites
Ze_ro #8 Posted April 27, 2004 Well that can't be becuase the funtion do_loadsave() starts at line 3801, and your error is occuring at line 3772 which claims to be inside the do_loadsave() function, so something is seriously messed up on your end. I was taking a look at do_loadsave() as well (although in the 0.80.1 XMAME sources... should be mostly the same), and it doesn't use va_start at all (Nor does it really have any reason to). Either something is wrong with the sources you have, or your compiler is seriously buggered. --Zero Quote Share this post Link to post Share on other sites
Bryan #9 Posted April 27, 2004 do_loadsave calls usrintf_showmessage (4 times), which has the offending function (va_start). I don't know why the compiler doesn't attribute the error to usrintf_showmessage. All this stuff came straight from mame.net's DL page. Can anyone DL the sources and tools and try it? -Bry Quote Share this post Link to post Share on other sites
xulchris #10 Posted April 27, 2004 do_loadsave calls usrintf_showmessage (4 times), which has the offending function (va_start). I don't know why the compiler doesn't attribute the error to usrintf_showmessage. All this stuff came straight from mame.net's DL page. Can anyone DL the sources and tools and try it? -Bry void CLIB_DECL usrintf_showmessage(const char *text,...) The "..." in the function declaration implies that it uses variable arguments. Can you verify that your version of the source code contains the "..." as shown above in the usrintf_showmessage() function? Quote Share this post Link to post Share on other sites
Bryan #11 Posted April 27, 2004 do_loadsave calls usrintf_showmessage (4 times), which has the offending function (va_start). I don't know why the compiler doesn't attribute the error to usrintf_showmessage. All this stuff came straight from mame.net's DL page. Can anyone DL the sources and tools and try it? -Bry void CLIB_DECL usrintf_showmessage(const char *text,...) The "..." in the function declaration implies that it uses variable arguments. Can you verify that your version of the source code contains the "..." as shown above in the usrintf_showmessage() function? Yep.. I already checked that: void CLIB_DECL usrintf_showmessage(const char *text,...) { va_list arg; va_start(arg,text); vsprintf(messagetext,text,arg); va_end(arg); messagecounter = 2 * Machine->refresh_rate; } void CLIB_DECL usrintf_showmessage_secs(int seconds, const char *text,...) { va_list arg; va_start(arg,text); vsprintf(messagetext,text,arg); va_end(arg); messagecounter = seconds * Machine->refresh_rate; } void do_loadsave(struct mame_bitmap *bitmap, int request_loadsave) { int file = 0; mame_pause(1); do { InputCode code; if (request_loadsave == LOADSAVE_SAVE) displaymessage(bitmap, "Select position to save to"); else displaymessage(bitmap, "Select position to load from"); update_video_and_audio(); reset_partial_updates(); if (input_ui_pressed(IPT_UI_CANCEL)) break; code = code_read_async(); if (code != CODE_NONE) { if (code >= KEYCODE_A && code <= KEYCODE_Z) file = 'a' + (code - KEYCODE_A); else if (code >= KEYCODE_0 && code <= KEYCODE_9) file = '0' + (code - KEYCODE_0); else if (code >= KEYCODE_0_PAD && code <= KEYCODE_9_PAD) file = '0' + (code - KEYCODE_0); } } while (!file); mame_pause(0); if (file > 0) { if (request_loadsave == LOADSAVE_SAVE) usrintf_showmessage("Save to position %c", file); else usrintf_showmessage("Load from position %c", file); cpu_loadsave_schedule(request_loadsave, file); } else { if (request_loadsave == LOADSAVE_SAVE) usrintf_showmessage("Save cancelled"); else usrintf_showmessage("Load cancelled"); } } Quote Share this post Link to post Share on other sites