Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > visual C++ error C2371 redefinition basic types

Reply
Thread Tools

visual C++ error C2371 redefinition basic types

 
 
junaidnaseer
Guest
Posts: n/a
 
      05-09-2006
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

 
Reply With Quote
 
 
 
 
Jonathan Mcdougall
Guest
Posts: n/a
 
      05-09-2006
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

 
Reply With Quote
 
 
 
 
Ian Collins
Guest
Posts: n/a
 
      05-09-2006
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.
 
Reply With Quote
 
Tomás
Guest
Posts: n/a
 
      05-09-2006
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
 
Reply With Quote
 
junaidnaseer
Guest
Posts: n/a
 
      05-09-2006
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error C2371: 'wchar_t' : redefinition; different basic types PROBLEMS merrittr C Programming 0 10-09-2009 04:51 AM
error C2371: 'LineCollection' : redefinition; different basic types Samant.Trupti@gmail.com C++ 4 08-05-2008 07:53 AM
What is the difference between Visual Basic.NET and Visual Basic 6? Jimmy Dean Computer Support 3 07-25-2005 07:05 AM
redefinition, different types Gernot Frisch C++ 13 09-14-2004 03:06 PM
Upgrading Microsoft Visual Basic 6.0 to Microsoft Visual Basic .NET Jaime MCSD 2 09-20-2003 05:16 AM



Advertisments