Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2007-06

how to compile (PWU) project from command line

11 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

I feel quite embarrassed asking this. :) I am clearly a victim of relying on programming tools to much (Lazarus) and forgot how to use the compiler directly from the command line.

I downloaded PWU 1.6 and want to try some of the extra examples. Lets take the code highligher example (pas to html converter).

Inside the /hiliter directory there is some source code (*.pas) and a project/program file (*.dpr) and a fpc.cfg file as show below:

cat fpc.cfg
-Fu../compact-utils/
-Fu../tokenizer/FakeObject/dyn/
-Fu../tokenizer/FakeObject/
-Fu../../main/
-Fu../../extras/strwrap1/
-Fu../../extras/rapid-html/

I have my FPC 2.1.3 bin directory in my path, so can execute ppc386 from anywhere. I tried to compile the hiliter program using the following, but without success.

ppc386 pastohtm.dpr

ppc386 pastohtm.dpr
pastohtm.dpr(16,1) Fatal: Can't find unit System
Fatal: Compilation aborted

Now I have a fpc.cfg in my /etc directory which is used when I compile FPC itself or Lazarus. That works fine. So how do I get ppc386 to combine the /etc/fpc.cfg and the ./fpc.cfg so all the relevant search paths are set and the program can compile?
So is there something different I need to do first, like create a Makefile or something. The hiliter example doesn't come with a Makefile or makefile.fpc

Many thanks in advance,
- Graeme -

Reply by email

Marc Pertron
to Graeme Geldenhuys
Graeme Geldenhuys wrote 8 lines
Hi, I feel quite embarrassed asking this. :) I am clearly a victim of relying on programming tools to much (Lazarus) and forgot how to use the compiler directly from the command line. I downloaded PWU 1.6 and want to try some of the extra examples. Lets take the code highligher example (pas to html converter).

Hi,
Some of the sample were bogus. It seems they use Win32 to develop, so sometime there is a few change to apply to make the example working. Did you try to compile a simple hello world from command line, to be sure that's fpc the problem ?
Also, you should add "-vewnh" at the end of fpc.cfg to have more info I've written a small e-commerce website using PWU, it's *very* fast, i will release the code GPL after some cleaning. (99% of the time is reading MySQL database with PDO, so i'm thinking about using binary files storing the data)
Marc

Reply by email

Graeme Geldenhuys
to Marc Pertron

Hi Marc,

I used the -vt parameter to see where FPC is looking. Then after reading the User's Guide (which I should have done in the first place) I found my problem. FPC used the local fpc.cfg file and then ignores my global fpc.cfg file in my home directory.

Using the following solves the problem.....

fpc @~/.fpc.cfg pastohtm.dpr

Regards,
- Graeme -

Marc Pertron wrote 24 lines
Graeme Geldenhuys a écrit : > Hi, > > I feel quite embarrassed asking this. :) I am clearly a victim of > relying on programming tools to much (Lazarus) and forgot how to use > the compiler directly from the command line. > > I downloaded PWU 1.6 and want to try some of the extra examples. Lets > take the code highligher example (pas to html converter). Hi, Some of the sample were bogus. It seems they use Win32 to develop, so sometime there is a few change to apply to make the example working. Did you try to compile a simple hello world from command line, to be sure that's fpc the problem ? Also, you should add "-vewnh" at the end of fpc.cfg to have more info I've written a small e-commerce website using PWU, it's *very* fast, i will release the code GPL after some cleaning. (99% of the time is reading MySQL database with PDO, so i'm thinking about using binary files storing the data) Marc _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email

Graeme Geldenhuys
to Marc Pertron: Some of the sample were bogus. It seems they use Win32 to develop, so sometime there is a…
Marc Pertron wrote
Some of the sample were bogus. It seems they use Win32 to develop, so sometime there is a few change to apply to make the example working.

Do you know what email address I can use to report problems? L505 (Lars) uses a few email addresses in the mailing list so not user which one is a real one to use.

Just trying to compile the 'hiliter' example, I have found 3 problems and the last one is a show stopper, so can't continue. And this is with the release version of PWU 1.6.0.2 downloaded from SourceForge.

* Tokenizer couldn't compile under Linux. It had syntax errors.
* PCharUtils unit couldn't compile it had syntax errors.
* and now finally ChrStream.pas unit can't compile because it is missing a include file which isn't part of the downloaded source!!! So now I'm stuck.

I must say, I'm not having a very good first impression! And I thought of using PWU as a trial for a internal web app of ours.

Regards,
- Graeme -

Reply by email

Marc Pertron
to Graeme Geldenhuys
Graeme Geldenhuys wrote
Do you know what email address I can use to report problems? L505 (Lars) uses a few email addresses in the mailing list so not user which one is a real one to use.

I asked some questions on
https://lists.sourceforge.net/lists/listinfo/pascal-webdev-users Lars answers quite fast.

Show quoted text 12 lines
Just trying to compile the 'hiliter' example, I have found 3 problems and the last one is a show stopper, so can't continue. And this is with the release version of PWU 1.6.0.2 downloaded from SourceForge. * Tokenizer couldn't compile under Linux. It had syntax errors. * PCharUtils unit couldn't compile it had syntax errors. * and now finally ChrStream.pas unit can't compile because it is missing a include file which isn't part of the downloaded source!!! So now I'm stuck. I must say, I'm not having a very good first impression! And I thought of using PWU as a trial for a internal web app of ours.

I had the same too.
After looking a little, the project code is quite good, even if there is no documentation, and the exemples are far too complex to see in a few minutes how PWU works.
A lot of things (cookies, etc) are handled but not documented. Regards,
Marc

Reply by email

Graeme Geldenhuys
to Marc Pertron
Marc Pertron wrote
I asked some questions on https://lists.sourceforge.net/lists/listinfo/pascal-webdev-users Lars answers quite fast.

Thanks, didn't know about that mailing list.

After looking a little, the project code is quite good, even if there is no documentation, and the exemples are far too complex to see in a few minutes how PWU works.

Do you know if there are any unit tests or something I can run to see what actually works under Linux? As I mentioned earlier, I had a few units that doesn't even compile in the release version.

Graeme.

Reply by email

Marc Pertron
to Graeme Geldenhuys
Graeme Geldenhuys wrote 5 lines
Do you know if there are any unit tests or something I can run to see what actually works under Linux? As I mentioned earlier, I had a few units that doesn't even compile in the release version.

All should work under Linux. I remember i had to correct 2-3 typo. If it didn't compile at all, i can mail you the 1.6.0.1 that i use (I only use Linux)
Regards,
Marc

Reply by email

Marc Pertron
to Graeme Geldenhuys: Thanks, didn't know about that mailing list. Do you know if there are any unit tests or…
Graeme Geldenhuys wrote 5 lines
Do you know if there are any unit tests or something I can run to see what actually works under Linux? As I mentioned earlier, I had a few units that doesn't even compile in the release version.

All should work under Linux. I remember i had to correct 2-3 typo. If it didn't compile at all, i can mail you the 1.6.0.1 that i use (I only use Linux)
Regards,
Marc

Reply by email

L
Show quoted text 12 lines
Just trying to compile the 'hiliter' example, I have found 3 problems and the last one is a show stopper, so can't continue. And this is with the release version of PWU 1.6.0.2 downloaded from SourceForge. * Tokenizer couldn't compile under Linux. It had syntax errors. * PCharUtils unit couldn't compile it had syntax errors. * and now finally ChrStream.pas unit can't compile because it is missing a include file which isn't part of the downloaded source!!! So now I'm stuck. I must say, I'm not having a very good first impression! And I thought of using PWU as a trial for a internal web app of ours.

My first time using FPC I wasn't impressed too. ALl this nonsense about MODE OBJFPC and junk, and all the dll bugs and dso bugs. Then I got used to it and don't use MODE Delphi any more.

Anyway, give it some time, ask us questions on the mailing list and we will repair any issues you are experiencing :-)

The hiliter was extra lint that wasn't supposed to be included in 1.6.0.2 release. I forgot to clean it out in the Zip package.

It is meant to be stored separately as a downloadable demo on sourceforge:

http://sourceforge.net/project/showfiles.php?group_id=145841&package_id=161336&release_id=464999

You should use pwumain rather than dynpwu to start out. Dynpwu is a bit clever and complex for newcomers - it's almost one of those things that needs to be introduced later once you have been working with the utilities for a few months.

Simpler examples are being worked on. More automated Make/Testing/Release system is being worked on so that the release will break on issues instead of lint being left inside the release.

We opened up a separate mailing list for Powtils/PSP so that we do not pollute the FPC mailing lists with too much web talk. I see you've joined - thanks. There is also the PasForum - it is not checked as often as the mailing lists.

You should be able to use Lazarus and MSEIDE, I used to use them all the time. Just change the paths in your lazarus dialog to resemble the fpc.cfg paths shipped with the demos.

Lars

Reply by email

Graeme Geldenhuys
to L
Anyway, give it some time, ask us questions on the mailing list and we will repair any issues you are experiencing :-)

As I mentioned earlier. I don't give up that easy! Where's the fun in that? :-)

You should use pwumain rather than dynpwu to start out. Dynpwu is a bit clever and complex for newcomers - it's almost one of those things that needs to be introduced later once you have been working with the utilities for a few months.

Thanks for the heads-up! I am about to write quite a few web apps and thought I could same on disk space, etc.... Though creating larger standalone apps is not a 'll switch to using pwumain for now.

You should be able to use Lazarus and MSEIDE, I used to use them all the time. Just change the paths in your lazarus dialog to resemble the fpc.cfg paths shipped with the demos.

I was thinking of creating a Lazarus package (.lpk) file where I can define all the search paths etc. Then just assign that package as a requirement to any of my web projects. No need to fiddle with paths again. Lazarus packages are great in this way!

Regards,
- Graeme -

Reply by email