Results 1 to 10 of 24

Thread: Class operators in Freepascal records like in Delphi 2010?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Quote Originally Posted by alexione View Post
    If you're on Windows (32-bit version), here's .bat file I use to compile FPC trunk after I update SVN (just adjust FPCMAKEPATH, FPCPATH and OUTPATH - in this case, C:/dev/fpc/2.4.2 is location of the latest official FPC, and C:/dev/fpc/2.5.1 is location where I want FPC to be installed for later use). It does full clean-make-install cycle.

    set FPCMAKEPATH=C:/dev/fpc/2.4.2
    set FPCPATH=C:/dev/fpc/2.4.2
    set OUTPATH=C:/dev/fpc/2.5.1
    for /r %OUTPATH%\examples %%d in (.svn) do @rmdir /s /q %%d
    %FPCMAKEPATH%/bin/i386-win32/make clean FPC=%FPCPATH%/bin/i386-win32/ppc386.exe
    if errorlevel 1 goto quit
    %FPCMAKEPATH%/bin/i386-win32/make all FPC=%FPCPATH%/bin/i386-win32/ppc386.exe
    if errorlevel 1 goto quit
    %FPCMAKEPATH%/bin/i386-win32/make install FPC=%FPCPATH%/bin/i386-win32/ppc386.exe INSTALL_BASEDIR=%OUTPATH%
    for /r %OUTPATH%\examples %%d in (.svn) do @rmdir /s /q %%d
    :quit

    As of Lazarus, just point FPC directory to C:/dev/fpc/2.5.1 (or wherever you set OUTPATH in the above .bat file), and use built-in feature to recompile it.
    Wow! thanks alexione! I will download the new fpc and try this out

    cheers,
    Paul

  2. #2
    @alexione: hmm...I have downloaded the trunk fpc, but I have some questions.

    1. Do I set the %OUTPATH% string to the fpc folder that I just downloaded from SVN?
    2. Where do I put the batch file to do the compiling that you gave me? In the root fpc folder in 1 ?

    cheers,
    Paul

  3. #3
    Hmm...I think I may have figured it out...trying to compile it now

    cheers,
    Paul
    Last edited by paul_nicholls; 18-04-2011 at 03:28 AM.

  4. #4
    Dang! The compiler sat there compiling for x amount of time, and then bombed with an error

    Code:
    Error: Util as.exe not found, switching to external linking
    Here is the last part of the dos output:
    Code:
    mpiler/i386 -FuG:/fpc/2.5.1/compiler/targets -FuG:/fpc/2.5.1/compiler/systems -F
    uG:/fpc/2.5.1/rtl/units/i386-win32 -FiG:/fpc/2.5.1/compiler -FiG:/fpc/2.5.1/comp
    iler/i386 -FE. -FUG:/fpc/2.5.1/ide/units/i386-win32 -dRELEASE compunit.pas
    aasmtai.pas(396,11) Warning: Constructor should be public
    pdecsub.pas(1630,5) Warning: unreachable code
    symdef.pas(3480,12) Warning: unreachable code
    symdef.pas(3618,12) Warning: unreachable code
    symdef.pas(5424,10) Warning: User defined: : this is completely wrong on so many
     levels...
    pmodules.pas(2357,12) Warning: unreachable code
    ognlm.pas(1317,18) Warning: unreachable code
    t_nwm.pas(973,38) Warning: Function result does not seem to be set
    agx86att.pas(253,16) Warning: unreachable code
    browcol.pas(1264,5) Note: Local variable "esym" not used
    make[5]: Leaving directory `G:/fpc/2.5.1/ide/compiler'
    make[4]: Leaving directory `G:/fpc/2.5.1/ide'
    C:/lazarus/fpc/2.4.2/bin/i386-win32/make testgdb
    make[4]: Entering directory `G:/fpc/2.5.1/ide'
    LibGDB not found
    LIBGDBFILE=
    GDBLIBDIR=G:/fpc/2.5.1/libgdb/win32
    
    make[4]: Leaving directory `G:/fpc/2.5.1/ide'
    C:/lazarus/fpc/2.4.2/bin/i386-win32/make fpc_all
    make[4]: Entering directory `G:/fpc/2.5.1/ide'
    G:/fpc/2.5.1/compiler/ppc386.exe -di386 -Ur -Xs -O2 -n -Sg -FuG:/fpc/2.5.1/rtl/u
    nits/i386-win32 -FuG:/fpc/2.5.1/packages/fv/units/i386-win32 -FuG:/fpc/2.5.1/pac
    kages/gdbint/units/i386-win32 -FuG:/fpc/2.5.1/packages/regexpr/units/i386-win32
    -FuG:/fpc/2.5.1/packages/fcl-base/units/i386-win32 -FuG:/fpc/2.5.1/packages/fcl-
    xml/units/i386-win32 -FuG:/fpc/2.5.1/packages/chm/units/i386-win32 -FE. -FUunits
    /i386-win32 -dRELEASE -dNODEBUG  -Xe -k--allow-multiple-definition fp.pas
    fp.pas(552,1) Error: Util as.exe not found, switching to external linking
    fp.pas(552,1) Fatal: There were 1 errors compiling module, stopping
    Fatal: Compilation aborted
    make[4]: *** [fp.exe] Error 1
    make[4]: Leaving directory `G:/fpc/2.5.1/ide'
    make[3]: *** [buildfp] Error 2
    make[3]: Leaving directory `G:/fpc/2.5.1/ide'
    make[2]: *** [gdb] Error 2
    make[2]: Leaving directory `G:/fpc/2.5.1/ide'
    make[1]: *** [ide_all] Error 2
    make[1]: Leaving directory `G:/fpc/2.5.1'
    make: *** [build-stamp.i386-win32] Error 2
    
    G:\fpc\2.5.1>if errorlevel 1 goto quit
    
    G:\fpc\2.5.1>pause
    Press any key to continue . . .
    I don't know what happened...do you think this means I need something path in my path environmental variable or similar?

    This is my compile script batch file that I placed in the g:\fpc\2.5.1 folder contain the SVN source and make file, etc.:

    Code:
    set FPCMAKEPATH=C:/lazarus/fpc/2.4.2
    set FPCPATH=C:/lazarus/fpc/2.4.2
    set OUTPATH=G:/dev/fpc/2.5.1
    for /r %OUTPATH%\examples %%d in (.svn) do @rmdir /s /q %%d
    %FPCMAKEPATH%/bin/i386-win32/make clean FPC=%FPCPATH%/bin/i386-win32/ppc386.exe
    if errorlevel 1 goto quit
    %FPCMAKEPATH%/bin/i386-win32/make all FPC=%FPCPATH%/bin/i386-win32/ppc386.exe
    if errorlevel 1 goto quit
    %FPCMAKEPATH%/bin/i386-win32/make install FPC=%FPCPATH%/bin/i386-win32/ppc386.exe INSTALL_BASEDIR=%OUTPATH%
    for /r %OUTPATH%\examples %%d in (.svn) do @rmdir /s /q %%d
    :quit
    pause
    G:/dev/fpc/2.5.1 is where I want to install? freepascal 2.5.1, and C:/lazarus/fpc/2.4.2 is where (obviously, DUH!) where I have the existing freepascal comiler...

    cheers,
    Paul
    Last edited by paul_nicholls; 18-04-2011 at 06:13 AM.

  5. #5
    It has nothing to do with directories. The problem is that you don't have binutils's gas assembler(as.exe) in your path. This is for some reason required when building the textmode IDE
    Peregrinus, expectavi pedes meos in cymbalis
    Nullus norvegicorum sole urinat

  6. #6
    Quote Originally Posted by JSoftware View Post
    It has nothing to do with directories. The problem is that you don't have binutils's gas assembler(as.exe) in your path. This is for some reason required when building the textmode IDE
    Ok, I have now added C:\lazarus\fpc\2.4.2\bin\i386-win32 to my path in the batch file (has as.exe there), so I will see if this helps

    cheers,
    Paul

  7. #7
    Sweet! I think it worked...no errors now

    Here is the updated batch file:
    Code:
    set PATH=%PATH%;C:\lazarus\fpc\2.4.2\bin\i386-win32
    set FPCMAKEPATH=C:/lazarus/fpc/2.4.2
    set FPCPATH=C:/lazarus/fpc/2.4.2
    set OUTPATH=G:/dev/fpc/2.5.1
    for /r %OUTPATH%\examples %%d in (.svn) do @rmdir /s /q %%d
    %FPCMAKEPATH%/bin/i386-win32/make clean FPC=%FPCPATH%/bin/i386-win32/ppc386.exe
    if errorlevel 1 goto quit
    %FPCMAKEPATH%/bin/i386-win32/make all FPC=%FPCPATH%/bin/i386-win32/ppc386.exe
    if errorlevel 1 goto quit
    %FPCMAKEPATH%/bin/i386-win32/make install FPC=%FPCPATH%/bin/i386-win32/ppc386.exe INSTALL_BASEDIR=%OUTPATH%
    for /r %OUTPATH%\examples %%d in (.svn) do @rmdir /s /q %%d
    :quit
    pause
    All I have to do is try it out now with Lazarus

    cheers,
    Paul

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
  •