I removed the superflouos typedef for BOOL. Now you should not
need to include windows.h anymore. I can't help you with your
> Hi Robert,
>
> --- On Tue, 6/24/08, robert <
[hidden email]> wrote:
>
>> > just wanted to note as a windows user,
>> > that for lame 3.98b8 to compile
>> > using msys/mingw
>> > i need the lamb8.diff patch attached.
>>
>> Why do you need to include windows.h ?
>
> well the original problem i had is described here:
>
>> compiling fails on 'make' :
>>
>> gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I. -I../libmp3lame -I..
>> -O3
>> -fomit-frame-pointer -ffast-math -maccumulate-outgoing-args -Wall
>> -pipe
>> -MT decode_i386.lo -MD -MP -MF .deps/decode_i386.Tpo -c decode_i386.c
>> -o decode_i386.o
>> mv -f .deps/decode_i386.Tpo .deps/decode_i386.Plo
>> /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I.
>> -I.. -I../include -I. -I../libmp3lame -I.. -O3
>> -fomit-frame-pointer
>> -ffast-math -maccumulate-outgoing-args -Wall -pipe -MT
>> interface.lo -MD -MP -MF .deps/interface.Tpo -c -o interface.lo
>> interface.c
>> gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I. -I../libmp3lame -I..
>> -O3
>> -fomit-frame-pointer -ffast-math -maccumulate-outgoing-args -Wall
>> -pipe
>> -MT interface.lo -MD -MP -MF .deps/interface.Tpo -c interface.c -o
>> interface.o
>> In file included from c:/mingw/include/windows.h:48,
>> from ../libmp3lame/machine.h:130,
>> from interface.c:15:
>> c:/mingw/include/windef.h:234: error: two or more data types in
>> declaration specifiers
>> make[2]: *** [interface.lo] Error 1
>> make[2]: Leaving directory `/c/test/lameb8/mpglib'
>> make[1]: *** [all-recursive] Error 1
>> make[1]: Leaving directory `/c/test/lameb8'
>> make: *** [all] Error 2
>>
>>
>> from windef.h:
>>
>> typedef unsigned long DWORD;
>> typedef int WINBOOL,*PWINBOOL,*LPWINBOOL;
>> /* FIXME: Is there a good solution to this? */
>> #ifndef XFree86Server
>> #ifndef __OBJC__
>> typedef WINBOOL BOOL; ******!!!! Line 234 ****
>> #else
>> #define BOOL WINBOOL
>> #endif
>> typedef unsigned char BYTE;
>> #endif /* ndef XFree86Server */
>> typedef BOOL *PBOOL,*LPBOOL;
>> typedef unsigned short WORD;
>> typedef float FLOAT;
>> typedef FLOAT *PFLOAT;
>> typedef BYTE *PBYTE,*LPBYTE;
>> typedef int *PINT,*LPINT;
>> typedef WORD *PWORD,*LPWORD;
>> typedef long *LPLONG;
>> typedef DWORD *PDWORD,*LPDWORD;
>> typedef CONST void *PCVOID,*LPCVOID;
>> typedef int INT;
>> typedef unsigned int UINT,*PUINT,*LPUINT;
>>
>> #include <winnt.h>
>>
>> typedef UINT_PTR WPARAM;
>> typedef LONG_PTR LPARAM;
>> typedef LONG_PTR LRESULT;
>> #ifndef _HRESULT_DEFINED
>> typedef LONG HRESULT;
>> #define _HRESULT_DEFINED
>> #endif
>> #ifndef XFree86Server
>> typedef WORD ATOM;
>> #endif /* XFree86Server */
>
> and i got a hint on the mingw-users list from John TDM:
>
> "Simple -- find out where a header included before <windows.h> #defines
> or typedefs BOOL, and fix it. (Recommended fix: surround it with #ifndef
> _WINDEF_H/#endif and be sure to include <windows.h> before it.)"
>
> and i came up with the patch.
> which works,
> and makes me happy, cause i don't understand code at all.
>
>> > and for --enable-nasm to work,
>> > the patch: lame_3.98_non_pic_objects.diff
>> > is required.
>>
>> Does this change make sense? It looks like you want the
>> "pic_objects" to be the same as
>> "non_pic_objects" ???
>
> yes.
> in the sense that it worked.
>
> looking closer, i see that it's actually a combination of
> ./configure --enable-nasm --disable-shared
>
> then make fails like so:
>
> test -d .libs || mkdir .libs
> echo '# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365
> 2005/12/18 22:
> 14:06)' >fftsse.lo
> echo "pic_object='.libs/fftsse.o'" >>fftsse.lo
> echo "non_pic_object='fftsse.o'" >>fftsse.lo
> /mingw/bin/nasm -f win32 -DWIN32 -i ../../libmp3lame/i386/ fftsse.nas -o
> .libs/f
> ftsse.o -l fftsse.lo.lst
> fftsse.nas:413: warning: label alone on a line without a colon might be
> in error
>
> /bin/sh ../../libtool --mode=link gcc -O3 -fomit-frame-pointer
> -ffast-math -mac
> cumulate-outgoing-args -Wall -pipe -o liblameasmroutines.la
> choose_table.lo
> cpu_feat.lo fft3dn.lo fftsse.lo
> ar cru .libs/liblameasmroutines.a choose_table.o cpu_feat.o fft3dn.o
> fftsse.o
> c:\min\bin\ar.exe: choose_table.o: No such file or directory
> make[3]: *** [liblameasmroutines.la] Error 1
> make[3]: Leaving directory `/c/test/lame/libmp3lame/i386'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/c/test/lame/libmp3lame'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/c/test/lame'
> make: *** [all] Error 2
>
> so in essence,
> an easier fix, is just to build the shared libs,
> and del them if not needed.
> but still. in the above scenario,
> path pointers are incorrect.
>
>
> ty
> tripp