compiling openttd - pthread problem

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
mase
Posts: 23
Joined: Fri Aug 21, 2009 3:04 am

compiling openttd - pthread problem

Post by mase »

Hi!
I am trying to compile openttd-0.7.2 for PSP. Now I get an error with
pthread:

Code: Select all

thread_pthread.cpp:14: error: ‘pthread_t’ does not name a type
This is the codepart causing this error:

Code: Select all

#include "stdafx.h"
#include "thread.h"
#include <pthread.h>

/**
 * POSIX pthread version for ThreadObject.
 */
class ThreadObject_pthread &#58; public ThreadObject &#123;
private&#58;
	pthread_t thread;    ///< System thread identifier.
	OTTDThreadFunc proc; ///< External thread procedure.
	void *param;         ///< Parameter for the external thread procedure.
	bool self_destruct;  ///< Free ourselves when done?

public&#58;
I don't understand this, because pthread.h is included.
In the Makefile I also have

Code: Select all

-I/usr/share/psp-dev/psp/include
where pthread.h is present. I don't get errors about not found. Only
the above one.
What is going wrong?
May the force be with us!
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

The psp doesn't have pthreads. Try using the libpthreadlite library in svn as a replacement.
mase
Posts: 23
Joined: Fri Aug 21, 2009 3:04 am

Post by mase »

I got it!
For everyone, who is interested, get it from here:
http://www.tt-forums.net/viewtopic.php? ... 10#p812710
May the force be with us!
Post Reply