Build 2.6 on MSW with VC6

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
DmP
Earned a small fee
Earned a small fee
Posts: 15
Joined: Fri Apr 15, 2005 8:00 am
Location: Ukraine

Build 2.6 on MSW with VC6

Post by DmP »

Hi!

I am trying to build wx, base lib with Win32 DLL Debug Configuration.
And getting the following errors:

--------------------Configuration: base - Win32 DLL Debug--------------------
Compiling...
memory.cpp
Linking...
Creating library ..\..\lib\vc_dll\wxbase26d.lib and object ..\..\lib\vc_dll\wxbase26d.exp
object.obj : error LNK2001: unresolved external symbol "void * __cdecl wxDebugAlloc(unsigned int,char *,int,bool,bool)" (?wxDebugAlloc@@YAPAXIPADH_N1@Z)
object.obj : error LNK2001: unresolved external symbol "void __cdecl wxDebugFree(void *,bool)" (?wxDebugFree@@YAXPAX_N@Z)
..\..\lib\vc_dll\wxbase26d_vc_custom.dll : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

wxbase26d_vc_custom.dll - 3 error(s), 0 warning(s)

My setting in setup.h:
#define wxUSE_MEMORY_TRACING 1

I'm found in memory.cpp:

#if !(defined(__WXMSW__) && (defined(WXUSINGDLL) || defined(WXMAKINGDLL_BASE)))
#ifdef __WXDEBUG__
#if wxUSE_GLOBAL_MEMORY_OPERATORS

<skip>

#if wxUSE_ARRAY_MEMORY_OPERATORS

<skip>

#endif // wxUSE_ARRAY_MEMORY_OPERATORS
#endif // !(defined(__WXMSW__) && (defined(WXUSINGDLL) || defined(WXMAKINGDLL_BASE)))
#endif // wxUSE_GLOBAL_MEMORY_OPERATORS

// TODO: store whether this is a vector or not.
void * wxDebugAlloc(size_t size, wxChar * fileName, int lineNum, bool isObject, bool WXUNUSED(isVect) )
{
<skip>
}

// TODO: check whether was allocated as a vector
void wxDebugFree(void * buf, bool WXUNUSED(isVect) )
{
<skip>
}

#endif // __WXDEBUG__


May be error in:
#if !(defined(__WXMSW__) && (defined(WXUSINGDLL) || defined(WXMAKINGDLL_BASE)))
#ifdef __WXDEBUG__
#if wxUSE_GLOBAL_MEMORY_OPERATORS
DmP
Earned a small fee
Earned a small fee
Posts: 15
Joined: Fri Apr 15, 2005 8:00 am
Location: Ukraine

Post by DmP »

Sorry my bad English.

But wx 2.6.0 not linking with "#define wxUSE_MEMORY_TRACING 1" in setup.h on VC6.

It's OK?
Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Post by Jorg »

It seems nobody knows the answer to this, did you tried the wx-users mailinglist? A lot of wx-devs are there that might know the answer.

Regards,
- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
DmP
Earned a small fee
Earned a small fee
Posts: 15
Joined: Fri Apr 15, 2005 8:00 am
Location: Ukraine

Post by DmP »

Jorg wrote:It seems nobody knows the answer to this, did you tried the wx-users mailinglist?
No, thanks.

It's simple patched:

--- memory.cpp Tue Mar 1 12:58:20 2005
+++ memory_my.cpp Wed Apr 27 11:54:34 2005
@@ -917,9 +917,9 @@

#endif

-#if !(defined(__WXMSW__) && (defined(WXUSINGDLL) || defined(WXMAKINGDLL_BASE)))
#ifdef __WXDEBUG__
#if wxUSE_GLOBAL_MEMORY_OPERATORS
+#if !(defined(__WXMSW__) && (defined(WXUSINGDLL) || defined(WXMAKINGDLL_BASE)))
void * operator new (size_t size, wxChar * fileName, int lineNum)
{
return wxDebugAlloc(size, fileName, lineNum, false, false);


I hope somebody from english-speaking people have this problem.
Post Reply