Recent

Author Topic: csvdocument won't compile in Lazarus 1.0 64bits  (Read 9224 times)

lazarro

  • New Member
  • *
  • Posts: 16
csvdocument won't compile in Lazarus 1.0 64bits
« on: September 17, 2012, 07:17:41 pm »
Hi, I need to load a CSV document into a StringGrid. Since I am getting a lot of trouble doing this simple thing, I wanted to give a try with csvdocument package.

So I downloaded and followed the instructions but when trying to compile I get these two errors:
E:\csvdocument\csvdocument.pas(1006) Error: Assembler ml64.exe not found, switching to external assembling

E:\csvdocument\csvdocument.pas(1006) Error: Creation of Dynamic/Shared Libraries not supported

Any ideas?
I am running Lazarus 1.0 on Windows 7 64b
« Last Edit: September 18, 2012, 06:33:55 pm by lazarro »

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: csvdocument won't compile
« Reply #1 on: September 17, 2012, 07:31:07 pm »
Sorry it doesn't work.
Please indicate next time exactly which instructions you tried to follow... "the instructions" is a bit vague.
Edit: do you mean these instructions:
http://wiki.lazarus.freepascal.org/CsvDocument#Loading_a_csv_document_into_a_StringGrid

Are those instructions telling you to compile a .dll or something? This is what this error seems to imply:
Quote
E:\csvdocument\csvdocument.pas(1006) Error: Creation of Dynamic/Shared Libraries not supported

You probably are trying to compile for 64 bit? The errors seem to indicate you are missing a 64 bit assembler. Are you using the 64 or 32 bit Lazarus 1.0 version?

Edit: Depending on your answers, you may need to file a bug report against Lazarus 1.0 or csvdocument.
« Last Edit: September 17, 2012, 07:35:16 pm by BigChimp »
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: csvdocument won't compile
« Reply #2 on: September 17, 2012, 07:57:59 pm »
Just compiled the latest stable csvdocument with Lazarus 64 (1.1/trunk from svn, and FPC 2.7.1 while you are probably using FPC 2.6.0 - so those are differences with your setup).
Code: [Select]
unit csvtestunit;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,csvdocument;

type

  { TForm1 }

  TForm1 = class(TForm)
    procedure FormClick(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.lfm}

{ TForm1 }

procedure TForm1.FormClick(Sender: TObject);
var
  c: TCSVDocument;
begin
  c:=TCSVDocument.Create;
  c.Free;

end;

end.
It compiles and runs fine.

Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

lazarro

  • New Member
  • *
  • Posts: 16
Re: csvdocument won't compile
« Reply #3 on: September 17, 2012, 08:08:13 pm »
Hi BigChimp, thanks a lot for your reply.

Details:
I downloaded and installed "lazarus-1.0-fpc-2.6.0-win64.exe" (1) so I assume that it is the 64b version. So yes I am using FPC 2.6.0 should that pose a problem in this case?

I got csvdocument-0.4.zip from
http://sourceforge.net/projects/lazarus-ccr/files/CsvDocument/CsvDocument%200.4/csvdocument-0.4.zip/download

I follow the instructions (I mean the "Installation and usage") instructions (2)
------------------------------
1. Open "csvdocument_package.lpk" file from Lazarus IDE using menu: "Package -> Open package file (.lpk) ...".
2. Compile the package.
3. Open your project.
4. Add the package as a requirement to your project using Project Inspector.
------------------------------

So I open Lazarus, close all editor file, go to Package - Open Package File (.lpk), choose the csvdocument_package.lpk file and then press "compile" and get the error messages I posted before.

What I am doing wrong? Do I need the new FPC for this to work?

1. http://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Lazarus%201.0/lazarus-1.0-fpc-2.6.0-win64.exe/download
2. http://wiki.lazarus.freepascal.org/CsvDocument#Installation_and_usage

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: csvdocument won't compile
« Reply #4 on: September 18, 2012, 10:10:17 am »
@somebody else with Lazarus 1.0 x64 Windows: can
Thanks lazarro for the very clear explanation.
I don't think you're doing anything wrong:
 you're using the latest released Lazarus version, you use the latest released csvdocument version and you follow the csvdocument installation instructions.

The problem must be in either csvdocument or your Lazarus version.

Quote
So I open Lazarus, close all editor file, go to Package - Open Package File (.lpk), choose the csvdocument_package.lpk file and then press "compile" and get the error messages I posted before.
Just did that with the same stable csvdocument but with my newer Lazarus/FPC version. No errors.
Also did it with Lazarus 1.0 x86 on Windows - no problem
So the problem lies probably with Lazarus 1.0 x64.

Could people with Windows x64 Lazarus (1.0 or trunk) and FPC 2.6.x confirm or deny this error?
lazarro, perhaps you could download a recent x64 snapshot (with the FPC 2.6.1 compiler; that has fixes applied to them compared to the stable but static 2.6.0 version) from the snapshots page and run it?

Of course, you could also switch to x86 Lazarus 1.0 which should run fine on your system.

If you don't want to overwrite your existing Lazarus installation, please use --primary-config-path
see: http://wiki.lazarus.freepascal.org/Multiple_Lazarus#Solution_for_separating_instances_using_multiple_config_dirs
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

lazarro

  • New Member
  • *
  • Posts: 16
Re: csvdocument won't compile
« Reply #5 on: September 18, 2012, 05:47:46 pm »
Hi BigChimp,

I uninstalled Lazarus 64b and installed 32bits. And it works now. I even compiled your csvtestunit example (althought the stringgridutil one gives me error).

So does this mean that the Lazarus 64b has something wrong?

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: csvdocument won't compile
« Reply #6 on: September 18, 2012, 05:56:07 pm »
@Lazarro, yes, it could be.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

lazarro

  • New Member
  • *
  • Posts: 16
Re: csvdocument won't compile
« Reply #7 on: September 18, 2012, 05:59:18 pm »
How is the procedure to report this? What should I do?

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: csvdocument won't compile
« Reply #8 on: September 18, 2012, 06:08:11 pm »
@lazarro, normally you would go to the bugtracker (see link to the left) and report it, with the description of what you did (or a small sample program).
Actually, you can still do that, with a link to this forum thread for details.

In this case, it works on Lazarus trunk+FPC trunk x64, but not on your Laz 1.0+FPC 2.6.0
So it probably has been fixed the period between Lazarus 1.0 and my Lazarus trunk or FPC 2.6.0 and FPC trunk.

If it is a bug related to FPC (which it seems, it doesn't have seem to have much to do with GUI controls but more with the compiler etc), testing with Lazarus 1.0 (or Lazarus trunk)+FPC 2.6.1 (fixes 2.6) may be handy to confirm this....

I'd invite others who have Lazarus and FPC x64 to test with their versions and report back...
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: csvdocument won't compile
« Reply #9 on: September 18, 2012, 06:22:16 pm »
That's my fault. Please wait; I'll post in a while.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: csvdocument won't compile
« Reply #10 on: September 18, 2012, 06:25:53 pm »
Try this version of csvdocument instead. It has a MaxColCount property for TCSVParser as well. I'll submit the changes to the maintainers.

Edit: Vladimir Zhirov has updated the csvdocument development version so you can use that one now. If you don't have svn, you can simply point your webbrowser at https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/components/csvdocument and download csvdocument.pas
« Last Edit: September 19, 2012, 10:41:45 am by BigChimp »
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

lazarro

  • New Member
  • *
  • Posts: 16
Re: csvdocument won't compile
« Reply #11 on: September 18, 2012, 06:32:16 pm »
Thanks! I'll try that. Please note that I moved the post to the other thread "Update: the best way of loading a CSV in Lazarus":
http://forum.lazarus.freepascal.org/index.php/topic,18249.msg102786.html#msg102786
« Last Edit: September 18, 2012, 06:34:49 pm by lazarro »

LuizAmérico

  • Sr. Member
  • ****
  • Posts: 457
Re: csvdocument won't compile in Lazarus 1.0 64bits
« Reply #12 on: October 01, 2012, 11:41:53 pm »
This error occurs when trying to compile a project under 64bit with the -al option (create assembler file)
To resolve just remove from the package such option. Look for Compiler Options/Other in the package options

greertr

  • Full Member
  • ***
  • Posts: 113
    • Virtual Pilot Dashboard
Re: csvdocument won't compile in Lazarus 1.0 64bits
« Reply #13 on: June 04, 2013, 03:03:15 am »
This is a great thread and was very helpful to me...everything worked as advertised -- I just finished up a project that uses the CSV to stringrid and CSVDOC/Jans2 for a fairly important data application at work.  I used two Jans2 csvbases to drive two diff data sets with a radio button switch config.  Soon, I plan to expand the project to accommodate five data bases in CSV format.
« Last Edit: June 04, 2013, 03:05:18 am by greertr »

matthius

  • Full Member
  • ***
  • Posts: 155
  • Creating VRAD...
    • LIBERLOG - Développement rapide
Re: csvdocument won't compile in Lazarus 1.0 64bits
« Reply #14 on: March 24, 2021, 12:52:15 pm »
Ok there were russian caracters.

Just copy paste the csvdocument unit into a text editor on the same future unit.

Here is the component result :
https://sourceforge.net/projects/csvdocument/files/csvdocument.7z/download
M. GIROUX
13 rue Tanguy PRIGENT
35000 RENNES - France
(33)(0)2 23 46 06 54
http://liberlog.fr

 

TinyPortal © 2005-2018