Thanks for your patience, Michael (and Ralph)!

Michael Riepe wrote:
> Hi!
> 
> David Coe wrote:
> 
>> I'd like though to establish whether #include_next works in your own 
>> build environment.
> 
> Well, if you refuse to believe me...
> 
> $ cd dvbcut
> $ echo '#include <stdlib.h>' | gcc -E -
> # 1 "<stdin>"
> # 1 "<built-in>"
> # 1 "<command line>"
> # 1 "<stdin>"
> # 1 "c:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stdlib.h"
> [...]
> 
> $ echo '#include <stdlib.h>' | gcc -E -I import -
> # 1 "<stdin>"
> # 1 "<built-in>"
> # 1 "<command line>"
> # 1 "<stdin>"
> # 1 "import/stdlib.h" 1
> 
> 
> # 1 "c:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stdlib.h"
> [...]
> 
> As you can see, gcc loads MinGW's <stdlib.h> (after import/stdlib.h if
> the import directory is prepended to the search path and #include_next
> is used - second case).

Other than calling the c: drive, these seem identical to those obtained 
here. Trying the #include_next directive then gives:

$ echo '#include_next <stdlib.h>' | gcc -E -I import -
# 1 "<stdin>"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "<stdin>"
# 1 "import/stdlib.h" 1

# 1 "g:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/stdlib.h"
[...]

which worryingly shows no change in calling order. I get identical 
ordering off gcc-4.4.0 both on MinGW and my Linux box.

>> If it does, I'll wrestle with my own MinGW/MSYS; if 
>> it doesn't, it might be better to regress to #include "/mingw/include/"
>> which does accomodate a standard MinGW on an arbitrary hard drive.

Anyway, using #include_next <stdlib.h> gives the following symptoms of a 
missing system header whereas #include "/mingw/include/stdlib.h" builds 
to completion.

g++ -O2 -Wall -g -I../ffmpeg/include/ffmpeg -I../import 
-I/usr/local/include -I.
  -DQT3_SUPPORT -DHAVE_LIB_MAD -DHAVE_LIB_A52 -DHAVE_LIB_AO 
-D__STDC_LIMIT_MACROS
  -D__STDC_CONSTANT_MACROS -I../../qt-3/include/Qt 
-I../../qt-3/include/QtCore -I
../../qt-3/include/QtGui -I../../qt-3/include/Qt3Support 
-I../../qt-3/include  -
c -o ../import/stdlib.o ../import/stdlib.cpp
../import/stdlib.cpp: In function `int vasprintf(char**, const char*, 
char*)':
../import/stdlib.cpp:4: error: `malloc' was not declared in this scope
../import/stdlib.cpp:4: warning: unused variable 'malloc'
make: *** [../import/stdlib.o] Error 1
make: Leaving directory `/usr/local/dvbcut/src'

> I suppose your MinGW installation is not as "standard" as you think.

Clearly this is true (as you guys' Windows build environments work), but 
what ails mine remains a mystery! It may be grasping at straws but I am 
building with a 32-bit toolchain on a 64-bit host. However, any other 
helpful hints greatfully received :-).

Again, many thanks.

-- 
David

------------------------------------------------------------------------------
_______________________________________________
DVBCUT-user mailing list
DVBCUT-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dvbcut-user

Reply via email to