Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[locale.gen] Schuld an C++ Compiler Fehlern?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
byte_head
n00b
n00b


Joined: 07 Jun 2007
Posts: 4
Location: Germany

PostPosted: Wed Jun 13, 2007 7:08 pm    Post subject: [locale.gen] Schuld an C++ Compiler Fehlern? Reply with quote

Hi,

wenn ich versuche eine fehlerfreie C++ Source zu kompilieren, bekomme ich öfter vollkommen abgefahrene Errors.
Bei meinem Kumpel (er hat Ubuntu + xfce auch gcc) geht die selbe Source problemlos.

Er meinte nun es liegt an den Settings die ich in der locale.gen gemacht hätte.
Da ich am liebsten Software auf Englisch nutze, habe ich folgende Einstellungen:

en_US ISO-8859-1
en_US.UTF-8 UTF-8

Allerdings scheint dies wohl falsch zu sein. :(
Keymap ist auf Deutsch eingestellt etc,
aber ein Bekannter (gut er ist kein Deutscher) hat mir in Jabber einfach geraten es bei diesen
Settings zu belassen "da könne man nichts falschmachen". :roll:

Wäre super wenn ihr mir weiterhelfen könntet,

Grüße, byte
Back to top
View user's profile Send private message
Fauli
l33t
l33t


Joined: 24 Apr 2004
Posts: 760
Location: Moers, Germany

PostPosted: Wed Jun 13, 2007 7:41 pm    Post subject: Reply with quote

Kannst du mal eine konkrete Fehlermeldung posten?
_________________
Do your part to beautify the web! Turn off link underlining!
Back to top
View user's profile Send private message
dakjo
Veteran
Veteran


Joined: 31 Jan 2004
Posts: 1544

PostPosted: Thu Jun 14, 2007 7:17 am    Post subject: Reply with quote

Fauli wrote:
Kannst du mal eine konkrete Fehlermeldung posten?

Am besten inkl. des Sourcecodes.
_________________
'Dieselben Naturkräfte, die uns ermöglichen, zu den Sternen zu fliegen, versetzen uns auch in die Lage, unseren Stern zu vernichten.' - Wernher von Braun
http://www.mpsna.de
Back to top
View user's profile Send private message
byte_head
n00b
n00b


Joined: 07 Jun 2007
Posts: 4
Location: Germany

PostPosted: Thu Jun 14, 2007 12:51 pm    Post subject: Reply with quote

Es ist bei vielen Codes so, die ich z.B. mir von einem Freund schicken lasse.

heute meinte er, weil bei mir das whitspace als Zeichen "erkannt" wird vom Compiler kriege ich die ganzen Fehler... :|

Hier ein einfaches BSP *edit*

Code:

#include <iostream>

using namespace std;

void doubler(int,int);

int main()
{
  cout << " Bitte geben Sie 2 Zahlen ein ! " << endl;
  int a;
  int b;
  cin >> a;
  cin >> b;
  doubler(a,b); 
  return 0;
}

void doubler(int a, int b)
{
        a=a*2;
        b=b*2;
        cout<<a<<<endl<<b<<endl;
}


johannes@localhost ~ $ gcc test.cpp
test.cpp:9: error: stray '\240' in program
test.cpp:9: error: stray '\240' in program
test.cpp:10: error: stray '\240' in program
test.cpp:10: error: stray '\240' in program
test.cpp:11: error: stray '\240' in program
test.cpp:11: error: stray '\240' in program
test.cpp:12: error: stray '\240' in program
test.cpp:12: error: stray '\240' in program
test.cpp:13: error: stray '\240' in program
test.cpp:13: error: stray '\240' in program
test.cpp:14: error: stray '\240' in program
test.cpp:14: error: stray '\240' in program
test.cpp:14: error: stray '\240' in program
test.cpp:14: error: stray '\240' in program
test.cpp:15: error: stray '\240' in program
test.cpp:15: error: stray '\240' in program
test.cpp:20: error: stray '\240' in program
test.cpp:20: error: stray '\240' in program
test.cpp:20: error: stray '\240' in program
test.cpp:20: error: stray '\240' in program
test.cpp:21: error: stray '\240' in program
test.cpp:21: error: stray '\240' in program
test.cpp:21: error: stray '\240' in program
test.cpp:21: error: stray '\240' in program
test.cpp:21: error: stray '\240' in program
test.cpp:21: error: stray '\240' in program
test.cpp:21: error: stray '\240' in program
test.cpp:21: error: stray '\240' in program
test.cpp: In function 'void doubler(int, int)':
test.cpp:22: error: expected primary-expression before '<' token
test.cpp:22: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator<<'
johannes@localhost ~ $
[/CODE]

mfg, byte
Back to top
View user's profile Send private message
Fauli
l33t
l33t


Joined: 24 Apr 2004
Posts: 760
Location: Moers, Germany

PostPosted: Thu Jun 14, 2007 5:30 pm    Post subject: Reply with quote

240 (oktal) = 160 (dezimal) = "Non-breaking space" im ISO-8859-1 Character Set.

Hast du die Quellen vielleicht aus einer HTML-Datei herauskopiert?

Du kannst die nbsp-Zeichen jedenfalls mit sed durch normale Leerzeichen ersetzen (ungetestet):
Code:
sed -i 's/\xa0/ /g' test.cpp

_________________
Do your part to beautify the web! Turn off link underlining!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum