By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,314 Members | 1,790 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,314 IT Pros & Developers. It's quick & easy.

visual C++ error C2371 redefinition basic types

P: n/a
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

May 10 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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

May 10 '06 #2

P: n/a
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.
May 10 '06 #3

P: n/a
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
May 10 '06 #4

P: n/a
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

May 10 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.