[PyQt] Help - WINAPI PSoundW and WINAPI Beep linker error using sip
Demetrius Cassidy
dcassidy36 at mass.rr.com
Sun Apr 4 02:24:25 BST 2010
Found the problem...winmm library was compiled with ANSI Character set, but
sip forces Unicode character set. I had to re-compile my sip wrapped with
ANSI character set instead.
Demetrius Cassidy wrote:
>
> Still need help with this =(
>
> I've tried adding this to my sip file:
> %ModuleHeaderCode
> #include <mmsystem.h>
> #pragma comment(lib, "winmm.lib")
> %End
>
> Tried adding the same code above directly to the offending .cpp files:
> #include <mmsystem.h>
> #pragma comment(lib, "winmm.lib")
>
> And tried just copying winmm.lib into the folder with the makefile, and
> anywhere else where LIBPATH is looking and it won't link the damn thing.
> Help!!
>
>
>
> link /NOLOGO /DLL /MANIFEST /MANIFESTFILE:pyptlib.pyd.manifest
> /SUBSYSTE
> M:WINDOWS "/MANIFESTDEPENDENCY:type='win32'
> name='Microsoft.Windows.Common-Contr
> ols' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*'
> processorA
> rchitecture='*'" /INCREMENTAL:NO /OUT:pyptlib.pyd
> @C:\DOCUME~1\dcassidy\LOCALS~1
> \Temp\nm33B.tmp
> Creating library pyptlib.lib and object pyptlib.exp
> sippyptlibPSoundChannelWin32.obj : error LNK2001: unresolved external
> symbol "pu
> blic: virtual bool __thiscall PSoundChannelWin32::PlaySoundW(class PSound
> const
> &,bool)" (?PlaySoundW at PSoundChannelWin32@@UAE_NABVPSound@@_N at Z)
> sippyptlibPSoundChannel.obj : error LNK2001: unresolved external symbol
> "public:
> virtual bool __thiscall PSoundChannel::PlaySoundW(class PSound const
> &,bool)" (
> ?PlaySoundW at PSoundChannel@@UAE_NABVPSound@@_N at Z)
> sippyptlibPFile.obj : error LNK2019: unresolved external symbol "public:
> bool __
> thiscall PFile::Move(class PFilePath const &,bool)"
> (?Move at PFile@@QAE_NABVPFileP
> ath@@_N at Z) referenced in function _meth_PFile_Move
> pyptlib.pyd : fatal error LNK1120: 3 unresolved externals
> NMAKE : fatal error U1077: '"c:\Program Files\Microsoft Visual Studio
> 9.0\VC\BIN
> \link.EXE"' : return code '0x460'
> Stop.
>
>
> Demetrius Cassidy wrote:
>>
>> I found out I need to include winmm.lib, but I can't figure out how to
>> force sip to include this. I tried adding "/LIBPATH:"C:\Program
>> Files\Microsoft SDKs\Windows\v6.0A\Lib" and including winmm.lib under
>> LIBS of the makefile, but I still get the same linker errors.
>>
>> LIBS = /LIBPATH:$(PTLIBDIR)/lib /LIBPATH:"C:\Program Files\Microsoft
>> SDKs\Windows\v6.0A\Lib"
>> /LIBPATH:C:\iPhoneDev\h323lib\sip\qpy\QtCore\release
>> /LIBPATH:C:\Python26\libs qpycore.lib ptlib.lib winmm.lib python26.lib
>>
>>
>>
>> Demetrius Cassidy wrote:
>>>
>>> I am not sure what do I need to do to include the windows library into
>>> sip, so it links correctly. I am trying to use PlaySoundW and Beep which
>>> are defined in MMSystem.h in a class called PSound. It compiles fine in
>>> VC9.0, but gives me linker errors when I wrap it with sip.
>>>
>>> Generating Code...
>>> link /NOLOGO /DLL /MANIFEST /MANIFESTFILE:pyptlib.pyd.manifest
>>> /SUBSYSTE
>>> M:WINDOWS "/MANIFESTDEPENDENCY:type='win32'
>>> name='Microsoft.Windows.Common-Contr
>>> ols' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*'
>>> processorA
>>> rchitecture='*'" /INCREMENTAL:NO /OUT:pyptlib.pyd
>>> @C:\DOCUME~1\dcassidy\LOCALS~1
>>> \Temp\nm1047.tmp
>>> Creating library pyptlib.lib and object pyptlib.exp
>>> sippyptlibPSoundChannel.obj : error LNK2019: unresolved external symbol
>>> "public:
>>> virtual bool __thiscall PSoundChannel::PlaySoundW(class PSound const
>>> &,bool)" (
>>> ?PlaySoundW at PSoundChannel@@UAE_NABVPSound@@_N at Z) referenced in function
>>> "protect
>>> ed: virtual bool __thiscall sipPSoundChannel::PlaySoundW(class PSound
>>> const &,bo
>>> ol)" (?PlaySoundW at sipPSoundChannel@@MAE_NABVPSound@@_N at Z)
>>> sippyptlibPSound.obj : error LNK2019: unresolved external symbol
>>> "public: static
>>> void __cdecl PSound::Beep(void)" (?Beep at PSound@@SAXXZ) referenced in
>>> function _
>>> meth_PSound_Beep
>>> pyptlib.pyd : fatal error LNK1120: 2 unresolved externals
>>> NMAKE : fatal error U1077: '"c:\Program Files\Microsoft Visual Studio
>>> 9.0\VC\BIN
>>> \link.EXE"' : return code '0x460'
>>> Stop.
>>>
>>
>>
>
>
--
View this message in context: http://old.nabble.com/Help---WINAPI-PSoundW-and-WINAPI-Beep-linker-error-using-sip-tp27966897p28130570.html
Sent from the PyQt mailing list archive at Nabble.com.
More information about the PyQt
mailing list