468,512 Members | 1,147 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,512 developers. It's quick & easy.

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 3140
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by lomat | last post: by
reply views Thread by tyousaf | last post: by
1 post views Thread by squallions | last post: by
15 posts views Thread by Brian Haynes | last post: by
1 post views Thread by Martin.C.Johnsson | last post: by
reply views Thread by =?Utf-8?B?Sm9obkE=?= | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.