Compile Error: Identifier CreateThread not found?

BlitzMax Forums/BlitzMax Programming/Compile Error: Identifier CreateThread not found?

JoJo(Posted 2008) [#1]
I copied this code as a sample to test threading but everytime
I compile, I get a 'CreateThread not found'.

I compiled and recompiled and it doesn't recognized any thread function.

My first step was that I:

svn update "c:\program files\blitzmax"
svn update "c:\program files\blitzmax\bin"



Then I change my path:

"c:\program filesblitzmax\bin\



And then did a

bmk makemods -a -h



Everything compiled fine; and when I go to compile the code below I get the error.

What am I forgetting?



SuperStrict

Import pub.threads

Local Time:Int = MilliSecs()
Local Thread:Int = CreateThread(WaitOnMe,Null)

WaitThread(Thread)
Print "I have waited "+(MilliSecs()-Time)+" milliseconds"
Input()

Function WaitOnMe:Object(data:Object)
	Print "In the WaitOnMe Thread"
	Delay(10000)
	Print "Finished Delay"
End Function



ziggy(Posted 2008) [#2]
compile the program also with -h
If using the latest BLIde Plus version, on the compile option, select the threaded build option. If using MaxIDE, be sure to have latest SVN updates version, so you can also select a threaded build.


TomToad(Posted 2008) [#3]
Program\Build Options\Threaded Build needs to be selected.


JoJo(Posted 2008) [#4]

Program\Build Options\Threaded Build needs to be selected.



Ok. That's my problem. I don't even have that option to select.


Kurator(Posted 2008) [#5]
you also need the new ide to see this option


BladeRunner(Posted 2008) [#6]
I have a similar problem, I build the new bmk and started with bmk makemods -a -h.
The following error occurs:


Bmax is up2date, rev. 145, and compiling modules unthreaded works fine.
Any suggestions ?

EDIT: Ok, now it works. It seems that SVN f***ed up bcc, after rebuilding that to everytning works.


JoJo(Posted 2008) [#7]

you also need the new ide to see this option



Where is the new IDE? I have download the CE version and the one that SebHoll put out.

I don't see an option to build in thread mode.


TomToad(Posted 2008) [#8]
Run your current IDE. Click the "open file" icon or use File/Open from the menu. Navigate to the directory where Blitzmax is installed. Go to the src subdirectory, then to maxide subdirectory. Load in maxide.bmx and compile.
Then copy the newly compiled version over to the blitzmax root folder and click "yes" when asked if you want to replace.


You also need MaxGUI installed to compile the MaxIDE.


ziggy(Posted 2008) [#9]
Obviously do what TomToad said after SVN updating your src folder.


JoJo(Posted 2008) [#10]
Thanks Guys! It's working.