473,725 Members | 2,126 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 10343
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.ex e" FILTER="GRABMI_ FILTER_PRIVACY" >
<MATCHING_FIL E NAME="lencod.ex e" SIZE="782448"
CHECKSUM="0xBDC 7774F" MODULE_TYPE="WI N32" PE_CHECKSUM="0x 0"
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_THISFILE ONLY">
<MATCHING_FIL E NAME="kernel32. dll" SIZE="930304"
CHECKSUM="0xCBC CF8A9" BIN_FILE_VERSIO N="5.1.2600.110 6"
BIN_PRODUCT_VER SION="5.1.2600. 1106" PRODUCT_VERSION ="5.1.2600.1106 "
FILE_DESCRIPTIO N="Windows NT BASE API Client DLL"
COMPANY_NAME="M icrosoft Corporation" PRODUCT_NAME="M icrosoft®
Windows® Operating System" FILE_VERSION="5 .1.2600.1106
(xpsp1.020828-1920)" ORIGINAL_FILENA ME="kernel32"
INTERNAL_NAME=" kernel32" LEGAL_COPYRIGHT ="© Microsoft Corporation. All
rights reserved." VERFILEDATEHI=" 0x0" VERFILEDATELO=" 0x0"
VERFILEOS="0x40 004" VERFILETYPE="0x 2" MODULE_TYPE="WI N32"
PE_CHECKSUM="0x E7ED3" LINKER_VERSION= "0x50001"
UPTO_BIN_FILE_V ERSION="5.1.260 0.1106"
UPTO_BIN_PRODUC T_VERSION="5.1. 2600.1106" LINK_DATE="08/29/2002
10:40:40" UPTO_LINK_DATE= "08/29/2002 10:40:40" VER_LANGUAGE="E nglish
(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_qc if.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
Transform8x8Mod e : 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
5252
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 promises me I am! Here follows an example of my code, and i've included the error VC is giving me if that helps. Can anyone point me in the right direction? Cheers, Simon ;o) --
0
6130
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 file as folows. I need help to resolve them ASAP: cl /c /nologo /MDd /W3 /Od /GR /GM /Zi /GX /D "_DEBUG" /D " WIN32" /D "_W INDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /D "_USRDLL" /
2
1839
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 http://mail.python.org/pipermail/python-list/2004-December/255184.html http://www.vrplumber.com/programming/mstoolkit/
6
3472
by: Pierre Couderc | last post by:
What do I do wrong? class CTest { public: CTest(int uu); }; void ttt() {
6
2054
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 in class. So, I write simple console app with: typedef unsigned int UI32; class UI32 {
0
6680
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, and started using the Microsoft Platform SDK for XP SP2, the errors disappeared, but I am now getting numerous warnings (macro redefinitions) as follows: StdAfx.cpp WINVER not defined. Defaulting to 0x0502 (Windows Server 2003) C:\Program...
1
2944
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 EState GetState(void) const throw(); If I move this function from protected: to public: I get this compile error:
2
5757
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
4233
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 std::vector<lineLineCollection;" But both of the header file not dependant on each other, they are
0
8888
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9401
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9257
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9176
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9113
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8097
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4519
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4784
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3221
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.