Re: [yoshimi-user] 'cout' undeclared in main.cpp?

  • From: Will Godfrey <willgodfrey@xxxxxxxxxxxxxxx>
  • To: yoshimi-user@xxxxxxxxxxxxxxxxxxxxx
  • Date: Sun, 21 Sep 2014 00:36:13 +0100

On Sun, 21 Sep 2014 00:50:08 +0200
David Adler <david.jo.adler@xxxxxxxxx> wrote:


I've received a comment on https://aur.archlinux.org/packages/yoshimi/

QUOTE

Hi! Got this error while building:

/home/crocoduck/Downloads/yoshimi/yoshimi/src/yoshimi-1.2.3/src/main.cpp:
In function ‘int main(int, char**)’:
/home/crocoduck/Downloads/yoshimi/yoshimi/src/yoshimi-1.2.3/src/main.cpp:75:5:
error: ‘cout’ was not declared in this scope
cout << "Yay! We're up and running :-)\n";
^
CMakeFiles/yoshimi.dir/build.make:1881: recipe for target
'CMakeFiles/yoshimi.dir/main.cpp.o' failed
make[2]: *** [CMakeFiles/yoshimi.dir/main.cpp.o] Error 1
CMakeFiles/Makefile2:122: recipe for target 'CMakeFiles/yoshimi.dir/all'
failed
make[1]: *** [CMakeFiles/yoshimi.dir/all] Error 2
Makefile:117: recipe for target 'all' failed
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
Aborting...

I have been able to compile the source adding #include <iostream> into
main.cpp. I was wondering whether this is a bug or a problem on my
machine.

UNQUOTE

My reply was this:

QUOTE

Added your fix to 1.2.3-2.

Strange enough, this didn't occur when I built yosh prior to uploading
1.2.3-1. Downgrading to gcc-4.9.1-1 (which was installed at the time)
didn't change things. Can't figure out a reason ATM, will forward the
issue to upstream.

UNQUOTE

Any ideas?

That is really, really strange. I don't get any errors here on debian stable
and testing, but in theory I should!

The only thing I can think of is that cmake 'remembers' all sorts of odd
things in a directory specific way, and it's possible that I accidentally
deleted the include after cmake had seen it.

I'll put it back in the next commit, and also place a note on the sourceforge
page.

--
Will J Godfrey
http://www.musically.me.uk
Say you have a poem and I have a tune.
Exchange them and we can both have a poem, a tune, and a song.


Other related posts:

  • » Re: [yoshimi-user] 'cout' undeclared in main.cpp? - Will Godfrey