Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How am I supposed to compile and use the library instead of the sonic program? #31

Open
mavavilj opened this issue May 3, 2022 · 5 comments

Comments

@mavavilj
Copy link

mavavilj commented May 3, 2022

How am I supposed to compile and use the library instead of the sonic program?

I'm interested in computing a spectrogram.

I download, unzip, and then do:

make

After this I do:

gcc main.c -L. -lsonic

which fails to:


/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: /tmp/ccIksmQF.o: in function `runSonic':
main.c:(.text+0x77): undefined reference to `openInputWaveFile'
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: main.c:(.text+0xe7): undefined reference to `openOutputWaveFile'
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: main.c:(.text+0xfe): undefined reference to `closeWaveFile'
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: main.c:(.text+0x1e7): undefined reference to `readFromWaveFile'
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: main.c:(.text+0x271): undefined reference to `writeToWaveFile'
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: main.c:(.text+0x299): undefined reference to `closeWaveFile'
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: main.c:(.text+0x2ae): undefined reference to `closeWaveFile'
collect2: error: ld returned 1 exit status
@mavavilj
Copy link
Author

mavavilj commented May 3, 2022

Okay fixed by doing:

LD_LIBRARY_PATH=./
export L_LIBRARY_PATH

gcc main.c wave.c -L. -lsonic

@mavavilj mavavilj closed this as completed May 3, 2022
@mavavilj mavavilj reopened this May 3, 2022
@mavavilj
Copy link
Author

mavavilj commented May 3, 2022

But now I got stuck in trying to compile this with spectrogram.c and kiss_fft.

I found no instructions for this.

@mavavilj
Copy link
Author

mavavilj commented May 7, 2022

@MalcolmSlaney
Copy link
Collaborator

MalcolmSlaney commented May 7, 2022 via email

@mavavilj
Copy link
Author

mavavilj commented May 7, 2022

Well first Linux (OpenSuse), but afterwards I was interested in seeing, if this can be made work on Android via JNI and NDK.

But you didn't clarify, how do I enable kissfft.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants