Reputation: 30
I'm working on CodeBlocks 12.11 on windows 7 (64 bit). I'm programming in C and i'm using the library: libsndfile (http://www.mega-nerd.com/libsndfile/api.html) to easily read a .wav and convert it to a double array.
I ran the wizard of libsndfile (for windows 64 bit), also in the compiler settings of Codeblocks, I added the search directories for the compiler and linker. But, when I compile the program the only error is an:
"undefined reference to sf_open_fd"
Here's the code:
#include <stdio.h>
#include <stdlib.h>
#include <sndfile.h>
int main (int argc, char *argv[]) {
FILE* wavf;
SF_INFO info;
char* name = "example.wav";
wavf = fopen(name, "r");
SNDFILE* source = sf_open_fd(fileno(wavf), SFM_READ, &info, 1);
.
.
.
}
Any ideas? thank you!
Upvotes: 1
Views: 859
Reputation: 732
Upvotes: 1