[Matroska-devel] Compiling libebml with MinGW+MSYS

szt0922 at gmail.com szt0922 at gmail.com
Tue Jan 18 22:50:18 CET 2011


Hello all,

I'd like to use libebml for a project I'm working on (so it's not really
related to Matroska, but since it's a part of Matroska, I think somebody can
help me here). I'm using the latest MinGW with MSYS under Windows 7. I've
modified the original makefile in libebml\make\mingw32, but all I did is to
change the lib and include dirs from:

LIBS =  -L"D:/DEV-CPP/lib"
INCS =  -I"D:/DEV-CPP/include"  -I"D:/DEV-CPP/include/c++"
-I"D:/DEV-CPP/include"  -I"D:/Dev-Cpp/include/c++/mingw32"

to

LIBS =  -L"D:/DEV-CPP/lib"
INCS =  -I"D:/DEV-CPP/include"  -I"D:/DEV-CPP/include/c++"
-I"D:/DEV-CPP/include"  -I"D:/Dev-Cpp/include/c++/mingw32".

Then, I gave it a try, and failed:

$ make -f makefile.mak
g++.exe -c ../../src/EbmlBinary.cpp -o ../../src/EbmlBinary.o
-I"C:/MinGW/includ
e" -I"C:/dev/libebml"
In file included from
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/include/c++/bits/stl
_algo.h:61:0,
                 from
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/include/c++/algorith
m:63,
                 from C:/dev/libebml/ebml/EbmlEndian.h:43,
                 from C:/dev/libebml/ebml/EbmlTypes.h:138,
                 from C:/dev/libebml/ebml/EbmlBinary.h:45,
                 from ../../src/EbmlBinary.cpp:42:
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/include/c++/bits/algorithmfwd.h:358:41:
er
ror: macro "min" passed 3 arguments, but takes just 2
In file included from C:/dev/libebml/ebml/EbmlTypes.h:43:0,
                 from C:/dev/libebml/ebml/EbmlBinary.h:45,
                 from ../../src/EbmlBinary.cpp:42:
C:/dev/libebml/ebml/c/libebml_t.h:111:13: error: 'u_int64_t' does not name a
typ
e
C:/dev/libebml/ebml/c/libebml_t.h:112:13: error: 'u_int32_t' does not name a
typ
e
C:/dev/libebml/ebml/c/libebml_t.h:113:13: error: 'u_int16_t' does not name a
typ
e
C:/dev/libebml/ebml/c/libebml_t.h:114:13: error: 'u_int8_t' does not name a
type

C:/dev/libebml/ebml/c/libebml_t.h:118:9: error: 'uint8' does not name a type
In file included from C:/dev/libebml/ebml/EbmlBinary.h:45:0,
                 from ../../src/EbmlBinary.cpp:42:
C:/dev/libebml/ebml/EbmlTypes.h:48:9: error: 'uint32' does not name a type
C:/dev/libebml/ebml/EbmlTypes.h:49:9: error: 'uint8' does not name a type
C:/dev/libebml/ebml/EbmlTypes.h:65:9: error: 'uint32' does not name a type
In file included from
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/include/c++/bits/stl
_algo.h:61:0,
                 from
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/include/c++/algorith
m:63,
                 from C:/dev/libebml/ebml/EbmlEndian.h:43,
                 from C:/dev/libebml/ebml/EbmlTypes.h:138,
                 from C:/dev/libebml/ebml/EbmlBinary.h:45,
                 from ../../src/EbmlBinary.cpp:42:
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/include/c++/bits/algorithmfwd.h:354:5:
err
or: expected unqualified-id before 'const'
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/include/c++/bits/algorithmfwd.h:354:5:
err
or: expected ')' before 'const'
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/include/c++/bits/algorithmfwd.h:354:5:
err
or: expected ')' before 'const'
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/include/c++/bits/algorithmfwd.h:354:5:
err
or: expected initializer before 'const'
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/include/c++/bits/algorithmfwd.h:358:5:
err
or: template declaration of 'const _Tp& std::min'
In file included from
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/include/c++/algorith
m:63:0,
                 from C:/dev/libebml/ebml/EbmlEndian.h:43,
                 from C:/dev/libebml/ebml/EbmlTypes.h:138,
                 from C:/dev/libebml/ebml/EbmlBinary.h:45,
                 from ../../src/EbmlBinary.cpp:42:
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/include/c++/bits/stl_algo.h: In
function '
void std::__merge_sort_loop(_RandomAccessIterator1, _RandomAccessIterator1,
_Ran
domAccessIterator2, _Distance)':
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/include/c++/bits/stl_algo.h:3172:26:
error
: expected unqualified-id before '(' token
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/include/c++/bits/stl_algo.h: In
function '
void std::__merge_sort_loop(_RandomAccessIterator1, _RandomAccessIterator1,
_Ran
domAccessIterator2, _Distance, _Compare)':
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/include/c++/bits/stl_algo.h:3202:26:
error
: expected unqualified-id before '(' token
In file included from C:/dev/libebml/ebml/EbmlTypes.h:138:0,
                 from C:/dev/libebml/ebml/EbmlBinary.h:45,
                 from ../../src/EbmlBinary.cpp:42:
C:/dev/libebml/ebml/EbmlEndian.h: At global scope:
C:/dev/libebml/ebml/EbmlEndian.h:70:29: error: 'binary' does not name a type
C:/dev/libebml/ebml/EbmlEndian.h:70:37: error: ISO C++ forbids declaration
of 'e
ndian_buffer' with no type
C:/dev/libebml/ebml/EbmlEndian.h:77:19: error: 'binary' has not been
declared
C:/dev/libebml/ebml/EbmlEndian.h:86:31: error: 'binary' does not name a type
C:/dev/libebml/ebml/EbmlEndian.h:86:39: error: ISO C++ forbids declaration
of 'b
uffer' with no type
C:/dev/libebml/ebml/EbmlEndian.h: In member function 'void
libebml::Endian<TYPE,
 ENDIAN>::process_endian()':
C:/dev/libebml/ebml/EbmlEndian.h:100:33: error: expected type-specifier
before '
uint8'
C:/dev/libebml/ebml/EbmlEndian.h:100:33: error: expected '>' before 'uint8'
C:/dev/libebml/ebml/EbmlEndian.h:100:33: error: expected '(' before 'uint8'
C:/dev/libebml/ebml/EbmlEndian.h:100:33: error: 'uint8' was not declared in
this
 scope
C:/dev/libebml/ebml/EbmlEndian.h:100:39: error: expected primary-expression
befo
re '>' token
C:/dev/libebml/ebml/EbmlEndian.h:100:73: error: expected type-specifier
before '
uint8'
C:/dev/libebml/ebml/EbmlEndian.h:100:73: error: expected '>' before 'uint8'
C:/dev/libebml/ebml/EbmlEndian.h:100:73: error: expected '(' before 'uint8'
C:/dev/libebml/ebml/EbmlEndian.h:100:79: error: expected primary-expression
befo
re '>' token
C:/dev/libebml/ebml/EbmlEndian.h:100:98: error: expected ')' before ';'
token
C:/dev/libebml/ebml/EbmlEndian.h: In member function 'void
libebml::Endian<TYPE,
 ENDIAN>::process_platform()':
C:/dev/libebml/ebml/EbmlEndian.h:112:33: error: expected type-specifier
before '
uint8'
C:/dev/libebml/ebml/EbmlEndian.h:112:33: error: expected '>' before 'uint8'
C:/dev/libebml/ebml/EbmlEndian.h:112:33: error: expected '(' before 'uint8'
C:/dev/libebml/ebml/EbmlEndian.h:112:33: error: 'uint8' was not declared in
this
 scope
C:/dev/libebml/ebml/EbmlEndian.h:112:39: error: expected primary-expression
befo
re '>' token
C:/dev/libebml/ebml/EbmlEndian.h:112:75: error: expected type-specifier
before '
uint8'
C:/dev/libebml/ebml/EbmlEndian.h:112:75: error: expected '>' before 'uint8'
C:/dev/libebml/ebml/EbmlEndian.h:112:75: error: expected '(' before 'uint8'
C:/dev/libebml/ebml/EbmlEndian.h:112:81: error: expected primary-expression
befo
re '>' token
C:/dev/libebml/ebml/EbmlEndian.h:112:102: error: expected ')' before ';'
token
In file included from C:/dev/libebml/ebml/EbmlBinary.h:45:0,
                 from ../../src/EbmlBinary.cpp:42:
C:/dev/libebml/ebml/EbmlTypes.h: At global scope:
C:/dev/libebml/ebml/EbmlTypes.h:142:9: error: 'binary' does not name a type
C:/dev/libebml/ebml/EbmlTypes.h:147:16: error: 'uint16' was not declared in
this
 scope
C:/dev/libebml/ebml/EbmlTypes.h:147:36: error: template argument 1 is
invalid
C:/dev/libebml/ebml/EbmlTypes.h:147:48: error: invalid type in declaration
befor
e ';' token
C:/dev/libebml/ebml/EbmlTypes.h:148:16: error: 'uint32' was not declared in
this
 scope
C:/dev/libebml/ebml/EbmlTypes.h:148:36: error: template argument 1 is
invalid
C:/dev/libebml/ebml/EbmlTypes.h:148:48: error: invalid type in declaration
befor
e ';' token
C:/dev/libebml/ebml/EbmlTypes.h:149:16: error: 'uint64' was not declared in
this
 scope
C:/dev/libebml/ebml/EbmlTypes.h:149:36: error: template argument 1 is
invalid
C:/dev/libebml/ebml/EbmlTypes.h:149:48: error: invalid type in declaration
befor
e ';' token
C:/dev/libebml/ebml/EbmlTypes.h:153:16: error: 'uint16' was not declared in
this
 scope
C:/dev/libebml/ebml/EbmlTypes.h:153:33: error: template argument 1 is
invalid
C:/dev/libebml/ebml/EbmlTypes.h:153:48: error: invalid type in declaration
befor
e ';' token
C:/dev/libebml/ebml/EbmlTypes.h:154:16: error: 'uint32' was not declared in
this
 scope
C:/dev/libebml/ebml/EbmlTypes.h:154:33: error: template argument 1 is
invalid
C:/dev/libebml/ebml/EbmlTypes.h:154:48: error: invalid type in declaration
befor
e ';' token
C:/dev/libebml/ebml/EbmlTypes.h:155:16: error: 'uint64' was not declared in
this
 scope
C:/dev/libebml/ebml/EbmlTypes.h:155:33: error: template argument 1 is
invalid
C:/dev/libebml/ebml/EbmlTypes.h:155:48: error: invalid type in declaration
befor
e ';' token
C:/dev/libebml/ebml/EbmlTypes.h:156:16: error: 'uint32' was not declared in
this
 scope
C:/dev/libebml/ebml/EbmlTypes.h:156:33: error: template argument 1 is
invalid
C:/dev/libebml/ebml/EbmlTypes.h:156:46: error: invalid type in declaration
befor
e ';' token
C:/dev/libebml/ebml/EbmlTypes.h:157:16: error: 'bits80' was not declared in
this
 scope
C:/dev/libebml/ebml/EbmlTypes.h:157:33: error: template argument 1 is
invalid
C:/dev/libebml/ebml/EbmlTypes.h:157:48: error: invalid type in declaration
befor
e ';' token
In file included from C:/dev/libebml/ebml/EbmlElement.h:43:0,
                 from C:/dev/libebml/ebml/EbmlBinary.h:46,
                 from ../../src/EbmlBinary.cpp:42:
C:/dev/libebml/ebml/EbmlId.h:51:3: error: 'uint32' does not name a type
C:/dev/libebml/ebml/EbmlId.h:54:16: error: 'binary' does not name a type
C:/dev/libebml/ebml/EbmlId.h:54:31: error: ISO C++ forbids declaration of
'aValu
e' with no type
C:/dev/libebml/ebml/EbmlId.h:65:16: error: 'uint32' does not name a type
C:/dev/libebml/ebml/EbmlId.h:65:23: error: ISO C++ forbids declaration of
'aValu
e' with no type
C:/dev/libebml/ebml/EbmlId.h:73:20: error: 'binary' has not been declared
C:/dev/libebml/ebml/EbmlId.h: In constructor 'libebml::EbmlId::EbmlId(const
int*
, unsigned int)':
C:/dev/libebml/ebml/EbmlId.h:57:4: error: 'Value' was not declared in this
scope

C:/dev/libebml/ebml/EbmlId.h: In constructor 'libebml::EbmlId::EbmlId(int,
unsig
ned int)':
C:/dev/libebml/ebml/EbmlId.h:66:5: error: class 'libebml::EbmlId' does not
have
any field named 'Value'
C:/dev/libebml/ebml/EbmlId.h: In member function 'bool
libebml::EbmlId::operator
==(const libebml::EbmlId&) const':
C:/dev/libebml/ebml/EbmlId.h:70:49: error: 'const class libebml::EbmlId' has
no
member named 'Value'
C:/dev/libebml/ebml/EbmlId.h:70:58: error: 'Value' was not declared in this
scop
e
C:/dev/libebml/ebml/EbmlId.h: In member function 'void
libebml::EbmlId::Fill(int
*) const':
C:/dev/libebml/ebml/EbmlId.h:76:18: error: 'Value' was not declared in this
scop
e
In file included from C:/dev/libebml/ebml/EbmlElement.h:44:0,
                 from C:/dev/libebml/ebml/EbmlBinary.h:46,
                 from ../../src/EbmlBinary.cpp:42:
C:/dev/libebml/ebml/IOCallback.h: At global scope:
C:/dev/libebml/ebml/IOCallback.h:64:10: error: 'uint32' does not name a type
C:/dev/libebml/ebml/IOCallback.h:79:10: error: 'uint64' does not name a type
In file included from C:/dev/libebml/ebml/EbmlBinary.h:46:0,
                 from ../../src/EbmlBinary.cpp:42:
C:/dev/libebml/ebml/EbmlElement.h:122:21: error: 'uint64' does not name a
type
C:/dev/libebml/ebml/EbmlElement.h:122:28: error: ISO C++ forbids declaration
of
'aDefaultSize' with no type
C:/dev/libebml/ebml/EbmlElement.h:129:120: error: 'uint64' has not been
declared

C:/dev/libebml/ebml/EbmlElement.h:130:100: error: 'uint64' does not name a
type
C:/dev/libebml/ebml/EbmlElement.h:130:107: error: ISO C++ forbids
declaration of
 'MaxDataSize' with no type
C:/dev/libebml/ebml/EbmlElement.h:135:57: error: 'uint64' does not name a
type
C:/dev/libebml/ebml/EbmlElement.h:135:64: error: ISO C++ forbids declaration
of
'MaxDataSize' with no type
C:/dev/libebml/ebml/EbmlElement.h:146:3: error: 'uint64' does not name a
type
C:/dev/libebml/ebml/EbmlElement.h:148:3: error: 'uint64' does not name a
type
C:/dev/libebml/ebml/EbmlElement.h:150:3: error: 'uint32' does not name a
type
C:/dev/libebml/ebml/EbmlElement.h:152:11: error: 'uint64' does not name a
type
C:/dev/libebml/ebml/EbmlElement.h:153:11: error: 'uint64' does not name a
type
C:/dev/libebml/ebml/EbmlElement.h:155:11: error: 'uint64' does not name a
type
C:/dev/libebml/ebml/EbmlElement.h:175:3: error: 'uint8' does not name a type
C:/dev/libebml/ebml/EbmlElement.h:181:18: error: 'uint64' has not been
declared
C:/dev/libebml/ebml/EbmlElement.h:183:3: error: 'uint32' does not name a
type
C:/dev/libebml/ebml/EbmlElement.h:188:3: error: 'uint32' does not name a
type
C:/dev/libebml/ebml/EbmlElement.h:197:37: error: 'uint64' does not name a
type
C:/dev/libebml/ebml/EbmlElement.h:197:44: error: ISO C++ forbids declaration
of
'aDefaultSize' with no type
C:/dev/libebml/ebml/EbmlElement.h:202:3: error: 'uint64' does not name a
type
C:/dev/libebml/ebml/EbmlElement.h:203:3: error: 'uint64' does not name a
type
C:/dev/libebml/ebml/EbmlElement.h:207:3: error: 'uint64' does not name a
type
C:/dev/libebml/ebml/EbmlElement.h:208:3: error: 'uint64' does not name a
type
C:/dev/libebml/ebml/EbmlElement.h:219:3: error: 'uint32' does not name a
type
C:/dev/libebml/ebml/EbmlElement.h:220:3: error: 'uint32' does not name a
type
C:/dev/libebml/ebml/EbmlElement.h:225:11: error: 'uint32' does not name a
type
C:/dev/libebml/ebml/EbmlElement.h: In member function 'virtual void
libebml::Ebm
lElement::SetDefaultSize(int)':
C:/dev/libebml/ebml/EbmlElement.h:197:59: error: 'DefaultSize' was not
declared
in this scope
In file included from ../../src/EbmlBinary.cpp:42:0:
C:/dev/libebml/ebml/EbmlBinary.h: At global scope:
C:/dev/libebml/ebml/EbmlBinary.h:62:3: error: 'uint32' does not name a type
C:/dev/libebml/ebml/EbmlBinary.h:63:3: error: 'uint64' does not name a type
C:/dev/libebml/ebml/EbmlBinary.h:64:3: error: 'uint64' does not name a type
C:/dev/libebml/ebml/EbmlBinary.h:66:24: error: 'binary' does not name a type
C:/dev/libebml/ebml/EbmlBinary.h:66:32: error: ISO C++ forbids declaration
of 'B
uffer' with no type
C:/dev/libebml/ebml/EbmlBinary.h:66:46: error: 'uint32' does not name a type
C:/dev/libebml/ebml/EbmlBinary.h:66:53: error: ISO C++ forbids declaration
of 'B
ufferSize' with no type
C:/dev/libebml/ebml/EbmlBinary.h:72:3: error: 'binary' does not name a type
C:/dev/libebml/ebml/EbmlBinary.h:74:25: error: 'binary' does not name a type
C:/dev/libebml/ebml/EbmlBinary.h:74:33: error: ISO C++ forbids declaration
of 'B
uffer' with no type
C:/dev/libebml/ebml/EbmlBinary.h:74:47: error: 'uint32' does not name a type
C:/dev/libebml/ebml/EbmlBinary.h:74:54: error: ISO C++ forbids declaration
of 'B
ufferSize' with no type
C:/dev/libebml/ebml/EbmlBinary.h:83:3: error: 'uint64' does not name a type
C:/dev/libebml/ebml/EbmlBinary.h:84:18: error: ISO C++ forbids declaration
of 't
ype name' with no type
C:/dev/libebml/ebml/EbmlBinary.h:84:3: error: 'operator const int' does not
name
 a type
C:/dev/libebml/ebml/EbmlBinary.h:91:3: error: 'binary' does not name a type
C:/dev/libebml/ebml/EbmlBinary.h: In member function 'void
libebml::EbmlBinary::
SetBuffer(const int*, int)':
C:/dev/libebml/ebml/EbmlBinary.h:67:4: error: 'Data' was not declared in
this sc
ope
C:/dev/libebml/ebml/EbmlBinary.h:67:12: error: 'binary' was not declared in
this
 scope
C:/dev/libebml/ebml/EbmlBinary.h:67:20: error: expected primary-expression
befor
e ')' token
C:/dev/libebml/ebml/EbmlBinary.h:67:22: error: expected ';' before 'Buffer'
C:/dev/libebml/ebml/EbmlBinary.h:68:4: error: 'Size' was not declared in
this sc
ope
C:/dev/libebml/ebml/EbmlBinary.h: In member function 'void
libebml::EbmlBinary::
CopyBuffer(const int*, int)':
C:/dev/libebml/ebml/EbmlBinary.h:75:8: error: 'Data' was not declared in
this sc
ope
C:/dev/libebml/ebml/EbmlBinary.h:76:12: error: type '<type error>' argument
give
n to 'delete', expected pointer
C:/dev/libebml/ebml/EbmlBinary.h:77:4: error: 'Data' was not declared in
this sc
ope
C:/dev/libebml/ebml/EbmlBinary.h:77:15: error: expected type-specifier
before 'b
inary'
C:/dev/libebml/ebml/EbmlBinary.h:77:15: error: expected ';' before 'binary'
C:/dev/libebml/ebml/EbmlBinary.h:78:35: error: 'memcpy' was not declared in
this
 scope
C:/dev/libebml/ebml/EbmlBinary.h:79:4: error: 'Size' was not declared in
this sc
ope
../../src/EbmlBinary.cpp: In constructor
'libebml::EbmlBinary::EbmlBinary()':
../../src/EbmlBinary.cpp:47:26: error: class 'libebml::EbmlBinary' does not
have
 any field named 'Data'
../../src/EbmlBinary.cpp: In constructor
'libebml::EbmlBinary::EbmlBinary(const
libebml::EbmlElement&)':
../../src/EbmlBinary.cpp:54:19: error: class 'libebml::EbmlBinary' does not
have
 any field named 'Data'
../../src/EbmlBinary.cpp: In destructor 'virtual
libebml::EbmlBinary::~EbmlBinar
y()':
../../src/EbmlBinary.cpp:60:5: error: 'Data' was not declared in this scope
../../src/EbmlBinary.cpp:61:12: error: type '<type error>' argument given to
'de
lete', expected pointer
../../src/EbmlBinary.cpp: At global scope:
../../src/EbmlBinary.cpp:64:1: error: 'uint32' does not name a type
../../src/EbmlBinary.cpp:74:1: error: 'uint64' does not name a type
../../src/EbmlBinary.cpp:79:1: error: 'uint64' does not name a type
make: *** [../../src/EbmlBinary.o] Error 1

The sollution for this may be simple, but I can't seem to figure out. Maybe
the problem is that I'm using the latest development version of MinGW?

Thanks in advance.

Best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.matroska.org/pipermail/matroska-devel/attachments/20110119/2054a916/attachment.html>


More information about the Matroska-devel mailing list