Compiling error: Too many arguments.

This is a discussion on Compiling error: Too many arguments. within the C++ Programming forums, part of the General Programming Boards category; Hi, I'm rather new to C++, and programming altogether. As a way to create a foundation for my project, I'm ...

  1. #1
    Registered User
    Join Date
    Jun 2008
    Posts
    8

    Compiling error: Too many arguments.

    Hi, I'm rather new to C++, and programming altogether. As a way to create a foundation for my project, I'm trying to compile a gamecube-disc viewing program which came in only the source files, not pre-compiled. If anybody could help me clear up these errors, I'd be very appreciative!

    EDIT: New problem. See reply #4.
    Last edited by Tuah; 06-10-2008 at 01:46 PM. Reason: Old problem fixed.

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    23,007
    mkdir takes one argument - the path to create; nothing more.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Registered User
    Join Date
    Jun 2008
    Posts
    8
    So... I take out the ', S_IRWXU'?

    Sorry for being such a noob. >.>

  4. #4
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    23,007
    Probably.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #5
    Registered User
    Join Date
    Jun 2008
    Posts
    8
    Ah, that did it. The errors are gone now. However, it say the program still has one error, and lists:
    Code:
    32 C:\Documents and Settings\Administrator\My Documents\Ninja\gcmtool-0.3.2\src\GCMutils.h:17,
    from C:\Documents and Settings\Administrator\My Documents\Ninja\gcmtool-0.3.2\src\GCMToolMain.c
    In file included from C:\Documents and Settings\Administrator\My Documents\Ninja\gcmtool-0.3.2\src\/GCMutils.h:17,
    from C:\Documents and Settings\Administrator\My Documents\Ninja\gcmtool-0.3.2\src\GCMToolMain.c 
    
    32 C:\Documents and Settings\Administrator\My Documents\Ninja\gcmtool-0.3.2\src\GCMToolMain.c
    from C:\Documents and Settings\Administrator\My Documents\Ninja\gcmtool-0.3.2\src\GCMToolMain.c 
    
    and
    
    \Documents and Settings\Administrator\My Documents\Ninja\gcmtool-0.3.2\src\/types.h
    C:\Documents and Settings\Administrator\My Documents\Ninja\gcmtool-0.3.2\src\C arpa/inet.h: No such file or directory.
    I'm pretty sure it's the last one, seeing as it says 'No such file or directory', but it doesn't refer me to any part of any code. The one in the middle refers me to the line #include "GCMutils.h", but that part does exist in the file.

    I think what I need to look for is "C arpa/inet.h"?
    Last edited by Tuah; 06-10-2008 at 01:45 PM. Reason: Screen-stretch.

  6. #6
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,823
    http://sourceforge.net/project/showf...roup_id=109905
    The place to ask would be on the mailing list / forum dedicated to that particular software package.

    There you'll find
    - people who may have actually solved the problem
    - be most interested / motivated in finding a solution
    - have the best ideas about how to approach the problem
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  7. #7
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    The error message appears to send you to line 17 of GCMutils.h. That may be a line to check.

  8. #8
    Registered User
    Join Date
    Jun 2008
    Posts
    8
    @Salem: I would, but there's practically nobody out there. Or maybe it's just my Googling skills...

    @Tabstop: I don't see what's wrong with the line itself; #include "GCMutils.h" It could be a problem with the .h file itself though. Here's the whole thing:

    Code:
    /*
     *  GCMutils.h
     *  gcmtool
     *
     *  Created by spike on Sun Mar 28 2004.
     *  Copyright (c) 2004 Sadistech. All rights reserved.
     *
     *  Information gathered from gc-linux.org's yagcd
     *  special thanks to gc-linux.org and the gamecube hacking community.
     *
     */
    #ifndef _GCM_UTIL_H_
    #define _GCM_UTIL_H_
    
    #include <stdio.h>
    #include <string.h>
    #include "types.h"
    #include "GCMFileEntry.h"
    
    #ifdef __cplusplus
    extern "C" {
    #endif
    
    // BEGIN CODE...
    
    //error codes
    #define GCM_ERROR						1
    #define GCM_SUCCESS						0
    
    //constants...
    #define MAXFILENAMESIZE					256
    
    //offsets...
    #define GCM_DISK_HEADER_OFFSET			0x0000
    #define GCM_DISK_HEADER_LENGTH			0x0440
    #define GCM_DISK_HEADER_INFO_OFFSET		0x0440
    #define GCM_DISK_HEADER_INFO_LENGTH		0x2000
    #define GCM_APPLOADER_OFFSET			0x2440
    
    //NOTE: following offsets are relative to the offset of the section they're in (see above)
    
    //disk header stuff
    #define GCM_SYSTEM_ID_OFFSET			0x0000
    #define GCM_GAME_ID_OFFSET				0x0001
    #define GCM_GAME_ID_LENGTH				0x0002
    #define GCM_REGION_CODE_OFFSET			0x0003
    #define GCM_MAKER_CODE_OFFSET			0x0004
    #define GCM_MAKER_CODE_LENGTH			0x0002
    #define GCM_GAME_NAME_OFFSET			0x0020
    #define GCM_GAME_NAME_LENGTH			0x03e0
    #define GCM_DOL_OFFSET_OFFSET			0x0420
    #define GCM_DOL_OFFSET_LENGTH			0x0004
    #define GCM_FST_OFFSET_OFFSET			0x0424
    #define GCM_FST_OFFSET_LENGTH			0x0004
    #define GCM_FST_SIZE_OFFSET				0x0428
    #define GCM_FST_SIZE_LENGTH				0x0004
    #define GCM_USER_POS_OFFSET				0x0430
    #define GCM_USER_POS_LENGTH				0x0004
    #define GCM_USER_LENGTH_OFFSET			0x0434
    #define GCM_USER_LENGTH_LENGTH			0x0004
    
    //apploader stuff
    #define GCM_APPLOADER_DATE_OFFSET		0x0000
    #define GCM_APPLOADER_DATE_LENGTH		0x0010
    #define GCM_APPLOADER_ENTRYPOINT_OFFSET 0x0010
    #define GCM_APPLOADER_ENTRYPOINT_LENGTH 0x0004
    #define GCM_APPLOADER_SIZE_OFFSET		0x0014
    #define GCM_APPLOADER_SIZE_LENGTH		0x0004
    #define GCM_APPLOADER_UNKNOWN_OFFSET	0x0018
    #define GCM_APPLOADER_UNKNOWN_LENGTH	0x0004
    #define GCM_APPLOADER_CODE_OFFSET		0x0020
    
    //file entry constants
    #define GCM_FST_ENTRY_LENGTH			0x000c
    
    #define GCM_DVD_IMAGE_LENGTH			1459978240  /* the size of a FULL GCM */
    
    // getting disk sections
    void GCMGetDiskHeader(FILE *ifile, char *buf);
    void GCMGetDiskHeaderInfo(FILE *ifile, char *buf);
    void GCMGetApploader(FILE *ifile, char *buf);
    void GCMGetFST(FILE *ifile, char *buf);
    
    // putting disk sections (for injection): Returns GCM_ERROR or GCM_SUCCESS
    int GCMPutDiskHeader(FILE *ofile, char *buf);
    int GCMPutDiskHeaderInfo(FILE *ofile, char *buf);
    int GCMPutApploader(FILE *ofile, char *buf, u32 length);
    
    //read from header...
    char GCMGetSystemID(FILE *ifile);
    void GCMGetGameID(FILE *ifile, char *buf);
    char GCMGetRegionCode(FILE *ifile);
    void GCMGetMakerCode(FILE *ifile, char *buf);
    void GCMGetGameName(FILE *ifile, char *buf);
    
    u32 GCMGetDolOffset(FILE *ifile);
    u32 GCMGetApploaderSize(FILE *ifile);
    u32 GCMGetFSTOffset(FILE *ifile);
    u32 GCMGetFSTSize(FILE *ifile);
    u32 GCMGetFSTMaxSize(FILE *ifile);
    
    //file entry stuff
    void GCMGetNthRawFileEntry(FILE *ifile, int n, char *buf);
    
    void GCMReplaceFilesystem(FILE *ifile, char *fsRootPath);
    
    #ifdef __cplusplus
    };
    #endif
    
    #endif /* _GCM_UTIL_H_ */
    

  9. #9
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    Well, assuming I can count to 17, line 17 is the "types.h" mentioned in the penultimate line of the error message. Perhaps types.h tries to include "C arpa/inet.h" or similar -- check there.

    PS: Do you have an arpa/inet.h?

  10. #10
    Registered User
    Join Date
    Jun 2008
    Posts
    8
    Ah, I don't have arpa/inet.h. Seems like that's the problem, as it mentions that in the third message. I'm googling it now, though I'm not sure I'll come up with something I understand.

  11. #11
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    23,007
    It's a missing header. You need to acquire it somewhere.
    However, I don't know anything about this header, so I cannot suggest where to find it.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  12. #12
    Registered User
    Join Date
    Jun 2008
    Posts
    8
    I've found this online:
    Code:
    /* Copyright (C) 1997, 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
       This file is part of the GNU C Library.
    
       The GNU C Library is free software; you can redistribute it and/or
       modify it under the terms of the GNU Lesser General Public
       License as published by the Free Software Foundation; either
       version 2.1 of the License, or (at your option) any later version.
    
       The GNU C Library is distributed in the hope that it will be useful,
       but WITHOUT ANY WARRANTY; without even the implied warranty of
       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
       Lesser General Public License for more details.
    
       You should have received a copy of the GNU Lesser General Public
       License along with the GNU C Library; if not, write to the Free
       Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
       02111-1307 USA.  */
    
    #ifndef _ARPA_INET_H
    #define	_ARPA_INET_H	1
    
    #include <features.h>
    #include <netinet/in.h>		/* To define `struct in_addr'.  */
    
    /* Type for length arguments in socket calls.  */
    #ifndef __socklen_t_defined
    typedef __socklen_t socklen_t;
    # define __socklen_t_defined
    #endif
    
    __BEGIN_DECLS
    
    /* Convert Internet host address from numbers-and-dots notation in CP
       into binary data in network byte order.  */
    extern in_addr_t inet_addr (__const char *__cp) __THROW;
    
    /* Return the local host address part of the Internet address in IN.  */
    extern in_addr_t inet_lnaof (struct in_addr __in) __THROW;
    
    /* Make Internet host address in network byte order by combining the
       network number NET with the local address HOST.  */
    extern struct in_addr inet_makeaddr (in_addr_t __net, in_addr_t __host)
         __THROW;
    
    /* Return network number part of the Internet address IN.  */
    extern in_addr_t inet_netof (struct in_addr __in) __THROW;
    
    /* Extract the network number in network byte order from the address
       in numbers-and-dots natation starting at CP.  */
    extern in_addr_t inet_network (__const char *__cp) __THROW;
    
    /* Convert Internet number in IN to ASCII representation.  The return value
       is a pointer to an internal array containing the string.  */
    extern char *inet_ntoa (struct in_addr __in) __THROW;
    
    /* Convert from presentation format of an Internet number in buffer
       starting at CP to the binary network format and store result for
       interface type AF in buffer starting at BUF.  */
    extern int inet_pton (int __af, __const char *__restrict __cp,
    		      void *__restrict __buf) __THROW;
    
    /* Convert a Internet address in binary network format for interface
       type AF in buffer starting at CP to presentation form and place
       result in buffer of length LEN astarting at BUF.  */
    extern __const char *inet_ntop (int __af, __const void *__restrict __cp,
    				char *__restrict __buf, socklen_t __len)
         __THROW;
    
    
    /* The following functions are not part of XNS 5.2.  */
    #ifdef __USE_MISC
    /* Convert Internet host address from numbers-and-dots notation in CP
       into binary data and store the result in the structure INP.  */
    extern int inet_aton (__const char *__cp, struct in_addr *__inp) __THROW;
    
    /* Format a network number NET into presentation format and place result
       in buffer starting at BUF with length of LEN bytes.  */
    extern char *inet_neta (in_addr_t __net, char *__buf, size_t __len) __THROW;
    
    /* Convert network number for interface type AF in buffer starting at
       CP to presentation format.  The result will specifiy BITS bits of
       the number.  */
    extern char *inet_net_ntop (int __af, __const void *__cp, int __bits,
    			    char *__buf, size_t __len) __THROW;
    
    /* Convert network number for interface type AF from presentation in
       buffer starting at CP to network format and store result int
       buffer starting at BUF of size LEN.  */
    extern int inet_net_pton (int __af, __const char *__cp,
    			  void *__buf, size_t __len) __THROW;
    
    /* Convert ASCII representation in hexadecimal form of the Internet
       address to binary form and place result in buffer of length LEN
       starting at BUF.  */
    extern unsigned int inet_nsap_addr (__const char *__cp,
    				    unsigned char *__buf, int __len) __THROW;
    
    /* Convert internet address in binary form in LEN bytes starting at CP
       a presentation form and place result in BUF.  */
    extern char *inet_nsap_ntoa (int __len, __const unsigned char *__cp,
    			     char *__buf) __THROW;
    #endif
    
    __END_DECLS
    
    #endif /* arpa/inet.h */
    It got rid of the error, but the whole thing still won't compile, or at least says it hasn't compiled when I attempt to run it. No errors are detected, and no problems show up. Maybe now it's just a compiler thing?

  13. #13
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    How are you trying to compile? If you're using an IDE, look at the build log (or similar name), which would have all the results of the compilation.

  14. #14
    Registered User
    Join Date
    Jun 2008
    Posts
    8
    Dev-C++. The Compile Log does nothing now, when before it showed all my errors.

  15. #15
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    Hit Ctrl-F11 to rebuild all -- and the compile log will at least say "nothing to build" if nothing else.

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. GradeInfo
    By kirksson in forum C Programming
    Replies: 23
    Last Post: 07-16-2008, 04:27 PM
  2. command line arguments
    By vurentjie in forum C Programming
    Replies: 3
    Last Post: 06-22-2008, 07:46 AM
  3. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 03:39 PM
  4. Replies: 10
    Last Post: 09-27-2005, 01:49 PM
  5. NULL arguments in a shell program
    By gregulator in forum C Programming
    Replies: 4
    Last Post: 04-15-2004, 11:48 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21