Box2d to convert into lazarus lazarus / 70-OpenGL ---------------------------------------------------------------------- tr_escape · 2015-05-18 19:24 Hello everyone, I just wonder is there any work about to convert box2d-delphi into lazarus. I downloaded from https://code.google.com/p/box2d-delphi/ and it is worked with Delphi XE3 but lazarus I didn't get success. I changed some lines of code like as in uses block:    // OpenGL,    Gl,    Glu,    GLUT,  or floattotext functions and finally I can compile but I got a opengl32 dll error or something like. ( maybe glut32.dll ) Is there any idea? I added my project files into attach. It is already a delphi project but I deleted some files ( exe , .o ) ---------------------------------------------------------------------- avra · 2015-05-19 09:13 Quote from: tr_escape on May 18, 2015, 09:24:56 pmI just wonder is there any work about to convert box2d-delphi into lazarus.http://www.pilotlogic.com/sitejoom/index.php/forum/pl- box2d/1074-lab-box2d-libray-for-win32-and-win64 ---------------------------------------------------------------------- tr_escape · 2015-05-20 05:43 Quote from: avra on May 19, 2015, 11:13:30 amQuote from: tr_escape on May 18, 2015, 09:24:56 pmI just wonder is there any work about to convert box2d-delphi into lazarus.http://www.pilotlogic.com/sitejoom/index.php/forum/pl- box2d/1074-lab-box2d-libray-for-win32-and-win64 I think it wont work because lazarus not implement yet AllocateHWnd function: Code: [Select]function AllocateHWnd(Method: TWndMethod): HWND;   begin     { dummy }     runerror(217);     Result:=0;   end; Is there equivalent function in Lazarus/fpc? Or If I copy Delphi's function into Lazarus , is there a problem with copying rights? ---------------------------------------------------------------------- avra · 2015-05-20 09:25 Quote from: tr_escape on May 20, 2015, 07:43:34 amI think it wont work because lazarus not implement yet AllocateHWnd function:Well, since you didn't bother testing in neither Lazarus or Typhon, I won't bother explaining how can this Typhon package work in Lazarus (as shown in screenshot). Tested with Laz 1.5, FPC2.6.5. Cheers! ---------------------------------------------------------------------- tr_escape · 2015-05-20 09:57 Quote from: avra on May 20, 2015, 11:25:17 amQuote from: tr_escape on May 20, 2015, 07:43:34 amI think it wont work because lazarus not implement yet AllocateHWnd function:Well, since you didn't bother testing in neither Lazarus or Typhon, I won't bother explaining how can this Typhon package work in Lazarus (as shown in screenshot). Tested with Laz 1.5, FPC2.6.5. Cheers! Could you please share your codes? Best regards. ---------------------------------------------------------------------- avra · 2015-05-20 10:30 Quote from: tr_escape on May 20, 2015, 11:57:05 amCould you please share your codes?Sorry, I don't like the way you don't appreciate my time, so I have decided not to share product of that time just for you. Maybe I got on wrong foot today, but that's the way it is. If you can not make it work with Lazarus yourself then use CodeTyphon version of Lazarus (Box2D works there out of the box), or wait until I make a module for fpcup when everyone else will be able to install it into Lazarus. ---------------------------------------------------------------------- tr_escape · 2015-05-20 11:01 Quote from: avra on May 20, 2015, 12:30:56 pmQuote from: tr_escape on May 20, 2015, 11:57:05 amCould you please share your codes?Sorry, I don't like the way you don't appreciate my time, so I have decided not to share product of that time just for you. Maybe I got on wrong foot today, but that's the way it is. If you can not make it work with Lazarus yourself then use CodeTyphon version of Lazarus (Box2D works there out of the box), or wait until I make a module for fpcup when everyone else will be able to install it into Lazarus. Ok. There is no problem for your sharing idea... I tried to install sophos found a threat that why I didn't install it. I have to install in a virtualbox first I think... ****************** Sophos Anti-Virus Log - 20.05.2015 10:59:39 ************** 20150520 101426   On-access scanner has denied access to location "C:\codetyphon\binTools\win32\dllexp\dllexp.exe" for user NT AUTHORITY\SYSTEM 20150520 101456   File "C:\codetyphon\binTools\win32\dllexp\dllexp.exe" belongs to adware or PUA 'NirSoft' (of type 2). 20150520 101501   File "C:\codetyphon\binTools\win32\dllexp\dllexp.exe" has been cleaned up. 20150520 101502   Adware or PUA 'NirSoft' has been removed.       (205 items) ---------------------------------------------------------------------- tr_escape · 2015-05-25 18:54 Hello everyone, I converted to lazarus box2d sample project. Ofcourse there are some problems but for development aim it can be use. So you can download all sources and exe/dll files from sourceforge.net https://sourceforge.net/projects/lazprojects/files/box2D_Lazarus/ It compiled by lazarus 1.4.0 for windows... Some demo scenes in the attach.