visual C++ error C2371 redefinition basic types

Discussion in 'C++' started by junaidnaseer, May 9, 2006.

  1. junaidnaseer

    junaidnaseer Guest

    Hi !
    I am facing a problem that I have defined a function which when
    called in the same file generates an error as follows;
    " visual c error C2371 redefinition basic types
    see declaration of the function .
    "

    Could anyone please help me with this .

    Thank you
     
    junaidnaseer, May 9, 2006
    #1
    1. Advertising

  2. junaidnaseer wrote:
    > Hi !
    > I am facing a problem that I have defined a function which when
    > called in the same file generates an error as follows;
    > " visual c error C2371 redefinition basic types
    > see declaration of the function .
    > "
    >
    > Could anyone please help me with this .


    Look on line 42.


    Jonathan
     
    Jonathan Mcdougall, May 9, 2006
    #2
    1. Advertising

  3. junaidnaseer

    Ian Collins Guest

    junaidnaseer wrote:
    > Hi !
    > I am facing a problem that I have defined a function which when
    > called in the same file generates an error as follows;
    > " visual c error C2371 redefinition basic types
    > see declaration of the function .
    > "
    >
    > Could anyone please help me with this .
    >

    Maybe, if you post the code.

    --
    Ian Collins.
     
    Ian Collins, May 9, 2006
    #3
  4. junaidnaseer

    Tomás Guest

    junaidnaseer posted:

    > Hi !
    > I am facing a problem that I have defined a function which when
    > called in the same file generates an error as follows;
    > " visual c error C2371 redefinition basic types
    > see declaration of the function .



    My guess is that your function prototype doesn't match the definition of
    your function. Something like:

    int SomeFunc(char);

    double SomeFunc(char k)
    {
    return k * 2 / 3.56;
    }


    -Tomás
     
    Tomás, May 9, 2006
    #4
  5. junaidnaseer

    junaidnaseer Guest

    MY INITIAL MESSAGE

    junaidnaseer wrote:
    > Hi !
    > I am facing a problem that I have defined a function which when
    > called in the same file generates an error as follows;
    > " visual c error C2371 redefinition basic types
    > see declaration of the function .
    > "
    >
    > Could anyone please help me with this .
    >
    > Thank you


    MY NEW MESSAGE
    /////////////////////////////////////////////////////////////////////////////

    Hi Again !
    First of all I want to thank everyone who took out some of their
    precious time , just to reply to my question . I have solved or at
    least I think I have solved that problem ( error C2371 :redefinition
    basic variables error" ) and have now moved on to another problem in
    the same project .

    The problem is that when I try to execute the file built by my project
    it generates a windows error . The project has no errors as it builds
    correctly .The windows error when debugged points to a particular line
    saying that there is an UNHANDLED EXCEPTION there , although the line
    is perfectly correct .
    The error text file generated by the windows error is given below :

    ERROR TEXT FILE
    /*******************************************************************************************************************************

    <?xml version="1.0" encoding="UTF-16"?>
    <DATABASE>
    <EXE NAME="lencod.exe" FILTER="GRABMI_FILTER_PRIVACY">
    <MATCHING_FILE NAME="lencod.exe" SIZE="782448"
    CHECKSUM="0xBDC7774F" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0"
    LINKER_VERSION="0x0" LINK_DATE="05/09/2006 14:54:40"
    UPTO_LINK_DATE="05/09/2006 14:54:40" />
    </EXE>
    <EXE NAME="kernel32.dll" FILTER="GRABMI_FILTER_THISFILEONLY">
    <MATCHING_FILE NAME="kernel32.dll" SIZE="930304"
    CHECKSUM="0xCBCCF8A9" BIN_FILE_VERSION="5.1.2600.1106"
    BIN_PRODUCT_VERSION="5.1.2600.1106" PRODUCT_VERSION="5.1.2600.1106"
    FILE_DESCRIPTION="Windows NT BASE API Client DLL"
    COMPANY_NAME="Microsoft Corporation" PRODUCT_NAME="Microsoft®
    Windows® Operating System" FILE_VERSION="5.1.2600.1106
    (xpsp1.020828-1920)" ORIGINAL_FILENAME="kernel32"
    INTERNAL_NAME="kernel32" LEGAL_COPYRIGHT="© Microsoft Corporation. All
    rights reserved." VERFILEDATEHI="0x0" VERFILEDATELO="0x0"
    VERFILEOS="0x40004" VERFILETYPE="0x2" MODULE_TYPE="WIN32"
    PE_CHECKSUM="0xE7ED3" LINKER_VERSION="0x50001"
    UPTO_BIN_FILE_VERSION="5.1.2600.1106"
    UPTO_BIN_PRODUCT_VERSION="5.1.2600.1106" LINK_DATE="08/29/2002
    10:40:40" UPTO_LINK_DATE="08/29/2002 10:40:40" VER_LANGUAGE="English
    (United States) [0x409]" />
    </EXE>
    </DATABASE>


    /*******************************************************************************************************************************

    and the output of the program appears in command prompt window as below

    OUTPUT IN COMMAND PROMPT WINDOW

    /******************************************************************************************************************************

    C:\Documents and Settings\Junaid Naseer\Desktop\Visual C++ Code\edited
    3\jm92\JM
    \bin>lencod.exe
    Setting Default Parameters...
    Parsing Configfile
    encoder.cfg..................................................
    ..................................................................................
    ........

    ------------------------------- JM 9.2 (FRExt)
    --------------------------------
    Input YUV file : foreman_part_qcif.yuv
    Output H.264 bitstream : test.264
    Output YUV file : test_rec.yuv
    YUV Format : YUV 4:2:0
    Frames to be encoded I-P/B : 2/1
    PicInterlace / MbInterlace : 0/0
    Transform8x8Mode : 1
    -------------------------------------------------------------------------------
    Frame Bit/pic WP QP SnrY SnrU SnrV Time(ms) MET(ms)
    Frm/Fld I D
    -------------------------------------------------------------------------------

    C:\Documents and Settings\Junaid Naseer\Desktop\Visual C++ Code\edited
    3\jm92\JM
    \bin>pause
    Press any key to continue . . .


    /***********************************************************************************************************************************


    The program then terminates giving only partial output ( that output is
    not the really significant output I want , it only contains simple
    fprint statements for displaying titles ,etc ) , this you can see from
    the output I have copied from the command prompt window and displayed
    above.I am unable to find any logical or syntax errors in my files
    although that possibility cannot be ruled since the program is very
    long . (1536 lines of code)
    I have not given the code here because it is very long . There is
    another version of this program that does not have some modifications
    that I made in this program ( and the unmodified version works fine ) .
    The modifications I have made are simple variable increment statements
    like var++ ,( although I have added alot of such increment statements
    ). It would be impossible for me to give the entire code here or any
    specific sections since I don't think there is any specific section
    that's particularly cumbersome .
    If anyone can be kind enough to please help me with this , I shall be
    very grateful . And if you can ! please reply as soon as possible !

    Thank You !

    Junaid Naseer
     
    junaidnaseer, May 9, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. M P
    Replies:
    6
    Views:
    552
    Joe Fallon
    Aug 7, 2004
  2. Stewart
    Replies:
    1
    Views:
    524
    Ken Cox [Microsoft MVP]
    Feb 24, 2006
  3. Gernot Frisch

    redefinition, different types

    Gernot Frisch, Sep 13, 2004, in forum: C++
    Replies:
    13
    Views:
    2,226
    Jerry Coffin
    Sep 14, 2004
  4. Replies:
    4
    Views:
    3,623
    James Kanze
    Aug 5, 2008
  5. merrittr
    Replies:
    0
    Views:
    1,575
    merrittr
    Oct 9, 2009
Loading...

Share This Page