[ scummvm-Bugs-1449912 ] DC: selector.cpp compilation failed

SourceForge.net noreply at sourceforge.net
Tue Mar 14 22:24:35 CET 2006


Bugs item #1449912, was opened at 2006-03-14 22:24
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418820&aid=1449912&group_id=37116

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Unknown Crash/Other
Group: All Games
Status: Open
Resolution: None
Priority: 5
Submitted By: dcfrance (erwan2004)
Assigned to: Nobody/Anonymous (nobody)
Summary: DC: selector.cpp compilation failed

Initial Comment:
Hi
I do not compile the file scummvm/backends/dc/selector.cpp

The recent changes of the file base/gameDetector.h are
the cause.

Host SUSUE 10
Toolchian SH-ELF :gcc-4.0.2_binutils-2.16.1_newlib-1.14.0

Error:

/home/erwan/Dreamcast/Toolchain/gcc-4.0.2_binutils-2.16.1_newlib-1.14.0/sh-elf/bin/sh-elf-g++
-ml -m4-single-only
-Wp,-MMD,"./.deps/selector.d",-MQ,"selector.o",-MP -O3
-Wno-multichar -funroll-loops -fschedule-insns2
-fomit-frame-pointer -fdelete-null-pointer-checks
-fno-exceptions -D__DC__ -DNONSTANDARD_PORT -DUSE_MAD
-DDISABLE_SCALERS -I./ -I../.. -I../../common
-I/home/erwan/Dreamcast/Toolchain/ronin-src/include/
-I../../engines -c selector.cpp -o selector.o
selector.cpp: In function ‘int findGames(Game*, int)’:
selector.cpp:234: erreur: cannot convert ‘const
Common::String’ to ‘const char*’ for argument ‘2’ to
‘char* strcpy(char*, const char*)’
selector.cpp:239: erreur: cannot convert ‘const
Common::String’ to ‘const char*’ for argument ‘2’ to
‘char* strcpy(char*, const char*)’
make: *** [selector.o] Erreur 1






function ‘int findGames(Game*, int):

static int findGames(Game *games, int max)
{
  Dir *dirs = new Dir[MAX_DIR];
  int curr_game = 0, curr_dir = 0, num_dirs = 1;
  dirs[0].node = FilesystemNode();
  while(curr_game < max && curr_dir < num_dirs) {
    strncpy(dirs[curr_dir].name,
dirs[curr_dir].node.path().c_str(), 252);
    dirs[curr_dir].name[251] = '\0';
    dirs[curr_dir].deficon[0] = '\0';
    FSList files, fslist =
dirs[curr_dir++].node.listDir(FilesystemNode::kListAll);
    for (FSList::const_iterator entry = fslist.begin();
entry != fslist.end();
	 ++entry) {
      if (entry->isDirectory()) {
	if(num_dirs < MAX_DIR &&
strcasecmp(entry->displayName().c_str(),
					    "install")) {
	  dirs[num_dirs].node = *entry;
	  num_dirs++;
	}
      } else
	if(isIcon(*entry))
	  strcpy(dirs[curr_dir-1].deficon,
entry->displayName().c_str());
	else
	  files.push_back(*entry);
    }
    
    DetectedGameList candidates;
    detectGames(files, candidates);
    
    for(DetectedGameList::const_iterator ge =
candidates.begin();
	ge != candidates.end(); ++ge)
      if(curr_game < max) {
	strcpy(games[curr_game].filename_base, ge->gameid);
	strcpy(games[curr_game].dir, dirs[curr_dir-1].name);
	if(uniqueGame(games[curr_game].filename_base,
		      games[curr_game].dir, games, curr_game)) {
	  
	  strcpy(games[curr_game].text, ge->description);
#if 0
	  printf("Registered game <%s> in <%s> <%s> because of
<%s> <*>\n",
		 games[curr_game].text, games[curr_game].dir,
		 games[curr_game].filename_base,
		 dirs[curr_dir-1].name);
#endif
	  curr_game++;
	}
      }
  }

  for(int i=0; i<curr_game; i++)
    if(!loadIcon(games[i], dirs, num_dirs))
      makeDefIcon(games[i].icon);
  delete[] dirs;
  return curr_game;
}


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418820&aid=1449912&group_id=37116




More information about the Scummvm-tracker mailing list