Hello!
I am trying to port some library from Unix to Win.
This library uses iostream classes like istream and ostream.
So when I ported this lib to win and compiled it as static library, made win32 console application and include this lib everything was fine. But when I am trying to create MFC App I get some linker errors:
1 2 3 4
|
LIB1.lib(LIB1.obj) : error LNK2001: unresolved external symbol "public: static int const filebuf::openprot" (?openprot@filebuf@@2HB)
LIB1.lib(LIB1.obj) : error LNK2001: unresolved external symbol "class ostream_withassign cout" (?cout@@3Vostream_withassign@@A)
Debug/MFCWIN_LIB1.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
|
So I created simple DEMO project to show what errors I have got in my project.
You can download it here:
http://www.2shared.com/file/3679071/3b37f36c/FSTREAM_Trouble.html"
(VC6.0)
The project consists of 3 apps.
1. LIB1.dsp - this is static library, that has just several funcs;
2. CONSOLE_LIB1.dsp - little project, that uses LIB1 and it's funcs (it works fine);
3. MFCWIN_LIB1.dsp - an MFC project, that I could not compile =(
If somebody can help me please ?