开发者

Trying to call functions from other classes

I'm trying to get FMOD working but I just can't get the main() to call it

int main()
{
  cout << "Us开发者_运维技巧ing FMOD \n";
  cout << "Select a Track: 1-5 Horror \n";
  cin >> HorrorTrack;

  AudioProject *pAudioProject = new AudioProject;
  pAudioProject->initAudio();
  //AudioProject::initAudio();
  MainPage(); // Main Page Function
  
  if (pAudioProject)
  {
      delete pAudioProject;
      pAudioProject=NULL;
  }
  
  char f;
  cin>>f; 
  return 0;
}

The errors I'm getting are:

unresolved external symbol "public: __thiscall AudioProject::AudioProject(void)" (??0AudioProject@@QAE@XZ) referenced in function _main

1>C:\Users\CodeMonkey\Desktop\AudioProject\Debug\AudioProject.exe : fatal error LNK1120: 1 unresolved externals.

Which is from the .h file variables which are declared public. However, if I make the initAudio anything but public I wont be able to access it in my main() function. Any ideas?


You haven't linked the library, so the definitions of symbols that it exports cannot be found.

Read this "FMOD"'s instructions.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜