Csound Csound-dev Csound-tekno Search About

Winsound not compiling in MSVC++ version 6.0

Date1999-04-27 00:36
FromSean Costello
SubjectWinsound not compiling in MSVC++ version 6.0
Hi Csound powers that be:

I am trying to compile Winsound from the Bath sources on my Win 98
machine, using MS Visual C++ 6.0 Professional. After having numerous
errors, linking the needed .c and .h files into the project, and other
various and sundry annoyances (I think that the VSC++ 6.0 library has at
least one file that is completely screwed up), I end up with the
following error message:

Linking...
MAIN.OBJ : error LNK2001: unresolved external symbol _all_free
.\WinDebug/winsound.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

The symbol all_free is found in main.c, memalloc.c, and prototyp.h. In
particular, it is used in the following lines:

#ifdef CWIN
        cwin_atexit(all_free);
#endif

cwin_atexit is defined earlier as 

#ifdef CWIN
        cwin_atexit(all_free);
#endif

OK, I am no C programming whiz, so anyone know what is going on in here?
Better yet, is there a distribution of the source code in which the
project file is the one that is actually USED to create the current
Winsound binary?  I had over 100 errors the first time I tried to
compile it.

Thanks,

Sean Costello

P.S. Do people normally use MSVC++ version 6.0 to compile Winsound?
Should I reinstall version 4.0? Are there any bug fixes for version 6.0

Date1999-04-27 13:58
Fromjpff@maths.bath.ac.uk
SubjectRe: Winsound not compiling in MSVC++ version 6.0
I use MSVC 5 and the project files in teh distribution are the ones
from my disk, inless WinZip is not working.

all_free is defined in memalloc.c but is protected by the macro
MEMDEBUG.  I suspect that teh line in main.c should similarly be
protected by MEMDEBUG

It took me les time to determine this that it took you to type your
message!