1
Audio / Re: Errors when trying to link sfml-audio
« on: July 10, 2016, 06:17:12 pm »
I am using SFML-2.2.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Error 4 error LNK2019: unresolved external symbol sf_open referenced in function "public: bool __cdecl sf::priv::SoundFile::openRead(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?openRead@SoundFile@priv@sf@@QEAA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundFile.cpp.obj) AIProject
Error 5 error LNK2019: unresolved external symbol sf_open_virtual referenced in function "public: bool __cdecl sf::priv::SoundFile::openRead(void const *,unsigned __int64)" (?openRead@SoundFile@priv@sf@@QEAA_NPEBX_K@Z) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundFile.cpp.obj) AIProject
Error 6 error LNK2019: unresolved external symbol sf_strerror referenced in function "public: bool __cdecl sf::priv::SoundFile::openRead(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?openRead@SoundFile@priv@sf@@QEAA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundFile.cpp.obj) AIProject
Error 7 error LNK2019: unresolved external symbol sf_seek referenced in function "public: void __cdecl sf::priv::SoundFile::seek(class sf::Time)" (?seek@SoundFile@priv@sf@@QEAAXVTime@3@@Z) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundFile.cpp.obj) AIProject
Error 8 error LNK2019: unresolved external symbol sf_read_short referenced in function "public: unsigned __int64 __cdecl sf::priv::SoundFile::read(short *,unsigned __int64)" (?read@SoundFile@priv@sf@@QEAA_KPEAF_K@Z) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundFile.cpp.obj) AIProject
Error 9 error LNK2019: unresolved external symbol sf_write_short referenced in function "public: void __cdecl sf::priv::SoundFile::write(short const *,unsigned __int64)" (?write@SoundFile@priv@sf@@QEAAXPEBF_K@Z) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundFile.cpp.obj) AIProject
Error 10 error LNK2019: unresolved external symbol sf_close referenced in function "public: __cdecl sf::priv::SoundFile::~SoundFile(void)" (??1SoundFile@priv@sf@@QEAA@XZ) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundFile.cpp.obj) AIProject
/OUT:"C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\x64\Debug\AIProject.exe" /MANIFEST /NXCOMPAT /PDB:"C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\x64\Debug\AIProject.pdb" /DYNAMICBASE "winmm.lib" "opengl32.lib" "gdi32.lib" "glew.lib" "jpeg.lib" "freetype.lib" "openal32.lib" "flac.lib" "vorbisenc.lib" "vorbisfile.lib" "vorbis.lib" "ogg.lib" "sfml-audio-s-d.lib" "sfml-graphics-s-d.lib" "sfml-window-s-d.lib" "sfml-system-s-d.lib" "kernel32.lib" "user32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" /DEBUG /MACHINE:X64 /INCREMENTAL /PGD:"C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\x64\Debug\AIProject.pgd" /SUBSYSTEM:WINDOWS /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"x64\Debug\AIProject.exe.intermediate.manifest" /ERRORREPORT:PROMPT /NOLOGO /LIBPATH:".\SFML-2.2\lib" /TLBID:1
winmm.lib
opengl32.lib
gdi32.lib
glew.lib
jpeg.lib
freetype.lib
openal32.lib
flac.lib
vorbisenc.lib
vorbisfile.lib
vorbis.lib
ogg.lib
sfml-audio-s-d.lib
sfml-graphics-s-d.lib
sfml-window-s-d.lib
sfml-system-s-d.lib
kernel32.lib
user32.lib
winspool.lib
comdlg32.lib
advapi32.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
odbc32.lib
odbccp32.lib
Error 4 error LNK2019: unresolved external symbol __imp_alSourcei referenced in function "private: void __cdecl sf::SoundStream::streamData(void)" (?streamData@SoundStream@sf@@AEAAXXZ) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundStream.cpp.obj) AIProject
Error 5 error LNK2001: unresolved external symbol __imp_alSourcei C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundSource.cpp.obj) AIProject
Error 6 error LNK2019: unresolved external symbol __imp_alGetSourcef referenced in function "public: class sf::Time __cdecl sf::SoundStream::getPlayingOffset(void)const " (?getPlayingOffset@SoundStream@sf@@QEBA?AVTime@2@XZ) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundStream.cpp.obj) AIProject
Error 7 error LNK2001: unresolved external symbol __imp_alGetSourcef C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundSource.cpp.obj) AIProject
Error 8 error LNK2019: unresolved external symbol __imp_alGetSourcei referenced in function "private: void __cdecl sf::SoundStream::streamData(void)" (?streamData@SoundStream@sf@@AEAAXXZ) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundStream.cpp.obj) AIProject
Error 9 error LNK2001: unresolved external symbol __imp_alGetSourcei C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundSource.cpp.obj) AIProject
Error 10 error LNK2019: unresolved external symbol __imp_alSourcePlay referenced in function "public: void __cdecl sf::SoundStream::play(void)" (?play@SoundStream@sf@@QEAAXXZ) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundStream.cpp.obj) AIProject
Error 11 error LNK2019: unresolved external symbol __imp_alSourceStop referenced in function "private: void __cdecl sf::SoundStream::streamData(void)" (?streamData@SoundStream@sf@@AEAAXXZ) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundStream.cpp.obj) AIProject
Error 12 error LNK2019: unresolved external symbol __imp_alSourcePause referenced in function "public: void __cdecl sf::SoundStream::pause(void)" (?pause@SoundStream@sf@@QEAAXXZ) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundStream.cpp.obj) AIProject
Error 13 error LNK2019: unresolved external symbol __imp_alSourceQueueBuffers referenced in function "private: bool __cdecl sf::SoundStream::fillAndPushBuffer(unsigned int)" (?fillAndPushBuffer@SoundStream@sf@@AEAA_NI@Z) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundStream.cpp.obj) AIProject
Error 14 error LNK2019: unresolved external symbol __imp_alSourceUnqueueBuffers referenced in function "private: void __cdecl sf::SoundStream::streamData(void)" (?streamData@SoundStream@sf@@AEAAXXZ) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundStream.cpp.obj) AIProject
Error 15 error LNK2019: unresolved external symbol __imp_alGenBuffers referenced in function "private: void __cdecl sf::SoundStream::streamData(void)" (?streamData@SoundStream@sf@@AEAAXXZ) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundStream.cpp.obj) AIProject
Error 16 error LNK2019: unresolved external symbol __imp_alDeleteBuffers referenced in function "private: void __cdecl sf::SoundStream::streamData(void)" (?streamData@SoundStream@sf@@AEAAXXZ) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundStream.cpp.obj) AIProject
Error 17 error LNK2019: unresolved external symbol __imp_alBufferData referenced in function "private: bool __cdecl sf::SoundStream::fillAndPushBuffer(unsigned int)" (?fillAndPushBuffer@SoundStream@sf@@AEAA_NI@Z) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundStream.cpp.obj) AIProject
Error 18 error LNK2019: unresolved external symbol __imp_alGetBufferi referenced in function "private: void __cdecl sf::SoundStream::streamData(void)" (?streamData@SoundStream@sf@@AEAAXXZ) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundStream.cpp.obj) AIProject
Error 19 error LNK2019: unresolved external symbol __imp_alGenSources referenced in function "public: __cdecl sf::SoundSource::SoundSource(class sf::SoundSource const &)" (??0SoundSource@sf@@QEAA@AEBV01@@Z) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundSource.cpp.obj) AIProject
Error 20 error LNK2019: unresolved external symbol __imp_alDeleteSources referenced in function "public: virtual __cdecl sf::SoundSource::~SoundSource(void)" (??1SoundSource@sf@@UEAA@XZ) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundSource.cpp.obj) AIProject
Error 21 error LNK2019: unresolved external symbol __imp_alSourcef referenced in function "public: void __cdecl sf::SoundSource::setPitch(float)" (?setPitch@SoundSource@sf@@QEAAXM@Z) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundSource.cpp.obj) AIProject
Error 22 error LNK2019: unresolved external symbol __imp_alSource3f referenced in function "public: void __cdecl sf::SoundSource::setPosition(float,float,float)" (?setPosition@SoundSource@sf@@QEAAXMMM@Z) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundSource.cpp.obj) AIProject
Error 23 error LNK2019: unresolved external symbol __imp_alGetSource3f referenced in function "public: class sf::Vector3<float> __cdecl sf::SoundSource::getPosition(void)const " (?getPosition@SoundSource@sf@@QEBA?AV?$Vector3@M@2@XZ) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundSource.cpp.obj) AIProject
Error 24 error LNK2019: unresolved external symbol __imp_alIsExtensionPresent referenced in function "public: static bool __cdecl sf::priv::AudioDevice::isExtensionSupported(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?isExtensionSupported@AudioDevice@priv@sf@@SA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(AudioDevice.cpp.obj) AIProject
Error 25 error LNK2019: unresolved external symbol __imp_alGetEnumValue referenced in function "public: static int __cdecl sf::priv::AudioDevice::getFormatFromChannelCount(unsigned int)" (?getFormatFromChannelCount@AudioDevice@priv@sf@@SAHI@Z) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(AudioDevice.cpp.obj) AIProject
Error 26 error LNK2019: unresolved external symbol __imp_alcCreateContext referenced in function "public: __cdecl sf::priv::AudioDevice::AudioDevice(void)" (??0AudioDevice@priv@sf@@QEAA@XZ) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(AudioDevice.cpp.obj) AIProject
Error 27 error LNK2019: unresolved external symbol __imp_alcMakeContextCurrent referenced in function "public: __cdecl sf::priv::AudioDevice::AudioDevice(void)" (??0AudioDevice@priv@sf@@QEAA@XZ) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(AudioDevice.cpp.obj) AIProject
Error 28 error LNK2019: unresolved external symbol __imp_alcDestroyContext referenced in function "public: __cdecl sf::priv::AudioDevice::~AudioDevice(void)" (??1AudioDevice@priv@sf@@QEAA@XZ) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(AudioDevice.cpp.obj) AIProject
Error 29 error LNK2019: unresolved external symbol __imp_alcOpenDevice referenced in function "public: __cdecl sf::priv::AudioDevice::AudioDevice(void)" (??0AudioDevice@priv@sf@@QEAA@XZ) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(AudioDevice.cpp.obj) AIProject
Error 30 error LNK2019: unresolved external symbol __imp_alcCloseDevice referenced in function "public: __cdecl sf::priv::AudioDevice::~AudioDevice(void)" (??1AudioDevice@priv@sf@@QEAA@XZ) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(AudioDevice.cpp.obj) AIProject
Error 31 error LNK2019: unresolved external symbol __imp_alcIsExtensionPresent referenced in function "public: static bool __cdecl sf::priv::AudioDevice::isExtensionSupported(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?isExtensionSupported@AudioDevice@priv@sf@@SA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(AudioDevice.cpp.obj) AIProject
Error 32 error LNK2019: unresolved external symbol __imp_alGetError referenced in function "void __cdecl sf::priv::alCheckError(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned int)" (?alCheckError@priv@sf@@YAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@I@Z) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(ALCheck.cpp.obj) AIProject
Error 33 error LNK2019: unresolved external symbol sf_open referenced in function "public: bool __cdecl sf::priv::SoundFile::openRead(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?openRead@SoundFile@priv@sf@@QEAA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundFile.cpp.obj) AIProject
Error 34 error LNK2019: unresolved external symbol sf_open_virtual referenced in function "public: bool __cdecl sf::priv::SoundFile::openRead(void const *,unsigned __int64)" (?openRead@SoundFile@priv@sf@@QEAA_NPEBX_K@Z) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundFile.cpp.obj) AIProject
Error 35 error LNK2019: unresolved external symbol sf_strerror referenced in function "public: bool __cdecl sf::priv::SoundFile::openRead(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?openRead@SoundFile@priv@sf@@QEAA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundFile.cpp.obj) AIProject
Error 36 error LNK2019: unresolved external symbol sf_seek referenced in function "public: void __cdecl sf::priv::SoundFile::seek(class sf::Time)" (?seek@SoundFile@priv@sf@@QEAAXVTime@3@@Z) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundFile.cpp.obj) AIProject
Error 37 error LNK2019: unresolved external symbol sf_read_short referenced in function "public: unsigned __int64 __cdecl sf::priv::SoundFile::read(short *,unsigned __int64)" (?read@SoundFile@priv@sf@@QEAA_KPEAF_K@Z) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundFile.cpp.obj) AIProject
Error 38 error LNK2019: unresolved external symbol sf_write_short referenced in function "public: void __cdecl sf::priv::SoundFile::write(short const *,unsigned __int64)" (?write@SoundFile@priv@sf@@QEAAXPEBF_K@Z) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundFile.cpp.obj) AIProject
Error 39 error LNK2019: unresolved external symbol sf_close referenced in function "public: __cdecl sf::priv::SoundFile::~SoundFile(void)" (??1SoundFile@priv@sf@@QEAA@XZ) C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\AIProject\sfml-audio-s-d.lib(SoundFile.cpp.obj) AIProject
Error 40 error LNK1120: 33 unresolved externals C:\Users\MKH\Desktop\MMBN - The AI\AIProject\AIProject\x64\Debug\AIProject.exe AIProject
#include <SFML/System.hpp>
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <sstream>
#include <string>
class Field
{
sf::RenderWindow App;
sf::Image image;
sf::Sprite sprite;
public:
Field(int x, int y) {App.Create(sf::VideoMode(x, y), "SFML");};
void FEvent();
void FDisplay (int, int, std::string);
};
void Field::FEvent ()
{
while(App.IsOpened())
{
sf::Event Event;
while (App.GetEvent(Event))
{
if (Event.Type == sf::Event::MouseButtonPressed)
FDisplay(Event.MouseMove.X, Event.MouseMove.Y, "X.bmp");
}
}
}
void Field::FDisplay (int pos1, int pos2, std::string filename)
{
if(!image.LoadFromFile(filename))
{
App.Close();
}
sprite.SetImage(image);
App.Clear();
sprite.SetPosition(pos1, pos2);
App.Draw(sprite);
App.Display();
}
int main()
{
Field F(315, 315);
F.FEvent();
}
void Field::FEvent ()
{
while (App.IsOpened())
{
sf::Event Event;
while (App.GetEvent(Event))
{
if (Event.Type == sf::Event::Closed)
App.Close();
if (Event.Type == sf::Event::MouseButtonPressed)
App.Close();
}
}
}
while(App.IsOpened())
{
FEvent();
FDisplay(1.f, 1.f, 1);
}
void Field::FDImage(std::string filename, int arpos)
{
if(!image[arpos].LoadFromFile(filename))
{
App.Close();
}
sprite[arpos].SetImage(image[arpos]);
}
FDImage("Field.bmp", 0);
FDImage("O.bmp", 1);
FDImage("X.bmp", 2);
App.Clear();
sprite[1].SetX(pos1);
sprite[1].SetY(pos2);
App.Draw(sprite[1]);
App.Display();
void Field::FDisplay (float pos1, float pos2, int pl)
{
for(int i = 0; i < 3; i++)
{
if (Farray[i] != 0 && Farray[i] != 1)
{
Farray[i] = 0;
}
}
App.Clear();
sprite[1].SetX(0.f);
sprite[1].SetY(0.f);
App.Draw(sprite[1]); //Corrected
}
//...
F.FDisplay(1.f, 1.f, 1);
sf::Image image[3];
sf::Sprite sprite[3];
void Field::FDImage(std::string filename, int arpos)
{
if (!image[arpos].LoadFromFile(filename))
{
App.Close();
}
if (!sprite[arpos].SetImage(image[arpos]))
{
App.Close();
}
}
C:\...\SFML_Project\main.cpp
||In member function 'void Field::FDImage(std::string, int)':
|C:\...\SFML_Project\main.cpp|52|error:
could not convert '((Field*)this)->Field::sprite[arpos].sf::Sprite::SetImage(((const sf::Image&)((const sf::Image*)(&((Field*)this)->Field::image[arpos]))))' to 'bool' in argument to unary !