www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript
electronics



c++ - Compiling nedmalloc

↑ ↓ ← "Craig Black" <cblack ara.com> writes:
I've been talking with Niall Douglas, the author of nedmalloc about my
problems with compiling it using DMC.  He says the libraries are outdated.
In addition to the problem posted below, it seems that DMC's kernel32.lib
does not include the required functions TryEnterCriticalSection and
Initialize CriticalSectionAndSpinCount.

On 5 Jan 2007 at 11:33, Craig Black wrote:

 Sorry I didn't respond sooner. Someone told me that it didn't compile

 DMC, so to verify I had to find the time to try it myself. nedmalloc.c

 compile, but test.c does not. It could be a problem with the Digital Mars

 compiler. Perhaps if we can figure out what the bug is, we can report it.

 maybe there is a quick fix that you could implement to get it working.
 Here's the error messages I get.

 C:\nedmalloc>..\dm\bin\dmc test.c -w -c
 HeapSetInformation(win32heap, HeapCompatibilityInformation,
 &data, sizeof(data));
 ^
 test.c(228) : Error: undefined identifier 'HeapCompatibilityInformation'
 --- errorlevel 1

 Thanks in advance.

Heh, that's dirt easy! Your friend is using an old SDK which isn't defining HeapCompatibilityInformation. He can upgrade it, or else substitute 0 for it. See http://msdn2.microsoft.com/en- us/library/aa366705.aspx. Cheers, Niall
Jan 05 2007
↑ ↓ "Craig Black" <cblack ara.com> writes:
 In addition to the problem posted below, it seems that DMC's kernel32.lib
 does not include the required functions TryEnterCriticalSection and
 InitializeCriticalSectionAndSpinCount.

After talking with Niall some more, we found that we could get rid of the TryEnterCriticalSection link error by adding the line #define _WIN32_WINNT 0x403 before #include <windows.h> Curiosly, this did not fix the link error with InitializeCriticalSectionAndSpinCount. After further investigation, I found that both are found in DMC's kernel32.lib. Perhaps the function parameters are different. I still think DMC may need to upgrade it's libraries. Anyone have any other ideas? -Craig
Jan 05 2007
↑ ↓ → "Paul McKenzie" <paulm dynasoft.com> writes:
"Craig Black" <cblack ara.com> wrote in message
news:enm7q2$2ub2$1 digitaldaemon.com...
 Anyone have any other ideas?

 -Craig

Why not just use the implib.exe found in the installation BIN directory? Then you can just create the library from the DLL if the library is not up-to-date. Paul
Jan 06 2007