I am working on a project to get myself back in to c++ and one I will hopefully be using in the future as well. The main thing I am working on right now is to make a wrapper around open al so it can more easily be accessed in my code. I have a sound object that will hold a buffer and a source, so you can play it with simply methods like soundname.play(), etc. I also store a map of strings and ALuint's to hold file name and their associated buffers, as to not load a buffer with the same file as another. However, I get a linker error when using visual studio 2010. The offending line (as far as I can tell is:
static map\ buffers;
The error I get (it's very cryptic, and googling returns very few helpfull results):
1>Sound.obj error LNK2001: unresolved external symbol "private: static class std::map\,class std::allocator\ >,unsigned int,struct std::less\,class std::allocator\ > >,class std::allocator\,class std::allocator\ > const ,unsigned int> > > Sound::buffers" (<?buffers@Sound@@0V?>\<$map@V?>\\$basic_\\$char_\<$allocator@D@2@@std@@IU?>\<$less@V?>\\$basic_\\$char_\<$allocator@D@2@@std@@@2@V?>\<$allocator@U?>\\$pair@\\$\\$CBV?\\$basic_\\$char_\<$allocator@D@2@@std@@I@std@@@2@@std@@A>)
1>C:\Users\Owner\Documents\Visual Studio 2010\Projects\audio stuff\Debug\audio stuff.exe : fatal error LNK1120: 1 unresolved externals
I have linked the following libraries:
I have an idea that it has to do with the ALuint in the map, but I'm not sure how to correct it. Any help is appreciated.