简体   繁体   中英

OpenAL issue, undefined reference to '_imp__alGenBuffers'

I finally decided to download OpenAL, and OpenALUT. Upon writing my first bit of code, I came across a slight issue. Everytime I compile, I get the error listed in the title. Any help would be greatly appreciated. Code listed below, thanks. PS: I am using Code::Blocks.

#include <AL/al.h>
#include <AL/alut.h>

#define NUM_BUFFERS 1

int main()
{

    ALuint buffers[ NUM_BUFFERS ];

    alGenBuffers( NUM_BUFFERS, buffers );

}

I don't expect a real result out of this, I just expect that it compiles. I'm fairly certain it's an issue with my installation of OpenAL, although I am sure I did everything correctly...

It was my fault, I didn't link the libraries correctly. If you are having this error, then make sure you have linked them correctly, and/or they are the correct bit type, compared to the rest of the files.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM