Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Can't build my project. I'm getting these linker errors:  (Read 4039 times)

0 Members and 2 Guests are viewing this topic.

smguyk

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Can't build my project. I'm getting these linker errors:
« on: April 20, 2015, 02:25:55 pm »
Code: [Select]
1>------ Build started: Project: game, Configuration: Debug Win32 ------
1>sfml-audio-s-d.lib(SoundBuffer.cpp.obj) : error LNK2019: unresolved external symbol __imp__alGenBuffers referenced in function "public: __thiscall sf::SoundBuffer::SoundBuffer(void)" (??0SoundBuffer@sf@@QAE@XZ)
1>sfml-audio-s-d.lib(SoundStream.cpp.obj) : error LNK2001: unresolved external symbol __imp__alGenBuffers
1>sfml-audio-s-d.lib(SoundBuffer.cpp.obj) : error LNK2019: unresolved external symbol __imp__alDeleteBuffers referenced in function "public: __thiscall sf::SoundBuffer::~SoundBuffer(void)" (??1SoundBuffer@sf@@QAE@XZ)
1>sfml-audio-s-d.lib(SoundStream.cpp.obj) : error LNK2001: unresolved external symbol __imp__alDeleteBuffers
1>sfml-audio-s-d.lib(SoundBuffer.cpp.obj) : error LNK2019: unresolved external symbol __imp__alBufferData referenced in function "private: bool __thiscall sf::SoundBuffer::update(unsigned int,unsigned int)" (?update@SoundBuffer@sf@@AAE_NII@Z)
1>sfml-audio-s-d.lib(SoundStream.cpp.obj) : error LNK2001: unresolved external symbol __imp__alBufferData
1>sfml-audio-s-d.lib(SoundBuffer.cpp.obj) : error LNK2019: unresolved external symbol __imp__alGetBufferi referenced in function "public: unsigned int __thiscall sf::SoundBuffer::getSampleRate(void)const " (?getSampleRate@SoundBuffer@sf@@QBEIXZ)
1>sfml-audio-s-d.lib(SoundStream.cpp.obj) : error LNK2001: unresolved external symbol __imp__alGetBufferi
1>sfml-audio-s-d.lib(SoundSource.cpp.obj) : error LNK2019: unresolved external symbol __imp__alGenSources referenced in function "public: __thiscall sf::SoundSource::SoundSource(class sf::SoundSource const &)" (??0SoundSource@sf@@QAE@ABV01@@Z)
1>sfml-audio-s-d.lib(SoundSource.cpp.obj) : error LNK2019: unresolved external symbol __imp__alDeleteSources referenced in function "public: virtual __thiscall sf::SoundSource::~SoundSource(void)" (??1SoundSource@sf@@UAE@XZ)
1>sfml-audio-s-d.lib(SoundSource.cpp.obj) : error LNK2019: unresolved external symbol __imp__alSourcef referenced in function "public: void __thiscall sf::SoundSource::setPitch(float)" (?setPitch@SoundSource@sf@@QAEXM@Z)
1>sfml-audio-s-d.lib(Sound.cpp.obj) : error LNK2001: unresolved external symbol __imp__alSourcef
1>sfml-audio-s-d.lib(SoundSource.cpp.obj) : error LNK2019: unresolved external symbol __imp__alSource3f referenced in function "public: void __thiscall sf::SoundSource::setPosition(float,float,float)" (?setPosition@SoundSource@sf@@QAEXMMM@Z)
1>sfml-audio-s-d.lib(SoundSource.cpp.obj) : error LNK2019: unresolved external symbol __imp__alSourcei referenced in function "public: __thiscall sf::SoundSource::SoundSource(class sf::SoundSource const &)" (??0SoundSource@sf@@QAE@ABV01@@Z)
1>sfml-audio-s-d.lib(SoundStream.cpp.obj) : error LNK2001: unresolved external symbol __imp__alSourcei
1>sfml-audio-s-d.lib(Sound.cpp.obj) : error LNK2001: unresolved external symbol __imp__alSourcei
1>sfml-audio-s-d.lib(SoundSource.cpp.obj) : error LNK2019: unresolved external symbol __imp__alGetSourcef referenced in function "public: float __thiscall sf::SoundSource::getPitch(void)const " (?getPitch@SoundSource@sf@@QBEMXZ)
1>sfml-audio-s-d.lib(SoundStream.cpp.obj) : error LNK2001: unresolved external symbol __imp__alGetSourcef
1>sfml-audio-s-d.lib(Sound.cpp.obj) : error LNK2001: unresolved external symbol __imp__alGetSourcef
1>sfml-audio-s-d.lib(SoundSource.cpp.obj) : error LNK2019: unresolved external symbol __imp__alGetSource3f referenced in function "public: class sf::Vector3<float> __thiscall sf::SoundSource::getPosition(void)const " (?getPosition@SoundSource@sf@@QBE?AV?$Vector3@M@2@XZ)
1>sfml-audio-s-d.lib(SoundSource.cpp.obj) : error LNK2019: unresolved external symbol __imp__alGetSourcei referenced in function "public: bool __thiscall sf::SoundSource::isRelativeToListener(void)const " (?isRelativeToListener@SoundSource@sf@@QBE_NXZ)
1>sfml-audio-s-d.lib(SoundStream.cpp.obj) : error LNK2001: unresolved external symbol __imp__alGetSourcei
1>sfml-audio-s-d.lib(Sound.cpp.obj) : error LNK2001: unresolved external symbol __imp__alGetSourcei
1>sfml-audio-s-d.lib(SoundStream.cpp.obj) : error LNK2019: unresolved external symbol __imp__alSourcePlay referenced in function "public: void __thiscall sf::SoundStream::play(void)" (?play@SoundStream@sf@@QAEXXZ)
1>sfml-audio-s-d.lib(Sound.cpp.obj) : error LNK2001: unresolved external symbol __imp__alSourcePlay
1>sfml-audio-s-d.lib(SoundStream.cpp.obj) : error LNK2019: unresolved external symbol __imp__alSourceStop referenced in function "private: void __thiscall sf::SoundStream::streamData(void)" (?streamData@SoundStream@sf@@AAEXXZ)
1>sfml-audio-s-d.lib(Sound.cpp.obj) : error LNK2001: unresolved external symbol __imp__alSourceStop
1>sfml-audio-s-d.lib(SoundStream.cpp.obj) : error LNK2019: unresolved external symbol __imp__alSourcePause referenced in function "public: void __thiscall sf::SoundStream::pause(void)" (?pause@SoundStream@sf@@QAEXXZ)
1>sfml-audio-s-d.lib(Sound.cpp.obj) : error LNK2001: unresolved external symbol __imp__alSourcePause
1>sfml-audio-s-d.lib(SoundStream.cpp.obj) : error LNK2019: unresolved external symbol __imp__alSourceQueueBuffers referenced in function "private: bool __thiscall sf::SoundStream::fillAndPushBuffer(unsigned int)" (?fillAndPushBuffer@SoundStream@sf@@AAE_NI@Z)
1>sfml-audio-s-d.lib(SoundStream.cpp.obj) : error LNK2019: unresolved external symbol __imp__alSourceUnqueueBuffers referenced in function "private: void __thiscall sf::SoundStream::streamData(void)" (?streamData@SoundStream@sf@@AAEXXZ)
1>sfml-audio-s-d.lib(SoundFile.cpp.obj) : error LNK2019: unresolved external symbol _sf_open referenced in function "public: bool __thiscall sf::priv::SoundFile::openRead(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?openRead@SoundFile@priv@sf@@QAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>sfml-audio-s-d.lib(SoundFile.cpp.obj) : error LNK2019: unresolved external symbol _sf_open_virtual referenced in function "public: bool __thiscall sf::priv::SoundFile::openRead(void const *,unsigned int)" (?openRead@SoundFile@priv@sf@@QAE_NPBXI@Z)
1>sfml-audio-s-d.lib(SoundFile.cpp.obj) : error LNK2019: unresolved external symbol _sf_strerror referenced in function "public: bool __thiscall sf::priv::SoundFile::openRead(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?openRead@SoundFile@priv@sf@@QAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>sfml-audio-s-d.lib(SoundFile.cpp.obj) : error LNK2019: unresolved external symbol _sf_seek referenced in function "public: void __thiscall sf::priv::SoundFile::seek(class sf::Time)" (?seek@SoundFile@priv@sf@@QAEXVTime@3@@Z)
1>sfml-audio-s-d.lib(SoundFile.cpp.obj) : error LNK2019: unresolved external symbol _sf_read_short referenced in function "public: unsigned int __thiscall sf::priv::SoundFile::read(short *,unsigned int)" (?read@SoundFile@priv@sf@@QAEIPAFI@Z)
1>sfml-audio-s-d.lib(SoundFile.cpp.obj) : error LNK2019: unresolved external symbol _sf_write_short referenced in function "public: void __thiscall sf::priv::SoundFile::write(short const *,unsigned int)" (?write@SoundFile@priv@sf@@QAEXPBFI@Z)
1>sfml-audio-s-d.lib(SoundFile.cpp.obj) : error LNK2019: unresolved external symbol _sf_close referenced in function "public: __thiscall sf::priv::SoundFile::~SoundFile(void)" (??1SoundFile@priv@sf@@QAE@XZ)
1>sfml-audio-s-d.lib(AudioDevice.cpp.obj) : 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_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>sfml-audio-s-d.lib(AudioDevice.cpp.obj) : 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)
1>sfml-audio-s-d.lib(AudioDevice.cpp.obj) : error LNK2019: unresolved external symbol __imp__alcCreateContext referenced in function "public: __thiscall sf::priv::AudioDevice::AudioDevice(void)" (??0AudioDevice@priv@sf@@QAE@XZ)
1>sfml-audio-s-d.lib(AudioDevice.cpp.obj) : error LNK2019: unresolved external symbol __imp__alcMakeContextCurrent referenced in function "public: __thiscall sf::priv::AudioDevice::AudioDevice(void)" (??0AudioDevice@priv@sf@@QAE@XZ)
1>sfml-audio-s-d.lib(AudioDevice.cpp.obj) : error LNK2019: unresolved external symbol __imp__alcDestroyContext referenced in function "public: __thiscall sf::priv::AudioDevice::~AudioDevice(void)" (??1AudioDevice@priv@sf@@QAE@XZ)
1>sfml-audio-s-d.lib(AudioDevice.cpp.obj) : error LNK2019: unresolved external symbol __imp__alcOpenDevice referenced in function "public: __thiscall sf::priv::AudioDevice::AudioDevice(void)" (??0AudioDevice@priv@sf@@QAE@XZ)
1>sfml-audio-s-d.lib(AudioDevice.cpp.obj) : error LNK2019: unresolved external symbol __imp__alcCloseDevice referenced in function "public: __thiscall sf::priv::AudioDevice::~AudioDevice(void)" (??1AudioDevice@priv@sf@@QAE@XZ)
1>sfml-audio-s-d.lib(AudioDevice.cpp.obj) : 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_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>sfml-audio-s-d.lib(ALCheck.cpp.obj) : 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@@YAXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@I@Z)
1>C:\Users\admin\Documents\Visual Studio 2012\Projects\game\Debug\game.exe : fatal error LNK1120: 33 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I get the same error for the release version. I don't understand what's wrong. I use the same settings I used in previous completed projects...

Linker dependencies are

Code: [Select]
sfml-audio-s-d.lib
sfml-graphics-s-d.lib
sfml-main-d.lib
sfml-system-s-d.lib
sfml-window-s-d.lib
freetype.lib
gdi32.lib
glew.lib
jpeg.lib
opengl32.lib
winmm.lib

for debug and

Code: [Select]
sfml-audio-s.lib
sfml-graphics-s.lib
sfml-main.lib
sfml-system-s.lib
sfml-window-s.lib
freetype.lib
gdi32.lib
glew.lib
jpeg.lib
opengl32.lib
winmm.lib

for release.

Can someone help me please?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
AW: Can't build my project. I'm getting these linker errors:
« Reply #1 on: April 20, 2015, 02:27:29 pm »
You're missing openal32.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

smguyk

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Re: Can't build my project. I'm getting these linker errors:
« Reply #2 on: April 20, 2015, 02:30:35 pm »
Okay that's embarrassing. I knew it had something to do with the audio :/

Thank you!

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
AW: Can't build my project. I'm getting these linker errors:
« Reply #3 on: April 20, 2015, 02:31:55 pm »
As general advice, just google the reference name and you'll usually find out of which it is, then add that lib.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything