Forum > FPC development
Using fpSptreadshet in Free Pascal?
dseligo:
--- Quote from: wp on February 25, 2023, 06:28:46 pm ---
--- Quote from: dseligo on February 25, 2023, 06:07:35 pm ---- set Compiler Mode to 'Object Pascal extension on' ({$mode objfpc} in main source didn't work). Otherwise, Result variable isn't enabled in functions and consequently compiling fpscrypto.pas fails.
--- End quote ---
Just added the missing {$mode objfpc}{$H+} directive to the fpscrypto and xlsxooxml_crypto units.
--- End quote ---
Great, thank you.
Would be possible to change lazutf8.pas (from lazutils) C-style operators to Pascal style? They are in 5 places in that file. Then it wouldn't be necessary to switch C-style operators in compiler options.
wp:
Post the issue in the bugtracker.
dseligo:
--- Quote from: wp on February 25, 2023, 10:51:05 pm ---Post the issue in the bugtracker.
--- End quote ---
https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40133
Weiss:
--- Quote from: dseligo on February 25, 2023, 06:07:35 pm ---As I plan to use fpspreadsheet in headless Linux server I am also interested in this.
I used FP IDE, FPC version 3.2.0 on Debian.
Steps:
- get fpspreadsheet 1.14 from lazarus-ccr
- get 'lazutils' directory from Lazarus' Gitlab repository
- set appropriate directories for units and include files
- because of use C-like operators (I don't like them) in lazutf8.pas they had to be enabled in Compiler options
- set Compiler Mode to 'Object Pascal extension on' ({$mode objfpc} in main source didn't work). Otherwise, Result variable isn't enabled in functions and consequently compiling fpscrypto.pas fails.
--- End quote ---
Well this is exactly where I struggle - appropriate directories for units and include files.
Whenever I try compiling the FPSpreadsheet, compilation fails because of missing files. Can we go step-by-step what do I move from Github, and where do I put it?
I need to use FPSpreadsheet in Free Pascal, just like OP.
TRon:
--- Quote from: Weiss on March 15, 2023, 04:48:33 am ---Can we go step-by-step what do I move from Github, and where do I put it?
--- End quote ---
No need for github.
1 - download: https://packages.lazarus-ide.org/FPSpreadsheet.zip
2 - download: https://sourceforge.net/projects/lazarus/files/Lazarus%20Zip%20_%20GZip/Lazarus%202.2.4/lazarus-2.2.4-0.zip
in your project directory
3 - make a directory "fps" (for FP SpreadSheet)
4 - make a directory "lazutils" (for lazutils)
5 - from FPSpreadsheet.zip, extract the contents of the directory /fpspreadsheet/source into the created "fps" directory.
6 - from lazarus-2.2.4-0.zip, extract the contents of the directory /lazarus/components/lazutils into the created "lazutils" directory
7 - write your test program (for example test_excel from user dseligo) and save the source-code to your project directory.
8 - compile, f.e. test_excel.pas from commandline in your project directroy with:
$> fpc -B -Mobjfpc test_excel.pas -Fu./fps/* -Fi./fps -Fu./lazutils
Note that you can store the extracted content from the zip files into another location if you wish to do so but that you need to modify the -Fu and -Fi options accordingly.
You could for instance store the extracted contents to a more global location (such as the location of your other 3th party installed libraries) and add the additional search path options -Fu and -Fi to your fpc.cfg file
Navigation
[0] Message Index
[#] Next page
[*] Previous page