$ gcc strgen.cpp
strgen.cpp:81: error: `noreturn' was not declared in this scope
strgen.cpp:81: error: variable or field `_declspec' declared void
strgen.cpp:81: error: syntax error before `(' token
strgen.cpp:84: error: `s' was not declared in this scope
strgen.cpp:84: error: ISO C++ forbids declaration of `__builtin_va_start' with
no type
strgen.cpp:84: error: declaration of `int __builtin_va_start'
strgen.cpp:84: error: conflicts with built-in declaration `void
__builtin_va_start(char*&, ...)'
strgen.cpp:84: error: initializer list being treated as compound expression
strgen.cpp:85: error: `buf' was not declared in this scope
strgen.cpp:85: error: `s' was not declared in this scope
strgen.cpp:85: error: ISO C++ forbids declaration of `vsprintf' with no type
strgen.cpp:85: error: `int vsprintf' redeclared as different kind of symbol
/usr/include/stdio.h:345: error: previous declaration of `int vsprintf(char*,
const char*, char*)'
strgen.cpp:85: error: initializer list being treated as compound expression
strgen.cpp:86: error: ISO C++ forbids declaration of `__builtin_va_end' with no
type
strgen.cpp:86: error: declaration of `int __builtin_va_end'
strgen.cpp:86: error: conflicts with built-in declaration `void
__builtin_va_end(char*&)'
strgen.cpp:86: error: invalid conversion from `char*' to `int'
strgen.cpp:87: error: `buf' was not declared in this scope
strgen.cpp:87: error: ISO C++ forbids declaration of `fprintf' with no type
strgen.cpp:87: error: `int fprintf' redeclared as different kind of symbol
/usr/include/stdio.h:322: error: previous declaration of `int fprintf(FILE*,
const char*, ...)'
strgen.cpp:87: error: initializer list being treated as compound expression
strgen.cpp:88: error: ISO C++ forbids declaration of `exit' with no type
strgen.cpp:88: error: `int exit' redeclared as different kind of symbol
/usr/include/stdlib.h:612: error: previous declaration of `void exit(int)'
strgen.cpp:89: error: parse error before `}' token
strgen.cpp: In function `void put_byte(unsigned char)':
strgen.cpp:98: error: `error' undeclared (first use this function)
strgen.cpp:98: error: (Each undeclared identifier is reported only once for
each function it appears in.)
strgen.cpp: In function `void EmitSetX(char*, int)':
strgen.cpp:157: error: `error' undeclared (first use this function)
strgen.cpp: In function `void EmitSetXY(char*, int)':
strgen.cpp:165: error: `error' undeclared (first use this function)
strgen.cpp: In function `void parse_strings_h(char*, FILE*)':
strgen.cpp:435: error: `error' undeclared (first use this function)
strgen.cpp: In function `void gen_output(FILE*)':
strgen.cpp:548: error: `error' undeclared (first use this function)
strgen.cpp: In function `int main(int, char**)':
strgen.cpp:568: error: `error' undeclared (first use this function)
$
I now tried to build it using Visual C++ 6.0 on Windows, which went fine. I now got a strgen.exe but when I run it it complains about not being able to open strings.h.
It is actually in the same directory as the strgen.exe but isn't it supposed to be compiled into the executable anyway?
Or is there any place I can get a prebuild strgen.exe which I can use to compile the translation of english.txt into some .lng file?
MadEgg wrote:I now tried to build it using Visual C++ 6.0 on Windows, which went fine. I now got a strgen.exe but when I run it it complains about not being able to open strings.h.
It is actually in the same directory as the strgen.exe but isn't it supposed to be compiled into the executable anyway?
Or is there any place I can get a prebuild strgen.exe which I can use to compile the translation of english.txt into some .lng file?
strgen looks in the table subdirectory for strings.h
So unless you move strgen.exe 1 directory up to main so that strings.h is in the table subdirectory, or modify strgen.cpp file to look for strings.h somewhere else, it won't run.
Of course you can run strgen.exe from the main openttd directory like this so that current directory is main openttd:
C:\Documents and Settings\<username>\Desktop\openttd-0.1>strgen\Release\strgen.exe
Good luck
TrueLight:"Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?" <@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
I have no idea. He tried to compile it under Linux, and failed. Then he tried it under windows, so I helped him on the way. I've got no idea about linux
TrueLight:"Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?" <@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
TrueLight:"Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?" <@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."