Re: Compiling with VC++ 5.0

From: Richard Dobson (rwd@cableinet.co.uk)
Date: Wed Apr 05 2000 - 14:48:20 EDT


Ah, it looks as if you are running cl directly, rather than using Dev
Studio, which routinely adds a large list of libraries to the project.
in this case you need just one: user32.lib.

Regarding the warnings: the first one is because the function
InitOutput() is
declared with one argument, whereas it should have three:
int InitOutput(long,long,long);

The other warnings relate to a NULL argument being passed to the
functions,IDirectSoundBuffer_Unlock and IDirectSoundBuffer_Lock,
expecting a long final argument, rather than a pointer (blame C++ for
this...).

You can safely ignore these last warnings, but for tidiness you can
replace the offending final NULL arguments with 0 (zero), and all should
be well (except that I have yet to build a DirectSound sfront program
that runs without glitches...)

Richard Dobson

Martin Marier wrote:
>
> Hi,
>
> I installed the SDK's header files. My files are compiling now, but I
> still have a problem linking my .obj file with the two .lib files.
>
> I get this message :
>
> C:\audio\SAOL\sfront\examples\beat>cl beatrt.c dxguid.lib dsound.lib
> Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 11.00.7022 for 80x86
> Copyright (C) Microsoft Corp 1984-1997. All rights reserved.
>
> beatrt.c
> beatrt.c(824) : warning C4029: declared formal parameter list different from
> definition
> beatrt.c(969) : warning C4047: 'function' : 'unsigned long ' differs in
> levels of indirection from 'void *'
> beatrt.c(969) : warning C4024: 'function through pointer' : different types
> forformal and actual parameter 5
> beatrt.c(971) : warning C4047: 'function' : 'unsigned long ' differs in
> levels of indirection from 'void *'
> beatrt.c(971) : warning C4024: 'function through pointer' : different types
> for formal and actual parameter 8
> Microsoft (R) 32-Bit Incremental Linker Version 5.00.7022
> Copyright (C) Microsoft Corp 1992-1997. All rights reserved.
>
> /out:beatrt.exe
> beatrt.obj
> dxguid.lib
> dsound.lib
> beatrt.obj : error LNK2001: unresolved external symbol
> __imp__GetDesktopWindow@0
> beatrt.obj : error LNK2001: unresolved external symbol
> __imp__GetForegroundWindow@0
> beatrt.exe : fatal error LNK1120: 2 unresolved externals
>
> Can anyone help ?
>
> Martin Marier
>
> >Don't forget you also need the relevant new header files from the SDK -
> >it's not enough just to install the runtime libraries. The struct
> >DIRECTSOUNDNOTIFY is defined in one of the headers.
> >
> >Richard Dobson

-- 
Test your DAW with my Soundcard Attrition Page!
http://wkweb5.cableinet.co.uk/rwd (LU: 17th September 1999)
CDP: http://www.bath.ac.uk/~masjpf/CDP/CDP.htm (LU: 4th November 1999)



This archive was generated by hypermail 2b29 : Mon Jan 28 2002 - 11:46:38 EST