Results 1 to 2 of 2
hello.
i have a little problem by linking the libx264.a.
i have a program like:
#include <stdint.h>
#include <x264.h>
void main()
{
x264_param_t param;
x264_param_default( &param );
return(0);
}
when ...
- 07-03-2009 #1Just Joined!
- Join Date
- Jul 2009
- Posts
- 1
problem by linking libx264.a
hello.
i have a little problem by linking the libx264.a.
i have a program like:
#include <stdint.h>
#include <x264.h>
void main()
{
x264_param_t param;
x264_param_default( ¶m );
return(0);
}
when i compile this with:
g++ -o x264 -g x264.cpp /usr/lib/libx264.a
i've got an errormessage from the linker:
/tmp/cc1futJW.o: In function `main':
/home/peabrain/Projects/x264/x264.cpp:9: undefined reference to `x264_param_default(x264_param_t*)'
collect2: ld gab 1 als Ende-Status zurück
make: *** [capture] Fehler 1
the libx264.a is in /usr/lib/ and with grep i can see that the funktions in there.
also i've got a .c file with the same code.
but when i compile with:
gcc -o x264 x264.c /usr/lib/libx264.a
its done.
but when i compile the .cpp file, its not done.
please help.
thanks
- 07-03-2009 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
Your compiler line is wrong. Try this:
Code:g++ -g x264.cpp -o x264 -l x264
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote