I'm working on a little demo which uses CUDA. I installed a 64 bit C compiler for it and the 64-bit version of CUDA.
Now I want some music to play, however minifmod and ufmod both use 32-bit assembly code. This results in Linker errors. "LNK2019: unresolved external symbol". The 64-bit linker cannot link the 32-bit Lib's.
I gave it a try to run the 32-bit DOS-prompt with the 32-bit CL.exe, however the CUDA compiler NVCC still generates 64-bit executables. You can determine that by using: dumpbin /headers <exe-file>
Look in de log presented to you and you will find: 8664 machine (x64)
XMPLib:
XMPLib seems to be a total C XM player, so I tried to compile it. However it is Linux oriented, so you need to do the ./configure,make dance which is not supported by Visual Studio. I installed MINGW on my 64-bit machine. The LibXMP.dll is generated without a problem. However after checking with dumpbin it still is a 32-bit DLL!
After checking the MINGW website, I discovered that MINGW is only 32 bit at this moment! Pheww, the installer didn't mention it when installing MINGW on my 64-bit Windows.
BASS:
But now, there is music, maestro!
BASS ships 64-bit DLL's and LIB's compatible with VS2010. Download at: www.un4seen.com/stuff/bass24-x64.zip
To start the music simply do:
HMUSIC TheMod;
BASS_Init(-1,44100,0,0,NULL);
char xmfile[] = "CRACKINT.MOD";
TheMod = BASS_MusicLoad(FALSE,xmfile,0,0,BASS_MUSIC_RAMPS,1);
BASS_ChannelPlay(TheMod,FALSE);
and at exit:
BASS_MusicFree(TheMod);
BASS_Free();
Include the bass.h in your C code and link the bass.lib.
Geen opmerkingen:
Een reactie posten