Or more specifically, Xubuntu. I can't seem to find any documentation or instructions anywhere that explain how to compile it. Recent versions should compile, shouldn't they?
After running make in the ui directory, I get the following error:
g++ main.cpp
In file included from main.cpp:3:
../base.h:33:4: error: #error "unsupported processor"
In file included from ../base.h:36,
from main.cpp:3:
../lib/libbase.h:44:16: error: io.h: No such file or directory
In file included from ../base.h:37,
from main.cpp:3:
../lib/libsort.h:34:8: warning: extra tokens at end of #endif directive
main.cpp:34:4: error: #error "unsupported platform"
../lib/libbase.h: In function ‘int ftruncate(FILE*, long int)’:
../lib/libbase.h:393: error: invalid conversion from ‘int’ to ‘FILE*’
../lib/libbase.h:393: error: initializing argument 1 of ‘int ftruncate(FILE*, long int)’
make: *** [main.] Error 1
You're not going to get anything recent to compile.
There may have been one release a while back (I don't fully remember) which compiled on Linux. The rest of the time you needed one of my patched releases or a patched WIP.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________ Insane Coding
You hit #error "unsupported processor", so you won't be able to compile anything. This will only work with an x86 processor, if you have that, then be sure to use the included makefile. You need to specify a target platform. x-sdl or x-gtk-sdl or something like that, I believe, will work. The GTK+ one still has no input support. I thought I already #ifdef'd <io.h>, but I'll do so again. You can comment that line out, it's only needed for Windows, apparently. As for ftruncate, I don't know how to fix that one yet. It's unused in bsnes at least, so you can just delete the function.
I'm planning on merging in libui, so the next release should build cleanly on 32-bit Linux/BSD, as well as have a fully functional GUI. No idea how I'm going to get input working yet, though.
I commented out those things in the libbase.h file, ran "make PLATFORM=x-gcc-sdl" and still got a few errors. I could post them if you want, otherwise I'll just wait till the next release.
Thank you for your help, though.
Last edited by xamenus on Wed Jan 03, 2007 7:11 pm, edited 1 time in total.
So, GCC ftruncate takes an open file handle, eg FILE*, but Windows' _chsize takes fileno(FILE*) ?
I guess I can #ifdef the ftruncate function to only exist on Windows, and wrap it around _chsize. Sound good?
I told you before that ftruncate and chsize are identical and both take a file descriptor. You for some reason made a function called ftruncate which takes a FILE *. Overloading a built in function isn't a good idea.
Prototypes:
int ftruncate(int fd, off_t length);
_CRTIMP int __cdecl chsize (int, long );
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________ Insane Coding