OpenTTD on Linux
Moderator: OpenTTD Developers
okay lesson learned
May I ask you what distro you have then?
I'm moving to Debian Sarge this weekend. If everything goes as planned, that is.
May I ask you what distro you have then?
I'm moving to Debian Sarge this weekend. If everything goes as planned, that is.
GoneWacko. Making [url=irc://irc.oftc.net/tycoon]#tycoon[/url] sexy and exciting since 1784.
That doesn't fix my problem. You properly compiled to a i386. I'm trying to port it to mac, and as we all know, they aren't based on x86 cpus.MadEgg wrote:Look at my previous post in this thread, it containts a tgz file with Linux binaries in it.
What should I do with win32.c, when I'm not using windows
Are you really using Linux? Generally the Linux include files define a value to show the #ifdefs that you're using it. If it doesn't work, look for these #ifdefs and hardcode to linux. Also remove the lines that include win32.cBjarni wrote:When I compile, I get this
Compiling win32.c (76 errors)
win32.c:6: header file 'windows.h' not found
win32.c:7: header file 'mmsystem.h' not found
win32.c:9: header file 'winnt.h' not found
How did you manage to avoid the windows only files?
I was actually replying to Eirik with that post.Bjarni wrote:That doesn't fix my problem. You properly compiled to a i386. I'm trying to port it to mac, and as we all know, they aren't based on x86 cpus.MadEgg wrote:Look at my previous post in this thread, it containts a tgz file with Linux binaries in it.
What should I do with win32.c, when I'm not using windows
As for your problem, I wouldn't know why that is happening. Are you using the Makefile to build it? That should use the unix.c instead of win32.c...
Protect the Banana
Since the makefile works for the rest of you, I tried it again. It still doesn't work though. When I try it, I get this
0x50a46af7:/volumes/hd120/openttd/openttd bjarni$ ./makefile
./makefile: line 80: all: command not found
./makefile: line 1: ttd_sources:.c=.o: command not found
./makefile: line 123: ttd: command not found
./makefile: line 1: C_BUILD: command not found
./makefile: line 124: $^: command not found
./makefile: line 1: ttd_sources:.c=.d: command not found
./makefile: line 125: include: command not found
./makefile: line 130: clean: command not found
./makefile: line 133: .PHONY: command not found
CC: no input files
./makefile: line 1: CFLAGS: command not found
./makefile: line 153: ?C_OBJ_BUILD=: command not found
./makefile: line 1: CFLAGS: command not found
CC: no input files
./makefile: line 154: -o: command not found
./makefile: line 160: fg: no job control
./makefile: line 161: syntax error near unexpected token `newline'
./makefile: line 161: ` $(C_OBJ_BUILD) $<'
The first error is the line
all : TTD
I can't fix it since I have no idea of what it does
Do anybody know how to fix this?
Do you know any really good links for shell scripting. I'm not a complete newbie, but I still have some important things to learn.
0x50a46af7:/volumes/hd120/openttd/openttd bjarni$ ./makefile
./makefile: line 80: all: command not found
./makefile: line 1: ttd_sources:.c=.o: command not found
./makefile: line 123: ttd: command not found
./makefile: line 1: C_BUILD: command not found
./makefile: line 124: $^: command not found
./makefile: line 1: ttd_sources:.c=.d: command not found
./makefile: line 125: include: command not found
./makefile: line 130: clean: command not found
./makefile: line 133: .PHONY: command not found
CC: no input files
./makefile: line 1: CFLAGS: command not found
./makefile: line 153: ?C_OBJ_BUILD=: command not found
./makefile: line 1: CFLAGS: command not found
CC: no input files
./makefile: line 154: -o: command not found
./makefile: line 160: fg: no job control
./makefile: line 161: syntax error near unexpected token `newline'
./makefile: line 161: ` $(C_OBJ_BUILD) $<'
The first error is the line
all : TTD
I can't fix it since I have no idea of what it does
Do anybody know how to fix this?
Do you know any really good links for shell scripting. I'm not a complete newbie, but I still have some important things to learn.
Ghehe.. You're not supposed to execute the Makefile directly.
The makefile containts information on what the 'make' command should do.
Just entering:
should work. That reads the Makefile and then knows how to compile.
Something you should fix first before it will compile at all on Unix systems is open the unix.c file and add the line:
to the top after the
line.
The makefile containts information on what the 'make' command should do.
Just entering:
Code: Select all
make
Something you should fix first before it will compile at all on Unix systems is open the unix.c file and add the line:
Code: Select all
#include <sys/statfs.h>
Code: Select all
#include <sys/stat.h>
Protect the Banana
- petteyg359
- Engineer
- Posts: 5
- Joined: 06 Mar 2004 20:58
- Contact:
If you don't like it because you can't do that, then why not just change settings so that you can? You talk like you're a Linux pro... Log in as root and change the permissions so that whatever your normal log-on is can access those directories/files... Pretty simple to do...Saskia wrote:Because GCC is a bit complicated and sensitive for different versions of it's main package, the compiler modules, the library, and so on. And then it's very difficult to find the source of your problems, because the compiler messages get microsoftified: they don't point to the right problem - the wrong library for example! Anyway, the kernel is in YaST too, or isn't it? I don't have SuSE, I hate it, it's like Windows ... it don't even lets you set the rights of your files, or edit something in /etc!GoneWacko wrote: Anyways, why would it be dangerous to reinstall GCC. If it would be dangerous, then why would it be in YaST ?
Now it compiles and it even starts. That is if I set the videodriver to null
It works because if I write -g (start game) and waits, I can hear the new year sound
I feel so close
Now the (hopefullt only) problem remains:
If I use the SDL video driver, I get this:
2004-03-18 23:37:09.235 ttd[2666] *** _NSAutoreleaseNoPool(): Object 0x134a340 of class NSCFString autoreleased with no pool in place - just leaking
2004-03-18 23:37:09.237 ttd[2666] *** _NSAutoreleaseNoPool(): Object 0x1338e80 of class NSException autoreleased with no pool in place - just leaking
2004-03-18 23:37:09.239 ttd[2666] *** Uncaught exception: <NSInternalInconsistencyException> Error (1002) creating CGSWindow
Trace/BPT trap
I have SDL 1.2.7
Are there any SDL expert out there
any suggestions?
It works because if I write -g (start game) and waits, I can hear the new year sound
I feel so close
Now the (hopefullt only) problem remains:
If I use the SDL video driver, I get this:
2004-03-18 23:37:09.235 ttd[2666] *** _NSAutoreleaseNoPool(): Object 0x134a340 of class NSCFString autoreleased with no pool in place - just leaking
2004-03-18 23:37:09.237 ttd[2666] *** _NSAutoreleaseNoPool(): Object 0x1338e80 of class NSException autoreleased with no pool in place - just leaking
2004-03-18 23:37:09.239 ttd[2666] *** Uncaught exception: <NSInternalInconsistencyException> Error (1002) creating CGSWindow
Trace/BPT trap
I have SDL 1.2.7
Are there any SDL expert out there
any suggestions?
This is going quite offtopic but that's about one of the worst things you can do. The reason normal users can't do that is so that you(or any virus-like program) can't mess the whole system up, in the worst case only your own home-directory...petteyg359 wrote: If you don't like it because you can't do that, then why not just change settings so that you can? You talk like you're a Linux pro... Log in as root and change the permissions so that whatever your normal log-on is can access those directories/files... Pretty simple to do...
Protect the Banana
I started all over and downloaded the new code, but I still have problems
When I write make, it compiles and give this error:
gcc -g -Wall -Wno-multichar `sdl-config --cflags` -DUNIX -DWITH_SDL -c unix.c
unix.c:10:25: sys/statvfs.h: No such file or directory
unix.c: In function `FiosGetDescText':
unix.c:143: error: storage size of `s' isn't known
unix.c:145: warning: implicit declaration of function `statvfs'
unix.c:143: warning: unused variable `s'
Help. Please. Really want this to work
When I write make, it compiles and give this error:
gcc -g -Wall -Wno-multichar `sdl-config --cflags` -DUNIX -DWITH_SDL -c unix.c
unix.c:10:25: sys/statvfs.h: No such file or directory
unix.c: In function `FiosGetDescText':
unix.c:143: error: storage size of `s' isn't known
unix.c:145: warning: implicit declaration of function `statvfs'
unix.c:143: warning: unused variable `s'
Help. Please. Really want this to work
You could open unix.c and replace every occurence of statvfs with statfs.(so also change the #include <sys/statvfs.h> to #include <sys/statfs.h>.Bjarni wrote:I started all over and downloaded the new code, but I still have problems
When I write make, it compiles and give this error:
gcc -g -Wall -Wno-multichar `sdl-config --cflags` -DUNIX -DWITH_SDL -c unix.c
unix.c:10:25: sys/statvfs.h: No such file or directory
unix.c: In function `FiosGetDescText':
unix.c:143: error: storage size of `s' isn't known
unix.c:145: warning: implicit declaration of function `statvfs'
unix.c:143: warning: unused variable `s'
Help. Please. Really want this to work
I think you should have that file and it works equally well.
Protect the Banana
Have you searched for the statfs.h or statvfs.h file? Something like:
or
should work. The statfs.h and statvfs.h files come with glibc, so if you've got glibc installed you should have those headerfiles...
Code: Select all
find /usr/include -iname 'statfs.h'
Code: Select all
locate statfs.h
Protect the Banana
Who is online
Users browsing this forum: No registered users and 35 guests