1
System / Re: Process finished with exit code -1073741515 (0xC0000135)
« on: January 18, 2024, 11:05:43 am »
All began working ok, except, again, for this code snippet:
void Actions::load_main_menu_music(Music * music) {
if (!music->openFromFile("../Audio/Music/MainTheme.mp3")) {
throw std::runtime_error("Couldn't open the music file.");
}
}
I get the error when I execute this command in the terminal: cmake -S . -B build ; cmake --build build --config Release
Error:
Actions.obj : error LNK2019: unresolved external symbol "public: bool __cdecl sf::Music::openFromFile(class std::basic_string<char,struct std::char_traits<char
>,class std::allocator<char> > const &)" (?openFromFile@Music@sf@@QEAA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in func
tion "void __cdecl Actions::load_main_menu_music(class sf::Music *)" (?load_main_menu_music@Actions@@YAXPEAVMusic@sf@@@Z) [C:\Users\rcybe\CLionProjects\Asteroi
dBelt\build\AsteroidBelt.vcxproj]
C:\Users\rcybe\CLionProjects\AsteroidBelt\build\bin\Release\AsteroidBelt.exe : fatal error LNK1120: 1 unresolved externals [C:\Users\rcybe\CLionProjects\Astero
idBelt\build\AsteroidBelt.vcxproj]
void Actions::load_main_menu_music(Music * music) {
if (!music->openFromFile("../Audio/Music/MainTheme.mp3")) {
throw std::runtime_error("Couldn't open the music file.");
}
}
I get the error when I execute this command in the terminal: cmake -S . -B build ; cmake --build build --config Release
Error:
Actions.obj : error LNK2019: unresolved external symbol "public: bool __cdecl sf::Music::openFromFile(class std::basic_string<char,struct std::char_traits<char
>,class std::allocator<char> > const &)" (?openFromFile@Music@sf@@QEAA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in func
tion "void __cdecl Actions::load_main_menu_music(class sf::Music *)" (?load_main_menu_music@Actions@@YAXPEAVMusic@sf@@@Z) [C:\Users\rcybe\CLionProjects\Asteroi
dBelt\build\AsteroidBelt.vcxproj]
C:\Users\rcybe\CLionProjects\AsteroidBelt\build\bin\Release\AsteroidBelt.exe : fatal error LNK1120: 1 unresolved externals [C:\Users\rcybe\CLionProjects\Astero
idBelt\build\AsteroidBelt.vcxproj]