473,320 Members | 1,990 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

visual C++ error C2371 redefinition basic types

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
4 10318
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Simon | last post by:
Hi, I'm having a problem with templates and specialisation. I'm using it to overload the same function so it can return different things. I can't see what I'm doing wrong, although my compiler...
0
by: Tom Lee | last post by:
Hi, I'm new to .NET 2003 compiler. When I tried to compile my program using DEBUG mode, I got the following errors in the C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7 \include\xdebug...
2
by: simen.haugen | last post by:
Hi. I'm trying to use Python 2.4 with MySql 5.0, but I'm having installation problems. I've tried to follow the following articles to install mysql-python with the free visual c++ toolkit...
6
by: Pierre Couderc | last post by:
What do I do wrong? class CTest { public: CTest(int uu); }; void ttt() {
6
by: pasalic.zaharije | last post by:
I write some project, and after few lines (ok, not few, after a lot of lines) i got internal compiler error. After few hours of looking trough my code, I find error: two same names in typedef and...
0
by: marathoner | last post by:
I am currently migrating my Visual C++ 6.0 applications to Visual Studio 2005. I am getting compiler errors involving the VS2005's platform SDK. When I removed directory references to that SDK,...
1
by: Angus | last post by:
Why moving a function from protected to public area in class causes error C2556 - overloaded function differs only by return type I have a protected function called GetState like this: enum...
2
by: im2cre8iv | last post by:
Here is my code where I am receiving the error: #include <fstream> #include "BinaryTree.h" using namespace std; Node* BinaryTree::MakeTree(ifstream& infile) { char name; infile>>name;
7
by: Samant.Trupti | last post by:
Hi, I am getting this error. error C2371: 'LineCollection' : redefinition; different basic types I have 'LineCollection' defined in two header files in one project Like "typedef...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.