gavinljj / mp4v2

Automatically exported from code.google.com/p/mp4v2
Other
0 stars 0 forks source link

Won't compile with clang/llvm #80

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.  Get the source tree for r438
2.  Configure to use clang/llvm
3.  Make

What is the expected output? What do you see instead?

The library should compile, but this error is generated:

<pre>
src/bmff/typebmff.cpp:38:49: error: definition or redeclaration of 'data' not 
in a namespace enclosing
      'Enum<mp4v2::impl::bmff::LanguageCode, 0>'
const EnumLanguageCode::Entry EnumLanguageCode::data[] = {
                              ~~~~~~~~~~~~~~~~~~^
</pre>

Original issue reported on code.google.com by m...@sbooth.org on 26 Jan 2011 at 6:28

GoogleCodeExporter commented 9 years ago
I forgot to mention that I am running Mac OS X 10.6.6, with the clang/llvm 2.8 
precompiled binaries downloaded from llvm.org. I configured using 

CC=~/Development/clang+llvm-2.8-x86_64-apple-darwin10/bin/clang 
CXX=~/Development/clang+llvm-2.8-x86_64-apple-darwin10/bin/clang++ ./configure

Original comment by m...@sbooth.org on 26 Jan 2011 at 6:38

GoogleCodeExporter commented 9 years ago
It's possible gcc let me get away with something long ago. Here's a patch that 
compiles on OSX 10.6.6 with gcc 4.2, 4.3, 4.4, 4.5, 4.6 and clang version 2.9 
(trunk 124287).

NOTE: Someone's going to have to test this patch on MSVC. I suspect it will 
need full qualification for both type and identifier. If the patch works as-is, 
then all the entries can remove 'mp4v2::impl::' prefix.

Original comment by Kona8l...@gmail.com on 26 Jan 2011 at 2:00

Attachments:

GoogleCodeExporter commented 9 years ago
I can test on MSVC (2008, at least).

Original comment by kid...@gmail.com on 27 Jan 2011 at 3:20

GoogleCodeExporter commented 9 years ago
Tested on VS2008; works fine.  Resolving issue--OP, please let me know if you 
can get stuff working with r442.  If not, we'll dig deeper.  Thanks.

Original comment by kid...@gmail.com on 29 Jan 2011 at 2:36

GoogleCodeExporter commented 9 years ago
I just updated to r443 and was able to compile successfully.  Thanks!

Original comment by m...@sbooth.org on 29 Jan 2011 at 5:31