Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
12-05-2008, 08:43 AM
|
#1
|
|
Member
Registered: Apr 2007
Location: brazil
Distribution: Arch Linux
Posts: 70
Rep:
|
compile error: expected ‘;’ before ‘*’ token
hi i am trying to compile a program, but it gives this output:
Code:
In file included from ../src/include/impl_layers.h:48,
from freej.cpp:38:
../src/include/video_layer.h:34: error: ISO C++ forbids declaration of ‘AVPicture’ with no type
../src/include/video_layer.h:34: error: expected ‘;’ before ‘*’ token
../src/include/video_layer.h:46: error: ISO C++ forbids declaration of ‘AVCodec’ with no type
../src/include/video_layer.h:46: error: expected ‘;’ before ‘*’ token
../src/include/video_layer.h:47: error: ISO C++ forbids declaration of ‘AVInputFormat’ with no type
../src/include/video_layer.h:47: error: expected ‘;’ before ‘*’ token
../src/include/video_layer.h:48: error: ISO C++ forbids declaration of ‘AVFormatContext’ with no type
../src/include/video_layer.h:48: error: expected ‘;’ before ‘*’ token
../src/include/video_layer.h:49: error: ISO C++ forbids declaration of ‘AVStream’ with no type
../src/include/video_layer.h:49: error: expected ‘;’ before ‘*’ token
../src/include/video_layer.h:50: error: ISO C++ forbids declaration of ‘AVPicture’ with no type
../src/include/video_layer.h:50: error: expected ‘;’ before ‘*’ token
../src/include/video_layer.h:51: error: ‘AVPacket’ does not name a type
../src/include/video_layer.h:52: error: ISO C++ forbids declaration of ‘AVCodecContext’ with no type
../src/include/video_layer.h:52: error: expected ‘;’ before ‘*’ token
../src/include/video_layer.h:53: error: ISO C++ forbids declaration of ‘AVCodec’ with no type
../src/include/video_layer.h:53: error: expected ‘;’ before ‘*’ token
../src/include/video_layer.h:54: error: ‘AVFrame’ does not name a type
../src/include/video_layer.h:100: error: ‘AVPicture’ has not been declared
../src/include/video_layer.h:103: error: ‘AVPicture’ has not been declared
../src/include/video_layer.h:104: error: ‘AVPicture’ has not been declared
make[3]: ** [freej.o] Erro 1
make[3]: Saindo do diretório `/home/livre/Desktop/AUR/freej/src/freej-0.10/src'
make[2]: ** [all-recursive] Erro 1
make[2]: Saindo do diretório `/home/livre/Desktop/AUR/freej/src/freej-0.10/src'
make[1]: ** [all-recursive] Erro 1
make[1]: Saindo do diretório `/home/livre/Desktop/AUR/freej/src/freej-0.10'
make: ** [all] Erro 2
==> ERRO: Compilação Falhou.
Abortando...
it is probably a gcc version problem, but i could make a patch. i just need to know what to type.
cheers
|
|
|
|
12-05-2008, 11:05 AM
|
#2
|
|
ReliaFree Maintainer
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware, Cross Linux from Scratch, Gentoo
Posts: 2,663
Rep: 
|
Those undeclared AV's are defined by ffmpeg. Do you have ffmpeg installed including the development files? If so, it may be too new. ffmpeg used to install its headers in /usr/include/ffmpeg, but that has changed to /usr/include/libavcodec. I don't know when it changed, I only know that I had problems recently trying to build a package against ffmpeg.
Looking at the freej file video_layer.h I see the following
Code:
#include <ffmpeg/avcodec.h>
#include <ffmpeg/avformat.h>
If I'm remembering the chronological order of the ffmpeg header paths, it looks like freej hasn't been updated to reflect the newer ffmpeg paths.
Last edited by weibullguy; 12-05-2008 at 11:07 AM.
|
|
|
|
12-05-2008, 11:47 AM
|
#3
|
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2012.8, Slack1337 DebSqueeze, +50+ other Linux OS, for test only.
Posts: 11,626
|
If you look at the lines, where the errors start,
you will see : missing avcodec.h, avformat.h,
swscale.h
It might be solved by running the 'autogen.sh'
to make a better 'configure'
EDIT. : No, 'autogen.sh' didn't solve that
problem, but solved issues appearing later.
Lines 25,26,28 in freej-x.x/src/include/video_layer.h
can be edited to
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libswscale/swscale.h>
All depending on your ffmpeg, could also be
like #2, by weibullguy.
You will also need fftw-3 and swig, which are
not asked for in 'configure'
The executeable 'freej' will look for libs in
/usr/lib only, so it might be an idea to have
"--prefix=/usr"
The above was made on Slackware 12.1
....
Last edited by knudfl; 12-05-2008 at 12:36 PM.
|
|
|
|
12-05-2008, 03:02 PM
|
#4
|
|
ReliaFree Maintainer
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware, Cross Linux from Scratch, Gentoo
Posts: 2,663
Rep: 
|
Quote:
Originally Posted by knudfl
If you look at the lines, where the errors start,
you will see : missing avcodec.h, avformat.h,
swscale.h
|
You must have actually tried to build freej because I don't see those in the OP's post. Or am I completely losing it?
Quote:
Originally Posted by knudfl
The executeable 'freej' will look for libs in
/usr/lib only, so it might be an idea to have
--prefix=/usr
|
Passing --prefix=/usr to the configure script sets the prefix that freej will be installed in, not the prefix for freej to look for libraries when it is linking.
|
|
|
|
12-05-2008, 03:46 PM
|
#5
|
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2012.8, Slack1337 DebSqueeze, +50+ other Linux OS, for test only.
Posts: 11,626
|
weibullguy : add.1 Yes, I have build freej on slack 12.1.
add.2 If freej is build for /usr/local/, default prefix,
it will refuse to see its own lib = 'libfreej.so.0'
So I just linked it to /usr/lib
....
|
|
|
|
12-06-2008, 06:36 AM
|
#6
|
|
ReliaFree Maintainer
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware, Cross Linux from Scratch, Gentoo
Posts: 2,663
Rep: 
|
Do you have /usr/local/lib in your /etc/ld.so.conf? If so, freej should find its own library once ldconfig is executed (usually executed by the install target, but not always). If not, add it and execute ldconfig, then freej should pick up its library in /usr/local. However, there's nothing wrong with putting it in /usr.
|
|
|
|
12-07-2008, 05:04 AM
|
#7
|
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2012.8, Slack1337 DebSqueeze, +50+ other Linux OS, for test only.
Posts: 11,626
|
Quote:
|
/usr/local/lib in your /etc/ld.so.conf?
|
No, sorry, weibullguy, that's not the issue,
have seen it a couple of times over the last
6 years, had one yesterday too, 'midori' on
Debian Lenny.
/usr/local/lib is in ld.so.conf on both OS.
....
Last edited by knudfl; 12-07-2008 at 10:36 AM.
|
|
|
|
12-07-2008, 04:52 PM
|
#8
|
|
Member
Registered: Apr 2007
Location: brazil
Distribution: Arch Linux
Posts: 70
Original Poster
Rep:
|
i did as knudfl recomended. but now i reached to this stage.
as far as i know img_convert is deprecated and now it uses swscale.
Code:
video_layer.o: In function `VideoLayer::feed()':
video_layer.cpp:(.text+0x9a9): undefined reference to `img_convert'
collect2: ld returned 1 exit status
make[3]: ** [freej] Erro 1
make[3]: Saindo do diretório `/home/livre/Desktop/AUR/freej/src/freej-0.10/src'
make[2]: ** [all-recursive] Erro 1
make[2]: Saindo do diretório `/home/livre/Desktop/AUR/freej/src/freej-0.10/src'
make[1]: ** [all-recursive] Erro 1
make[1]: Saindo do diretório `/home/livre/Desktop/AUR/freej/src/freej-0.10'
make: ** [all] Erro 2
==> ERRO: Compilação Falhou.
Abortando...
so, how do i go about it now???
thanks, cheers!!
|
|
|
|
12-07-2008, 06:49 PM
|
#9
|
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2012.8, Slack1337 DebSqueeze, +50+ other Linux OS, for test only.
Posts: 11,626
|
1) Did you do './autogen.sh' ??
2) Which gcc is used ? '4.3.x' ?
Can be found with 'gcc -v'
|
|
|
|
12-08-2008, 04:57 AM
|
#10
|
|
Member
Registered: Apr 2007
Location: brazil
Distribution: Arch Linux
Posts: 70
Original Poster
Rep:
|
yes i did use ./autogen and ./configure --prefix=/usr
gcc -v
Code:
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../configure --prefix=/usr --enable-shared --enable-languages=c,c++,fortran,objc,obj-c++,treelang --enable-threads=posix --mandir=/usr/share/man --infodir=/usr/share/info --enable-__cxa_atexit --disable-multilib --libdir=/usr/lib --libexecdir=/usr/lib --enable-clocale=gnu --disable-libstdcxx-pch --with-tune=generic
Thread model: posix
gcc version 4.3.2 (GCC)
|
|
|
|
12-08-2008, 12:45 PM
|
#11
|
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2012.8, Slack1337 DebSqueeze, +50+ other Linux OS, for test only.
Posts: 11,626
|
I'd guess, it's a gcc 4.3 problem, or more correct : the
freej code has not yet been fixed, to be used with 4.3.x
Suggest : Set up 'gcc-4.2.3' and 'g++-4.2.3' ,
then use something like
'CC=gcc-4.2.3 CXX=g++-4.2.3 ./configure --prefix=/usr'
to configure freej. (no problem having more than 1 compiler)
Replace with actual names, ( see 'ls /usr/bin | grep g++' ,
etc. ) to use the "new" compiler.
Don't know if it is necessary, but you can do likewise
with 'make' : 'CC=gcc-4.2.3 CXX=g++-4.2.3 make'
....
Last edited by knudfl; 12-08-2008 at 12:57 PM.
|
|
|
|
12-09-2008, 07:53 AM
|
#12
|
|
Member
Registered: Apr 2007
Location: brazil
Distribution: Arch Linux
Posts: 70
Original Poster
Rep:
|
Quote:
Originally Posted by knudfl
I'd guess, it's a gcc 4.3 problem, or more correct : the
freej code has not yet been fixed, to be used with 4.3.x
Suggest : Set up 'gcc-4.2.3' and 'g++-4.2.3' ,
then use something like
'CC=gcc-4.2.3 CXX=g++-4.2.3 ./configure --prefix=/usr'
to configure freej. (no problem having more than 1 compiler)
Replace with actual names, ( see 'ls /usr/bin | grep g++' ,
etc. ) to use the "new" compiler.
Don't know if it is necessary, but you can do likewise
with 'make' : 'CC=gcc-4.2.3 CXX=g++-4.2.3 make'
....
|
hmm seems to be a bit complicated for me.
but couldnt it be just a problem with ffmpeg's img_convert?
thanks for the help
|
|
|
|
12-10-2009, 11:18 AM
|
#13
|
|
Member
Registered: May 2005
Distribution: aptosid
Posts: 55
Rep:
|
Quote:
Originally Posted by osc~
i did as knudfl recomended. but now i reached to this stage.
as far as i know img_convert is deprecated and now it uses swscale.
Code:
video_layer.o: In function `VideoLayer::feed()':
video_layer.cpp:(.text+0x9a9): undefined reference to `img_convert'
collect2: ld returned 1 exit status
make[3]: ** [freej] Erro 1
make[3]: Saindo do diretório `/home/livre/Desktop/AUR/freej/src/freej-0.10/src'
make[2]: ** [all-recursive] Erro 1
make[2]: Saindo do diretório `/home/livre/Desktop/AUR/freej/src/freej-0.10/src'
make[1]: ** [all-recursive] Erro 1
make[1]: Saindo do diretório `/home/livre/Desktop/AUR/freej/src/freej-0.10'
make: ** [all] Erro 2
==> ERRO: Compilação Falhou.
Abortando...
so, how do i go about it now???
thanks, cheers!!
|
An undefined reference is a linker error. It can't find the library or object file which contains 'img_convert'
Check your library locations in your './configure'
Mike
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 01:28 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|