[cfe-dev] iostream on windows

Francois Pichet pichet2000 at gmail.com
Sun Mar 4 22:05:54 PST 2012


On Sun, Mar 4, 2012 at 5:43 AM, akshay ratnaparkhi <ackk007 at gmail.com> wrote:
> hi,
>   I am using Clang on windows via visual studio. I tried simple program
> hello.cpp .
>
> #include <iostream>
> using namepace std;
> int main(int args, char** argv)
> {
>  cout << "hello world" << endl;
> }
>
>
> after compiling I got following errors....
>
> temphallo-125521.o : error LNK2019: unresolved external symbol __ZSt4cout
> refere
> nced in function _main
> temphallo-125521.o : error LNK2019: unresolved external symbol __ZdlPv
> reference
> d in function __ZNSt14error_categoryD0Ev
> temphallo-125521.o : error LNK2019: unresolved external symbol
> __ZSt18uncaught_e
> xceptionv referenced in function __ZNSo6sentryD2Ev
> temphallo-125521.o : error LNK2019: unresolved external symbol
> ___cxa_rethrow re
> ferenced in function __ZNSt8ios_base5clearEib
> temphallo-125521.o : error LNK2019: unresolved external symbol
> ___cxa_allocate_e
> xception referenced in function __ZNSt8ios_base5clearEib
> temphallo-125521.o : error LNK2019: unresolved external symbol ___cxa_throw
> refe
> renced in function __ZNSt8ios_base5clearEib
> temphallo-125521.o : error LNK2019: unresolved external symbol
> __ZSt17iostream_c
> ategoryv referenced in function __ZSt15make_error_codeNSt7io_errc7io_errcE
> temphallo-125521.o : error LNK2019: unresolved external symbol
> __ZNSt9exceptionD
> 2Ev referenced in function __ZNSt13runtime_errorD2Ev
> temphallo-125521.o : error LNK2019: unresolved external symbol
> __ZNSt9exceptionC
> 2ERKPKc referenced in function __ZNSt13runtime_errorC2EPKc
> temphallo-125521.o : error LNK2001: unresolved external symbol
> ___cxa_pure_virtu
> al
> temphallo-125521.o : error LNK2001: unresolved external symbol
> __ZTVN10__cxxabiv
> 117__class_type_infoE
> temphallo-125521.o : error LNK2001: unresolved external symbol
> __ZTVN10__cxxabiv
> 120__si_class_type_infoE
> temphallo-125521.o : error LNK2001: unresolved external symbol
> __ZTISt9exception
>
> temphallo-125521.o : error LNK2001: unresolved external symbol
> __ZNKSt9exception
> 4whatEv
> temphallo.exe : fatal error LNK1120: 14 unresolved externals
> clang++: error: linker command failed with exit code 1120 (use -v to see
> invocat
> ion)
>
>
> how can i bug this problem?
>

Generating C++ executable with clang using the MSVC toolset doesn't
work yet, a lot of missing stuff not yet implemented. (some ABI, some
name mangling, some low level runtime stuff missing)

As such this is not a bug but rather a missing functionality.




More information about the cfe-dev mailing list