The use of c++0x should be limited to the small AtomicPointer class in port_posix.h. The class uses <cstdatomic> for its implementation. If you can provide a different implementation of "acquire store" and "release load" for your architecture, you should be all set without the need for c++0x.
I suspect that you may find suitable code in the chromium source code. See leveldb's port_chromium.h.
I suspect you need a newer version of gcc/g++ (one that supports the
c++0x standard). You can probably download a later gcc package and
then use that to install.
-Jeff
On Wed, May 11, 2011 at 3:37 AM, conglin.deng <conglin.deng@aliyun-inc.com> wrote:
> Hi jeff,
>
>
>
> I have checkout leveldb code from code.google.com,
>
> But when I run make command on the root folder, encounter a error as
> below,
>
>
>
> ///////////////////////////
>
> [root@host]$make
>
> g++ -c -DLEVELDB_PLATFORM_POSIX -I. -I./include -std=c++0x -g2
> db/db_bench.cc -o db/db_bench.o
>
> cc1plus: error: unrecognized command line option "-std=c++0x"
>
> make: * [db/db_bench.o] Error 1
>
> [root@host]$pwd
>
> /home/admin/leveldb
>
> [root@host]$
>
> ///////////////////////////
>
>
>
>
>
> Would you please to tell me how to build and setup leveldb on a redhat
> 5.4 env. Thanks very much!
>
>
>
> Thanks
>
> linc
I suspect that you may find suitable code in the chromium source code. See leveldb's port_chromium.h.