‘AVERROR_NOENT’ was not declared in this scope

Trying to build your own version of Vega Strike and having problems? Unix users, paste your config.log here (stderr output alone is not helpful).
Post Reply
DBautell
Star Pilot
Star Pilot
Posts: 5
Joined: Thu Apr 10, 2008 4:14 am
Contact:

‘AVERROR_NOENT’ was not declared in this scope

Post by DBautell »

Ok, first, you must forgive my cluelessness. I haven't touched c++ or anything more than light HTML and bash scripting in 10+ years, and I didn't know what I was doing then, either.

I couldn't figure whether this should be a bug report or what, so I ent up here. This might, maybe, possibly (Remember, I'm clueless), be related to ffmpeg not getting a clean build
I compiled the other day with no trouble.
I added some ffmpeg-dev whatnot to my machine, updated the SVN today, and tried to compile again [make all] with this result;
src/gfx/vid_file.cpp: In function ‘int _url_open(URLContext*, const char*, int)’:
src/gfx/vid_file.cpp:48: error: ‘AVERROR_NOENT’ was not declared in this scope
src/gfx/vid_file.cpp:55: error: ‘AVERROR_NOENT’ was not declared in this scope
make[1]: *** [src/gfx/vid_file.o] Error 1
make[1]: Leaving directory `/mnt/RAID/share/vegastrike/vegastrike'
make: *** [all] Error 2
The top Google(TM) results for

Code: Select all

AVERROR_NOENT
tell me that it should be

Code: Select all

AVERROR(ENOENT)
. I made this change and the compile finished.
Have not run it yet, and otherwise have no pertinent knowledge.

amd64, ubuntu 64 v7.10, multilib
2.6.22-14-generic
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

It looks like these are equivalent, and I think AVERROR(ENOENT) is more compatible.

I suppose I should have added an ifndef AVERROR_NOENT, but I'll wait and see if this causes any other complaints.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Post by klauss »

Ya, some versions of ffmpeg undefine the AVERROR macro, and thus AVERROR(ENOENT) doesn't work. Some do. It's weird.

Perhaps configure should check for a specific version.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

I was thinking of more simply doing a
#ifndef AVERROR_NOENT
#define AVAERROR_NOENT AVERROR(ENOENT)
#endif

I'll change that tonight when I'm by my desktop machine.
Post Reply