Archived

This topic is now archived and is closed to further replies.

Senses777

Unresolved cout?? Huh?

Recommended Posts

My iostream classes just stopped working. I can''t think of any reason why it would stop except I did put a new library in my include paths. They were working before, in the same projects and now I cannot get them working even in new projects. This is a major annoyance as I run many algorithm tests in console programs and such. Linker error message I get for cout: Source1.obj : error LNK2001: unresolved external symbol "struct _STL::__null_stream _STL::cout" (?cout@_STL@@3U__null_stream@1@A) I''m using visual studio .net. Thanks!
Far too much time has passed For us to lament that we were in love.

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
std::cout?


Hehe, I used that, don't worry ^^

quote:
Original post by brassfish89
Post your code and maybe we can help you. Also, try taking out the library path and see if it works then.


I tried taking out the libraries I just installed, and that had no effect.

This is an example of what won't compile:


// created in VS.net as an empty win32 console project. I then create a main.cpp and add it to the project.


#include <iostream>

using namespace std;

void main()
{
cout << "Hello world";
}



Yep, that won't compile. Pretty crazy.

[edit: I should say that won't link, it will compile, see origional message]



Far too much time has passed
For us to lament that we were in love.


[edited by - Senses777 on October 21, 2003 10:52:51 PM]

Share this post


Link to post
Share on other sites
I got it working partly! It was indeed the extra library I had included.

I didn''t detect it at first because it seems I have to close and open the project AND clean it in order for the changes in my include directories to take place?? Which is strange because I''v never had that problem before. (Normally it just works, if it doesn''t I can clean it and it works, but in this case I had to close and re-open the workspace, or solution as they are called in .net).

Sorry about that all ^^



Far too much time has passed
For us to lament that we were in love.

Share this post


Link to post
Share on other sites