Results 1 to 9 of 9

Thread: Compiling delphi style console applications with freepascal

  1. #1

    Compiling delphi style console applications with freepascal

    I installed fpc for linux today (until now i use kylix2pro and delphi5), but i do seem to be able to compile delphi stile applications with it. For example i use:

    var
    varname: type = 1;

    Could someone give me a quick boost into fpc compiling delphi style applications?

    Also i get a complaint about linking ld-linux.so? I do not know why it is needed. The lib is available though.
    http://3das.noeska.com - create adventure games without programming

  2. #2

    Compiling delphi style console applications with freepascal

    Quote Originally Posted by noeska
    Could someone give me a quick boost into fpc compiling delphi style applications?
    Ok, but you give us too few information..
    what command line you used to compile ?
    what's the exact error(s) ?
    what's the problem with ld ?
    what kind of library are you using ?
    If you save your data in a proprietary format, the owner of the format owns your data.
    <br /><A href="http://msx80.blogspot.com">http://msx80.blogspot.com</A>

  3. #3

    Compiling delphi style console applications with freepascal

    i use fpc-1.0.10

    i cannot reproduce the exact error message as i am now back under windows.

    i used fpc -Sd -S2 hello.pas to compile

    what i am trying to accomplish is to compile the openal unit from my openal site. And then some tutorials.

    the ld error is that is says the lib cannot be found, but it does exist.
    http://3das.noeska.com - create adventure games without programming

  4. #4

    Compiling delphi style console applications with freepascal

    Quote Originally Posted by noeska
    i use fpc-1.0.10

    i cannot reproduce the exact error message as i am now back under windows.

    i used fpc -Sd -S2 hello.pas to compile

    what i am trying to accomplish is to compile the openal unit from my openal site. And then some tutorials.

    the ld error is that is says the lib cannot be found, but it does exist.
    Well i use the 1.9.2 version. It has the -MDelphi option for compatibility.
    That's my compile script:

    fpc -O2 -MDelphi -Fu"../generic" -Fu"../../JEDI-SDLv1.0/ode/Pas" -Fu"../odeutils" -Fu"../OpenGlLoop" -Fu"../../JEDI-SDLv1.0/SDL/Pas" -Fu"../../JEDI-SDLv1.0/OpenGL/Pas" -Fu"../../JEDI-SDLv1.0/SDL_Image/Pas" -Fi"../../JEDI-SDLv1.0/SDL/Pas" ode.dpr

    For the lib, is it in the current dir or under /usr/lib/ ? If it's not there, copy it or make a link.

    Bye!
    If you save your data in a proprietary format, the owner of the format owns your data.
    <br /><A href="http://msx80.blogspot.com">http://msx80.blogspot.com</A>

  5. #5

    Compiling delphi style console applications with freepascal

    I downloaded fpc 1.94 and now things compile better.
    Also i installed glib-devel now i do not have the ld linking error anymore.

    New is that on executing ld is complaining about pointers not being valid anymore and refers to some c code?
    http://3das.noeska.com - create adventure games without programming

  6. #6

    Compiling delphi style console applications with freepascal

    Quote Originally Posted by noeska
    New is that on executing ld is complaining about pointers not being valid anymore and refers to some c code?
    Can you post the exact output ?
    If you save your data in a proprietary format, the owner of the format owns your data.
    <br /><A href="http://msx80.blogspot.com">http://msx80.blogspot.com</A>

  7. #7
    Anonymous
    Guest

    Compiling delphi style console applications with freepascal

    here is the exact output:
    Inconsistency detected by ld.so: dl-minimal.c: 134: realloc: Assertion `ptr == alloc_last_block' failed!

  8. #8

    Compiling delphi style console applications with freepascal

    Phew i got all to work by adding {$LinkLib c}.

    A new kylix and fpc example is available for download with tutorial #13 on http://www.noeska.com/doal .
    http://3das.noeska.com - create adventure games without programming

  9. #9
    Anonymous
    Guest

    Compiling delphi style console applications with freepascal

    -Sd -S2 is probablly confusing it you should just use -Sd

    delphi support is rather buggy in 1.0.10 though especially the method pointer support,

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •