Hi,
I am an old retired programmer. I used to program in C as well as other languages. I have stumbled across BASS and want to discover what I might be able to do with it.
I am using Microsoft Visual C++ express (not quite what I am used to) and just flat stuck (don't know what I am doing yet)
I am sure the problem is simple but I just can't see what's not working. I have ordered a book,
but if this problem jumps right up and someone knows, I can use some help.
I don't expect anyone to spend a lot of time. I will have book in a few days.
I am fairly sure the problem is that I am not linking the Bass.dll. But don't know how to fix it.
Here are the errors:
1>TomsPlayer.obj : error LNK2028: unresolved token (0A000011) "extern "C" unsigned long __stdcall BASS_StreamCreateFile(int,void const *,unsigned __int64,unsigned __int64,unsigned long)" (?BASS_StreamCreateFile@@$$J228YGKHPBX_K1K@Z) referenced in function "private: void __clrcall TomsPlayer::Form1::button1_Click(class System::Object ^,class System::EventArgs ^)" (?button1_Click@Form1@TomsPlayer@@$$FA$AAMXP$AAVObject@System@@P$AAVEventArgs@4@@Z)
1>TomsPlayer.obj : error LNK2019: unresolved external symbol "extern "C" unsigned long __stdcall BASS_StreamCreateFile(int,void const *,unsigned __int64,unsigned __int64,unsigned long)" (?BASS_StreamCreateFile@@$$J228YGKHPBX_K1K@Z) referenced in function "private: void __clrcall TomsPlayer::Form1::button1_Click(class System::Object ^,class System::EventArgs ^)" (?button1_Click@Form1@TomsPlayer@@$$FA$AAMXP$AAVObject@System@@P$AAVEventArgs@4@@Z)
1>C:\Users\Toms\documents\visual studio 2010\Projects\TomsKaroakePlayer\Debug\TomsPlayer.exe : fatal error LNK1120: 2 unresolved externals
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
Here is the code. I have included the BASS.H which the compiler does appear to find.
I tried and commented out BASS_INIT and BASS_StreamCreateFile
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e)
{
int stream = BASS_StreamCreateFile(false, "c:\\temp\\test.mp3", 0L, 0L, 0);
if (stream != 0)
{
}
//BASS_Init(-1, 44100, 0, NULL ,NULL);
// BASS_StreamCreateFile(FALSE,"test.mp3",0,0,0);
}
Thanks I have enjoyed reading this forum.
Tom