LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Games
User Name
Password
Linux - Games This forum is for all discussion relating to gaming in Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 10-18-2011, 10:46 AM   #1
Mega-X
LQ Newbie
 
Registered: May 2009
Location: Italy
Distribution: Slackware 13.37 x86_64
Posts: 19

Rep: Reputation: 1
Problems while compiling ZSnes


Hi there.

I've downloaded the ZSnes source code from here: http://www.zsnes.com/index.php?page=files (the latest version) and the I've tried to compile those, but I received the following error:

Quote:
tools/strutil.h:34:96: error: 'strncasecmp' was not declared in this scope
So I examined that file and I've realized that there was

Code:
#include <string>
#include <vector>
#include <cctype>
I've added the ".h" at each include file but now it says

Quote:
tools/strutil.h:26:20: fatal error: vector.h: No such file or directory
I've tried with
Code:
find /usr/include -type f -name '*vector*'
but any of the file listed didn't help.

What I have to install in order to have "vector.h" and the corresponding library? Thanks. :>

I use slackware 13.37, 64 bit version.
 
Old 10-18-2011, 12:48 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2012.8, Slack1337 DebSqueeze, +50+ other Linux OS, for test only.
Posts: 11,615

Rep: Reputation: 1890Reputation: 1890Reputation: 1890Reputation: 1890Reputation: 1890Reputation: 1890Reputation: 1890Reputation: 1890Reputation: 1890Reputation: 1890Reputation: 1890
Can be compiled when you use the six patches
http://ftp.de.debian.org/debian/pool....debian.tar.gz
But only on a 32bits OS : Zsnes is for 32bits only.

Please have a look at the "amd64 package" here :
http://packages.debian.org/sid/otherosfs/zsnes
Depends on "i386 libraries" only.

( Zsnes is a 'one file' application : /usr/bin/zsnes .
You should be able to use a binary from a Deian or Fedora package,
if you have 'Multi-lib' installed.)

P.S. : New c++ headers no .h, e.g. 'string'. Old headers : 'string.h' etc.

..

Last edited by knudfl; 10-18-2011 at 12:55 PM.
 
Old 10-18-2011, 12:59 PM   #3
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,612
Blog Entries: 2

Rep: Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144Reputation: 1144
Try:
http://code.google.com/p/snes9x-gtk/
instead. Works on 64-bit and has tons of features, including multi-threading and opengl.
 
1 members found this post helpful.
Old 10-18-2011, 01:59 PM   #4
Mega-X
LQ Newbie
 
Registered: May 2009
Location: Italy
Distribution: Slackware 13.37 x86_64
Posts: 19

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by H_TeXMeX_H View Post
Try:
http://code.google.com/p/snes9x-gtk/
instead. Works on 64-bit and has tons of features, including multi-threading and opengl.
YEEEEEEEEEEEEEEEEEEEEEEE, it works!

Thanks to everyone for the help. :*
 
Old 07-12-2012, 04:00 AM   #5
wmhrae
LQ Newbie
 
Registered: Sep 2006
Posts: 7

Rep: Reputation: 1
The latest version are still not compiling so here is the patch! To build zsnes-1.51 do the following:

First open zsnes-1.51/parsegen.cpp

First add #include <cstring>

#include <fstream>
#include <string>
+#include <cstring>
#include <vector>
#include <algorithm>

then find and change one line ...

}
}

-int main(size_t argc, const char *const *const argv)
+int main(int argc, const char *const *const argv)
{
const char *cheader_file = 0;
___________________________________________________

Then Open file zsnes-1.51/tools/depbuild.cpp

First add #include <cstdlib> and #include <unistd.h>

#include <string>
#include <cstdio>
+#include <cstdlib>
+#include <unistd.h>
using namespace std;

#include "fileutil.h"

then find and change one line ...

}

-int main(size_t argc, const char *const *const argv)
+int main(int argc, const char *const *const argv)
{
if (argc < 5)
__________________________________________________

Then open zsnes-1.51/tools/strutil.h

First add #include <cstring>

#include <string>
+#include <cstring>
#include <vector>

__________________________________________________

Ok a patch would be better but this error has occurred in many other apps so it will help you to better understand and apply this to other software as well Open Source Free For Every one http://cersi.tk worlds best Free Operating System Mos 1.0

Last edited by wmhrae; 07-12-2012 at 04:21 AM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with zsnes in freevo Wunderbred Linux - Software 1 03-21-2010 02:47 AM
Error compiling Zsnes... BallsOfSteel Linux - Software 5 06-28-2008 03:22 PM
sound problems whit zsnes tripmix Linux - Newbie 1 08-20-2006 07:16 PM
ZSNES compiling error ZakuSage Linux - Software 2 08-15-2005 10:10 AM
Segmentation Fault when compiling ZSNES downinthemine Linux - Software 27 07-19-2004 03:47 AM


All times are GMT -5. The time now is 09:06 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration