A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by Carli » Fri Jun 04, 2010 12:55 pm
Stucuk wrote:Since most languages have the ability to globally set a flag, id bet that Free Pascal has the ability to set global flags, which would mean you wouldn't need to add a flag to every unit.
but i don't WANT to set the flag anyway.
I want to use objfpc convention without any downwards compatibility flags (that may cause a bad coding style or some other bugs)
-
Carli
-
- Posts: 245
- Joined: Fri Oct 02, 2009 5:28 am
by Stucuk » Fri Jun 04, 2010 4:21 pm
All it will do is make it so that Delphi only stuff works in Free Pascal, your highly unlikely to get lots of bugs just because you enable a flag which just gives the compiler more flexibility. Its not going to make you change your coding habits since your not going to use the header any differently so you won't magically start coding badly.
-
![User avatar](./download/file.php?avatar=575_1233522237.jpg)
Stucuk
-
- Posts: 801
- Joined: Sat Mar 12, 2005 3:54 pm
- Location: Scotland
-
by Carli » Sat Jun 05, 2010 3:02 am
Stucuk wrote:All it will do is make it so that Delphi only stuff works in Free Pascal, your highly unlikely to get lots of bugs just because you enable a flag which just gives the compiler more flexibility. Its not going to make you change your coding habits since your not going to use the header any differently so you won't magically start coding badly.
Typed function variables are a helpful invention and I dont want to miss them.
I prefered to fix the header on my own to do not such cruel casts
-
Carli
-
- Posts: 245
- Joined: Fri Oct 02, 2009 5:28 am
by Kjow » Wed Jun 09, 2010 1:07 pm
Hi all,
what about latest 2.22 header for pascal? I see that Latest Pascal-Header is 2.16
I will use it on lazarus
![Smile :)](./images/smilies/icon_smile.gif)
Thanks!
-
Kjow
-
- Posts: 56
- Joined: Thu Nov 13, 2008 11:33 am
by Stucuk » Wed Jun 09, 2010 11:28 pm
There are no differences between the 2.16 header and 2.22 .
-
![User avatar](./download/file.php?avatar=575_1233522237.jpg)
Stucuk
-
- Posts: 801
- Joined: Sat Mar 12, 2005 3:54 pm
- Location: Scotland
-
by Kjow » Thu Jun 10, 2010 3:53 am
Thank you very much!
So If I want to develop a multiplatform program, I need to use 2.16 pascal-header and grab libs from:
- Win -> 2.22
- Linux -> 2.19
- Mac -> 2.18
it is right?
Other questions,
Is
this tutorial updated to 2.x or is it at 1.53? Is it usable with 2.x?
To make more advanced things, what can you study?
Edit: I mean if there are some pascal examples to see.
Thanks!
PS I use Lazarus.
-
Kjow
-
- Posts: 56
- Joined: Thu Nov 13, 2008 11:33 am
by Carli » Thu Jun 10, 2010 12:42 pm
>PS I use Lazarus.
for Lazarus/FPC, you need to attend some type issues.
I'm writing platform independend for Win and linux32/64.
If you need some help, you can ask me.
-
Carli
-
- Posts: 245
- Joined: Fri Oct 02, 2009 5:28 am
by Kjow » Thu Jun 10, 2010 2:08 pm
Thank you!
I'll wait your headers, meantime I'll practice with the ones presents.
A great thing would be to make a component for lazarus (like ODE in GLScene) with some demos/examples.
Anyway it would be nice to have a page in the lazarus wiki:
http://wiki.lazarus.freepascal.org/NewtonGameDynamicsSome basic demos would be very apprecciated anyway
![Smile :)](./images/smilies/icon_smile.gif)
-
Kjow
-
- Posts: 56
- Joined: Thu Nov 13, 2008 11:33 am
by Carli » Thu Jun 10, 2010 4:26 pm
You can get a lot of pascal demos at
http://www.saschawillems.de/@component:
no.
Newton has a C interface and it would be an overkill to encapsulate it into a Component. (is it really?)
-
Carli
-
- Posts: 245
- Joined: Fri Oct 02, 2009 5:28 am
by Stucuk » Thu Jun 10, 2010 6:17 pm
Carli wrote:>PS I use Lazarus.
for Lazarus/FPC, you need to attend some type issues.
I'm writing platform independend for Win and linux32/64.
If you need some help, you can ask me.
Aka just need to turn on the Delphi Compatibility Flags.
-
![User avatar](./download/file.php?avatar=575_1233522237.jpg)
Stucuk
-
- Posts: 801
- Joined: Sat Mar 12, 2005 3:54 pm
- Location: Scotland
-
by Carli » Fri Jun 11, 2010 2:03 am
Stucuk wrote:Carli wrote:>PS I use Lazarus.
for Lazarus/FPC, you need to attend some type issues.
I'm writing platform independend for Win and linux32/64.
If you need some help, you can ask me.
Aka just need to turn on the Delphi Compatibility Flags.
A free pascaller does not turn on the compatibility flags when it's not necessary.
-
Carli
-
- Posts: 245
- Joined: Fri Oct 02, 2009 5:28 am
by Stucuk » Sat Jun 12, 2010 12:30 pm
That makes no sense. If it doesn't compile without the flags then there kinda necessary. Flags are there to make it so you don't need to modify things so that they work.
-
![User avatar](./download/file.php?avatar=575_1233522237.jpg)
Stucuk
-
- Posts: 801
- Joined: Sat Mar 12, 2005 3:54 pm
- Location: Scotland
-
by JernejL » Sat Jun 12, 2010 12:58 pm
And i'm sure a hardcore C++ programmer doesn't use "objective-c compatibility".. pascal and objective pascal are two distinct languages on its own, which can be compatible, but it's a personal preference at almost religious levels, you stucuk of all people whouls understand this
![Wink ;)](./images/smilies/icon_wink.gif)
-
![User avatar](./download/file.php?avatar=446_1516040955.png)
JernejL
-
- Posts: 1578
- Joined: Mon Dec 06, 2004 2:00 pm
- Location: Slovenia
-
by Kjow » Sun Jun 13, 2010 6:07 am
I'm trying to compile on Linux. With Windows no problem, but on Ubuntu 10.04 x86:
$ fpc SDLNewtonBasicDemo.pas Free Pascal Compiler version 2.4.0 [2010/06/12] for i386
Copyright (c) 1993-2009 by Florian Klaempfl
Note: Switching assembler to default source writing assembler
Target OS: Linux for i386
Compiling SDLNewtonBasicDemo.pas
SDLNewtonBasicDemo.pas(31,3) Note: APPTYPE is not supported by the target OS
Assembling sdlnewtonbasicdemo
Linking SDLNewtonBasicDemo
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
386 lines compiled, 1.5 sec
2 note(s) issued
and when I run:
$ ./SDLNewtonBasicDemo
./SDLNewtonBasicDemo: error while loading shared libraries: libNewton.so: cannot open shared object file: No such file or directory
NOTE: libNewton.so is in the same dir of SDLNewtonBasicDemo
Some suggestions?
-
Kjow
-
- Posts: 56
- Joined: Thu Nov 13, 2008 11:33 am
by Stucuk » Sun Jun 13, 2010 8:25 am
Delfi wrote:you stucuk of all people whouls understand this
![Wink ;)](./images/smilies/icon_wink.gif)
I will never understand the problem of enabling one global flag that means you don't need to re-write a unit. If that flag had the potential to screw the application up then ok id understand, but since your more likely to be given millions of Pounds/Dollers/<Insert Currency Here> than the flag screwing the app up i totally don't get it.
Delfi wrote:And i'm sure a hardcore C++ programmer doesn't use "objective-c compatibility"
It should be the other way around where a objective-c programmer doesn't want to use a C++ compatibility flag. I have been programming for about 10 or so years, and from what i can tell programmers in general just try to do things in the most efficient and quickest way possible. I havn't met many people who would waste there time re-writing units instead of just enabling a flag just so they can earn there "Im a Hardcore" badge.
P.S Delfi could you split Kjow's post into a new topic please? Its not related to the Pascal Headers.
-
![User avatar](./download/file.php?avatar=575_1233522237.jpg)
Stucuk
-
- Posts: 801
- Joined: Sat Mar 12, 2005 3:54 pm
- Location: Scotland
-
Return to General Discussion
Who is online
Users browsing this forum: No registered users and 11 guests