1
원래 Microsoft Visual Studio로 작성된 일부 코드를 Linux로 이식하려고합니다. 코드는 std::wstring
사용하고 내가 컴파일 할 때, 나는 다음과 같은 오류 얻을 :Linux gcc 4.9 wstring undefined
undefined reference to `myFunc(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&)'
myfunc(const std::wstring &str)
내가 포함 할 필요가 몇 가지 추가 헤더 파일이
로 선언?
올바른 헤더가 포함되어 있고 wstring이 std 네임 스페이스에 있어야합니다. – billz
'myfunc (const std :: wstring & str)'함수의 정의에서 컴파일하고 링크하고 있습니까? – Niall
지금까지는 gcc에 문제가있는 것 같지 않습니다. 내 함수를 어디에 정의 했습니까? 응용 프로그램을 컴파일하고 링크하는 방법은 무엇입니까? – nos