473,387 Members | 1,516 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,387 software developers and data experts.

What this mean? Compiler output


19 ..\tipos.h previous declaration of 'ccc' was here
27 ..\tipos.h conflicting types for 'client'

I have a lot...


May 24 '06 #1
2 1977

Olaf "El Blanco" wrote:

You should have tried to post some code as well...
19 ..\tipos.h previous declaration of 'ccc' was here
This probably means that you have multiple (same) declaration of the
symbol `ccc`, and that the first one was on line 19. You should also
have an error message telling you where the duplicate was found.
27 ..\tipos.h conflicting types for 'client'
Probably same as above, but this time the declarations did not match in
type.
I have a lot...


Try fixing one by one.

May 24 '06 #2
"Vladimir Oka" <no****@btopenworld.com> wrote:
Olaf "El Blanco" wrote:
You should have tried to post some code as well...
19 ..\tipos.h previous declaration of 'ccc' was here


This probably means that you have multiple (same) declaration of the
symbol `ccc`, and that the first one was on line 19. You should also
have an error message telling you where the duplicate was found.


Olaf, you do not mention if 'ccc' is a type or variable name.
I will assume it is a type, based on the file name you provide.

A common source for this problem is header files without multiple
inclusion guards. For example, if I have the following two header
files:

file tipos.h:
...
typedef short int ccc;
...

file a.h:
...
#include "tipos.h"
...

And then a C source file includes both, the typedef for ccc will be
processed twice:

file c.c:
...
#include "tipos.h"
#include ""a.h" /* <- ccc multiple declaration error here */
... /* when tipos.h is processed a second */
/* time. */

The solution is to block the C preprocessor from using the contents of
any single header file more than once, as follows:

file tipos.h:
#ifndef TIPOS_H_INCLUDED
#define TIPOS_H_INCLUDED
...
typedef short int ccc;
...
#endif /* TIPOS_H_INCLUDED */

file a.h:
#ifndef A_H_INCLUDED
#define A_H_INCLUDED
...
#include "tipos.h"
...
#endif /* A_H_INCLUDED */

file c.c:
...
#include "tipos.h"
#include ""a.h" /* <- ok, the contents of tipo.h are */
... /* ignored the 2nd time */
Occasionally you will see the same technique applied to typedefs or
variables:

...
#ifndef BOOLEAN
#define BOOLEAN
typedef unsigned char boolean;
#define FALSE 0
#define TRUE 1
#endif /* BOOLEAN */
...

On the other hand, if ccc is a variable, you are probably defining it
in a header file. Change the definition to a declaration ("extern ???
ccc;") and define it in a single C source file.
May 24 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: Steven T. Hatton | last post by:
I just read this in the description of how C++ is supposed to be implemented: "All external object and function references are resolved. Library components are linked to satisfy external...
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
2
by: Thomas G. Marshall | last post by:
Arthur J. O'Dwyer <ajo@nospam.andrew.cmu.edu> coughed up the following: > On Thu, 1 Jul 2004, Thomas G. Marshall wrote: >> >> Aside: I've looked repeatedly in google and for some reason cannot >>...
92
by: Heinrich Pumpernickel | last post by:
what does this warning mean ? #include <stdio.h> int main() { long l = 100; printf("l is %li\n", l * 10L);
2
by: tvnaidu | last post by:
Downloaded PowerPC cross compiler tool chain for LINUX, trying to compile C / CPP file, I am getting "Floating Point exception" to compile any file, no problem with regular GCC. any idea why I am...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...

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.