[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Help with std::locale
From: |
jalkadir |
Subject: |
Help with std::locale |
Date: |
9 Oct 2005 18:47:12 -0700 |
User-agent: |
G2/0.2 |
When compiling this progra, I get an error that reads:
***
Compiler : GNU GCC Compiler (called directly)
--------------------------------------------------------------------------------
.objs\exception.o(.bss+0x0):exception.cpp: multiple definition of
`jme::native_loc'
.objs\main.o(.bss+0x0):main.cpp: first defined here
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 4 seconds)
***
Can anybody please tell me what I am doing wrong?
TIA
/* I hope that this is not another shortcoming of GCC */
-- someheader.hpp
#include <locale>
namespace{
std::locale native_loc("");
}
-- main.cpp
int main(){
std::cout << jme::native_loc.name() << std::endl;
std::cout << "\a \a \a" << "Done..." << std::endl;
std::cin.get();
return 0;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Help with std::locale,
jalkadir <=