Re: lame3995o
Reply #44 – 2017-06-02 15:49:15
Hi, halb27 a) Yes, it is. Compilation fails because of use windows related header files make[2]: Entering directory `/tmp/lame/lame-3.99.5o/frontend' gcc -DHAVE_CONFIG_H -I. -I.. -I../libmp3lame -I../include -I.. -O3 -fomit-frame-pointer -ffast-math -maccumulate-outgoing-args -Wall -pipe -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c main.c:77:18: warning: extra tokens at end of #include directive [enabled by default] #include "main.h"z ^ main.c:78:21: fatal error: process.h: No such file or directory #include "process.h" ^ compilation terminated. When I add if condition:#if defined(_WIN32) #include "process.h" #include "windows.h" #include <ShellAPI.h> #endif compilation fails with error:Making all in frontend make[2]: Entering directory `/tmp/lame/lame-3.99.5o/frontend' gcc -DHAVE_CONFIG_H -I. -I.. -I../libmp3lame -I../include -I.. -O3 -fomit-frame-pointer -ffast-math -maccumulate-outgoing-args -Wall -pipe -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c gcc -DHAVE_CONFIG_H -I. -I.. -I../libmp3lame -I../include -I.. -O3 -fomit-frame-pointer -ffast-math -maccumulate-outgoing-args -Wall -pipe -MT timestatus.o -MD -MP -MF .deps/timestatus.Tpo -c -o timestatus.o timestatus.c main.c: In function 'c_main': main.c:461:2: error: unknown type name 'DWORD' DWORD fileAtt; ^ main.c:506:5: warning: implicit declaration of function 'utf8ToUnicode' [-Wimplicit-function-declaration] wMp3packerPath = utf8ToUnicode(mp3packerPath); ^ main.c:506:20: warning: assignment makes pointer from integer without a cast [enabled by default] wMp3packerPath = utf8ToUnicode(mp3packerPath); ^ main.c:508:3: warning: implicit declaration of function 'GetFileAttributesW' [-Wimplicit-function-declaration] fileAtt = GetFileAttributesW(wMp3packerPath); ^ main.c:511:3: warning: implicit declaration of function 'GetFileAttributesA' [-Wimplicit-function-declaration] fileAtt = GetFileAttributesA(mp3packerPath); ^ main.c:513:17: error: 'INVALID_FILE_ATTRIBUTES' undeclared (first use in this function) if (fileAtt == INVALID_FILE_ATTRIBUTES) { /* if mp3packer.exe not in Lame folder */ ^ main.c:513:17: note: each undeclared identifier is reported only once for each function it appears in main.c:520:14: warning: assignment makes pointer from integer without a cast [enabled by default] wCmdline = utf8ToUnicode(cmdline); ^ main.c:522:3: warning: implicit declaration of function 'ShellExecuteW' [-Wimplicit-function-declaration] ShellExecuteW(NULL, NULL, wMp3packerPath, wCmdline, NULL, 0); ^ main.c:525:3: warning: implicit declaration of function 'ShellExecuteA' [-Wimplicit-function-declaration] ShellExecuteA(NULL, NULL, mp3packerPath, cmdline, NULL, 0); ^ main.c:540:15: warning: assignment makes pointer from integer without a cast [enabled by default] wFileName = utf8ToUnicode(filename); ^ main.c:541:16: warning: assignment makes pointer from integer without a cast [enabled by default] wFileName2 = utf8ToUnicode(filename2); ^ main.c:543:3: warning: implicit declaration of function '_sleep' [-Wimplicit-function-declaration] _sleep(100); ^ main.c:545:4: warning: implicit declaration of function 'MoveFileW' [-Wimplicit-function-declaration] r = MoveFileW( (LPCWSTR) wFileName2, (LPCWSTR) wFileName); ^ main.c:545:20: error: 'LPCWSTR' undeclared (first use in this function) r = MoveFileW( (LPCWSTR) wFileName2, (LPCWSTR) wFileName); ^ main.c:545:29: error: expected ')' before 'wFileName2' r = MoveFileW( (LPCWSTR) wFileName2, (LPCWSTR) wFileName); ^ main.c:548:4: warning: implicit declaration of function 'MoveFileA' [-Wimplicit-function-declaration] r = MoveFileA( (LPCSTR) wFileName2, (LPCSTR) wFileName); ^ main.c:548:20: error: 'LPCSTR' undeclared (first use in this function) r = MoveFileA( (LPCSTR) wFileName2, (LPCSTR) wFileName); ^ main.c:548:28: error: expected ')' before 'wFileName2' r = MoveFileA( (LPCSTR) wFileName2, (LPCSTR) wFileName); ^ make[2]: *** [main.o] Error 1 make[2]: *** Waiting for unfinished jobs.... mv -f .deps/timestatus.Tpo .deps/timestatus.Po make[2]: Leaving directory `/tmp/lame/lame-3.99.5o/frontend' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/tmp/lame/lame-3.99.5o' make: *** [all] Error 2 b) Yes, in this case compilation finishes well and resulting lame binary works. I would like to know is there a difference if use this binary (18 modified files only)?