LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-30-2008, 03:41 PM   #1
rhythmking
Member
 
Registered: Dec 2003
Posts: 54

Rep: Reputation: 15
trying to compile psxdump


Running slackware 10
celeron 633
gcc compiler

I am trying to compile 2 little programs which are part of cdrdao
Used for copying ps2 games.
The makefile creates the first program cdjob
but I get the following error on the second program psxdump.

root@thunderbolt:/usr/share/psxcopy-0.2# make
gcc -O2 -s -fno-strength-reduce cdjob.c -o cdjob
gcc -O2 -s -fno-strength-reduce psxdump.c -o psxdump
psxdump.c:24: error: conflicting types for `sys_errlist'
/usr/include/bits/sys_errlist.h:28: error: previous declaration of `sys_errlist'
make: *** [psxdump] Error 1


Here is the code snip


#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <getopt.h>

#include <fcntl.h>
#include <errno.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <linux/cdrom.h>
#include <linux/fs.h>

/* Ugly, I know.. */
extern char *sys_errlist[];

typedef unsigned char u8bit;
typedef unsigned short u16bit;
typedef unsigned u32bit;

unsigned char psx_sign[] =
{0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x01,
0x43, 0x44, 0x30, 0x30, 0x31, 0x01, 0x00, 0x50, 0x4C,
0x41, 0x59, 0x53, 0x54, 0x41, 0x54, 0x49, 0x4F, 0x4E,
0x20, 0x20, 0x20, 0x20, 0x20};



Here is the makefile

# Makefile - Fabio Baracca
#

CC = gcc
#-DDEBUG #-ggdb
CFLAGS = -O2 -s -fno-strength-reduce
LDFLAGS =
CNTFLGS =
EDITOR = joe

default: cdjob psxdump remainder

cdjob: cdjob.c
$(CC) $(CFLAGS) cdjob.c -o cdjob

psxdump: psxdump.c
$(CC) $(CFLAGS) psxdump.c -o psxdump

remainder:
@echo "Make completed."
@echo "Please also execute make batchconf to revise configuration of batch files."

batchconf:
$(EDITOR) write-psx
$(EDITOR) read-psx

clean:
rm -f *~
rm -f *.o

distclean:
rm -f psxdump
rm -f cdjobroot@thunderbolt:/usr/doc/cdrdao-1.1.9/contrib/psxcopy-0.2#
 
Old 03-31-2008, 03:15 PM   #2
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 78
Quote:
Originally Posted by rhythmking View Post
extern char *sys_errlist[];
Either remove this line (recommended), or change it to:
Code:
extern const char * const sys_errlist[];
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
[Compile kernel] How to compile/install the modules ? frenchn00b Linux - General 1 09-06-2009 03:18 PM
Compile madwifi, ... compile error , how can i do. ERBRMN Linux - Networking 3 03-08-2006 07:56 PM
How do I compile? EliasAlucard Linux - Newbie 13 06-04-2005 12:15 AM
How To Compile jmdlcar Slackware 25 06-02-2005 10:11 AM
ntop compile/post-compile problem? tjb Linux - Software 3 12-28-2004 04:22 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:28 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration