Path: news.cs.au.dk!not-for-mail From: Manmathan Muthukumarapillai Newsgroups: comp.lang.beta Subject: Re: snd.obj : error LNK2001: unresolved external symbol _sndPlaySound Date: 24 May 1999 12:54:09 -0000 Organization: Mjolner Informatics ApS, Denmark Lines: 80 Approved: mailtonews@cs.au.dk Distribution: world Message-ID: <19990524125409.26731.qmail@noatun.mjolner.dk> Reply-To: Manmathan Muthukumarapillai NNTP-Posting-Host: daimi.cs.au.dk X-Trace: xinwen.cs.au.dk 927550462 3689592 255.255.255.255 (24 May 1999 12:54:22 GMT) X-Complaints-To: news@cs.au.dk NNTP-Posting-Date: 24 May 1999 12:54:22 GMT Xref: news.cs.au.dk comp.lang.beta:11960 Mon, May 24, 1999 at 09:42:27AM +0200 Sascha Kimmel wrote: > Hello! > > I'm trying to use the MS WINAPI function sndPlaySound > (http://msdn.microsoft.com/library/sdkdoc/multimed/mmfunc_4uzo.htm) from > within BETA. > The program looks as follows: > > ---- cut here ---- > > ORIGIN '~beta/guienv/v1.6/guienvall'; > > INCLUDE '~beta/guienv/v1.6/private/winnt/guienv_ntiprivate' > '~beta/guienv/v1.6/private/winnt/stddialogs_ntibody' > '~beta/win32lib/v1.6/ntinterface' > '~beta/win32lib/v1.6/winuserconsts'; > > BUILD nti '$$/snd.obj' 'snd.c' 'betacc $0 $1'; You do not need snd.c. Just remove the line. --mannan > > -- program: descriptor -- > > guienv > (# > > SND_ASYNC:(# exit 0x0001 #); > > PlaySound: external > (# > pszSound:[1]@char; (* LPCSTR *) > fdwSound:@integer; (* DWORD *) > result:@integer; > enter (pszSound,fdwsound) > do 'sndPlaySound' -> callStd; > exit result > #); > > > do > ('gleitab.wav',SND_ASYNC)->PlaySound; > > > #) > > ---- /cut here ---- > > I'm using snd.c just for including the necessary mmsystem.h: > > ---- cut here ---- > > #include > #include > #include > #include > #include > > ---- /cut here ---- > > When I try to compile this program I get the following error message: > > d:\beta\tricos\nti\ms\snd.obj : warning LNK4042: object specified more > than once > ; extras ignored > snd.obj : error LNK2001: unresolved external symbol _sndPlaySound > snd.exe : fatal error LNK1120: 1 unresolved externals > A Link Error Occurred > > Any quick help is appreciated!! > > Regards, > Sascha Kimmel > kimmel@tricos.com > >