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

Problem with class redefinition

Hello all,

I have a very stupid problem that is driving me crazy...so plz if
anyone ever saw this, I would like him to help me :)
I have static MFC application in MSVC++ 6.0 (named Example). That
application is built by one company and its usage is to show
functionality of their static libraries.
Now I created dynamic link library CoreLibrary and I want to integrate
it into this example. CoreLibrary worked properly with win32
application.
When I put main header of my .dll library into ExampleDoc.h (after
changing project properties)
After compiling I get these mistakes:

.....
CoreInclude\wce_time.h(73) : warning C4273: 'asctime' : inconsistent
dll linkage. dllexport assumed.
CoreInclude\wce_time.h(74) : warning C4273: 'tzset' : inconsistent dll
linkage. dllexport assumed.
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\sys/timeb.h(84) :
error C2011: 'timeb' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\sys/timeb.h(105)
: error C2556: 'void __cdecl ftime(struct timeb *)' : overloaded
function differs only by return type from 'int __cdecl ftime(struct
timeb *)'
CoreInclude\wce_time.h(89) : see declaration of 'ftime'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\sys/timeb.h(105)
: error C2371: 'ftime' : redefinition; different basic types
CoreInclude\wce_time.h(89) : see declaration of 'ftime'
....

Seems that there is redefinition of time classes...But what to do to
avoid it?

Thx

Jul 19 '06 #1
1 3477
Alex wrote:
I have a very stupid problem that is driving me crazy...so plz if
anyone ever saw this, I would like him to help me :)
I have static MFC application in MSVC++ 6.0 (named Example). That
application is built by one company and its usage is to show
functionality of their static libraries.
Now I created dynamic link library CoreLibrary and I want to integrate
it into this example. CoreLibrary worked properly with win32
application.
When I put main header of my .dll library into ExampleDoc.h (after
changing project properties)
After compiling I get these mistakes:

....
CoreInclude\wce_time.h(73) : warning C4273: 'asctime' : inconsistent
dll linkage. dllexport assumed.
CoreInclude\wce_time.h(74) : warning C4273: 'tzset' : inconsistent dll
linkage. dllexport assumed.
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\sys/timeb.h(84) :
error C2011: 'timeb' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\sys/timeb.h(105)
: error C2556: 'void __cdecl ftime(struct timeb *)' : overloaded
function differs only by return type from 'int __cdecl ftime(struct
timeb *)'
CoreInclude\wce_time.h(89) : see declaration of 'ftime'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\sys/timeb.h(105)
: error C2371: 'ftime' : redefinition; different basic types
CoreInclude\wce_time.h(89) : see declaration of 'ftime'
...

Seems that there is redefinition of time classes...But what to do to
avoid it?
Your question is platform-specific and thus off-topic here. See this
FAQ for what is on-topic here and for a list of other places you could
try:

http://www.parashift.com/c++-faq-lit...t.html#faq-5.9

Cheers! --M

Jul 19 '06 #2

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

Similar topics

5
by: lomat | last post by:
Hello, While compiling a file, I get following error .... ================================= /usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/include/g++/type_traits.h:14 2: redefinition of...
1
by: A | last post by:
Hi, I created an array of user defined objects dynamically in a class Foo's constructor. class Foo{ Foo(){ Bar* b = new Bar(); }
0
by: tyousaf | last post by:
Hi i am new to mysql and mysql++, i have installed mysql server, it is running fine. i also installed "mysql++-1.7.9gcc3.2-2.i386.rpm" (i have gcc 3.3) , first of all as the readme file says to do...
1
by: squallions | last post by:
Hi I doing my c++ homework and stuck on error 'class' type redefinition. I have 5 classes. First class is base class. The next two classes are derived from the first class. The next two...
15
by: Brian Haynes | last post by:
I am having a problem with overloading. An example: Public Class Base ... End Class Public Class Derived Inherits Base ... End Class
9
by: Prasad | last post by:
HI, I am a beginner in VC++.. I am trying to write a Win32 console application in visual studio.. I am using following header files.. #include <STRING> using namespace std; #include...
1
by: Martin.C.Johnsson | last post by:
Hi, I have the following problem The below class is fully defined in the header file thus there's no ..cpp-file. The header-file is included in several lib's I'm using. ---------- #pragma once...
0
by: =?Utf-8?B?Sm9obkE=?= | last post by:
When adding a "Managed Assembly" i.e., a dll to an existing C++/CLI program i get the error: LDAPfunctions.h(183) : error C2011: 'LDAPfunctions::LdapSsl' : 'class' type redefinition This is...
1
by: dileepd | last post by:
Hi Every one, Could you please let me know if you have any clue about following things. 1. Whether type bool acts like a kind of signed int type in g++ on solaris 9(a/c to my invetsigation it...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
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
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,...

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.