Menu

#494 Compilation errors in Windows 7 with msys2-x86_64

Compatibility
pending
None
5
2021-03-10
2018-10-09
nick18
No

Hello,

I succesfully compiled lame.exe v3.100 64bit on my WIN7 SP1 pro 64bit platform. Full options, with <#define ALLOWINTERNALOPTIONS 1> put in the right place. I used the toolchain msys2-x86_64-20180531 updated with PACMAN and I encountered 2 errors I fixed later. With the standard mingw-w64 I failed to compile because the lack of many dependencies needed.
First error I found/fixed is in lametime.c*
*
lametime.c: In function ‘lame_set_stream_binary_mode’:
lametime.c:139:25: error: ‘_O_BINARY’ undeclared (first use in this function); did you mean ‘O_BINARY’?
setmode(fileno(fp), _O_BINARY);
*
The fix:
In frontend/lametime.c I commented the next 2 lines after line 137:

/*
*#elif defined CYGWIN*
setmode(fileno(fp), _O_BINARY);
*/

The second error I found/fixed is in include/libmp3lame.sym
I had to delete the <lame_init_old> line to succesfully compile.
========================
The compiled lame.exe 3.100.64bit works perfect.</lame_init_old>

Is it really necessary the line: "lame_init_old" in libmp3lame.sym?

Can be updated lametime.c to compile with no errors the lame source with mingw-w64 or msys2-x86_64 on Windows?

Thank You

2 Attachments

Discussion

  • nick18

    nick18 - 2018-10-09

    Here is the full compilation with MSYS2-x86_64 on Windows.

     
  • Alexander Leidinger

    • status: open --> pending
    • assigned_to: Alexander Leidinger
     
  • Alexander Leidinger

    3.101 should fix this (cygwin documents O_BINARY instead of _O_BINARY).

     

Log in to post a comment.

MongoDB Logo MongoDB