Strange problem with xterm
Strange problem with xterm
- Subject: Strange problem with xterm
- From: David Chopp <email@hidden>
- Date: Thu, 12 Jan 2012 11:36:22 -0600
Hi,
I am wondering if anyone else here has seen this problem that may be a Mac vs. Ubuntu X11 issue? I use a Mac Pro with 10.7 and the standard install of X11 that came with the Lion upgrade. I am using "ssh -Y" to login to a Ubuntu linux system where I am writing some code, using the g++ compiler (v. 4.4.3). Below I've attached a sample code snippet that can generate the problem, but the specific error is not relevant and instead is the fact that something else is going on with the compiler error messages in general. So, after logging in to the remote linux system, here is what happens:
$ g++ -Wall deleteme.cpp
deleteme.cpp: In constructor â:
deleteme.cpp:9: warning: â will be initialized after
deleteme.cpp:8: warning: â
deleteme.cpp:6: warning: when initialized here
$ echo $TERM
xterm
Wherever a symbol that is to be identified as the cause of the error is used in the compiler error messages, it's substituted with the "a" symbol. Makes fixes a bit difficult at times. I assumed it was a problem with my compiler until I sat at the terminal of the linux computer and did the same thing:
$ g++ -Wall deleteme.cpp
deleteme.cpp: In constructor ‘foo::foo()’:
deleteme.cpp:9: warning: ‘foo::a’ will be initialized after
deleteme.cpp:8: warning: ‘const int foo::b’
deleteme.cpp:6: warning: when initialized here
So something is happening that is different for my mac X11 that doesn't happen if sitting at the terminal or sitting at a different ubuntu system and logging in remotely.
Has anyone else seen this and solved it? Thanks...
David
PS While the specific messages are not important, it happens for every error and warning generated by the compiler, I'm including the code that was used for the test.
#include <iostream>
#include <string>
class foo {
public:
foo(void) : a(1), b(2) {}
const int b;
const int a;
};
int main(int argc, char* argv[])
{
foo bar;
std::cout << "Enter a string:";
std::string s;
std::getline(std::cin,s);
size_t i = s.find(' ');
while (i != std::string::npos) {
s = s.substr(0,i) + s.substr(i+1);
i = s.find(' ');
}
std::cout << s << '\n';
return 0;
}
------------------------------------------------------------------------------------------------
Still more astonishing is that world of rigorous fantasy we call mathematics.
~Gregory Bateson
------------------------------------------------------------------------------------------------
David Chopp
Professor
Engineering Sciences and Applied Mathematics
Northwestern University
E-mail: email@hidden
Phone: (847)-491-8391
Fax: (847)-491-2178
Homepage: http://people.esam.northwestern.edu/chopp
------------------------------------------------------------------------------------------------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden