visual C++ error C2371 redefinition basic types

J

junaidnaseer

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
 
J

Jonathan Mcdougall

junaidnaseer said:
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
 
I

Ian Collins

junaidnaseer said:
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.
 
T

Tomás

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
 
J

junaidnaseer

MY INITIAL MESSAGE
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top