Sign in Join

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

Mailing lists / lazarus / 2016-04

Trying to work around "Illegal character in format string"

9 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

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

Alan Corey

I guess I've got to get to the bottom of why I get this ?Illegal character in format string? error under OpenBSD. I seem to be able to work around it in programs I might write by taking the Run ? Clean up Build Files -> Clean up and Build approach. But I don't seem to be able to rebuild the IDE to add help packages

Trying to install chm help using the directions at http://wiki.freepascal.org/Installing_Help_in_the_IDE

My Lazarus installed itself into /usr/local/share/lazarus

I built lhelp.ini by loading it into the ide and doing a clean and build. Now I have an /usr/local/share/lazarus/components/chmhelp/lhelp/lhelp executable.

Look for chmhelppkg: doing "save and rebuild IDE" to install it, got "illegal character in format string". Did my usual fix, restarted the ide, but it still shows as not installed. I need to rebuild the IDE I think, but the "save and rebuild" option is grayed out now. Clicked the Help button for hahas. http://wiki.lazarus.freepascal.org/IDE_Window:_Installed_Packages opens in Opera (why Opera not Firefox, Firefox is the default? Internal setting I guess)

Tools -> Build Lazarus from http://wiki.freepascal.org/Install_Packages "Illegal character in format string" again. "clean and build", rebuilt lhelp apparently. Build with normal IDE gets me the same error, I'm in a loop. A similar thing happens when I try to install ExternHelp 1.3

Looking at configuring the build. lazarus-ide is in /usr/local/bin so I browsed to that
as the target directory. gtk2, i386, openbsd. Verbose, restart after build. Click build, watch. After "Compiling IDEIntf 1.0" the Illegal character error is back. Click OK, IDE is still open so I close and reopen.

Package -> Install Packages. chmhelp still has a green + and isn't installed.

Trying inf help. Going to
http://sourceforge.net/projects/fpgui/files/fpGUI/Documentation/

I ended up with 1 renamed zip which has in it fcl.inf, fpc_lang_ref.inf, fpgui.inf, rtl.inf all dated Apr 4 2015

Created /usr/local/share/lazarus/components/infhelp1 and copied the infs in there. How to connect to them?

Back to rebuilding the ide. Built lazbuild, trying lazbuild -B lazarus.lpi: 106110 lines compiled, 12.6 sec
8 warning(s) issued
64 hint(s) issued
"Compiling package SynEdit 1.0" completed
Start IDE, look under Packages, the help packages still aren't installed.

I don't know where this illegal character error is coming from, but I didn't get it when I built and installed initially.

Credit is the root of all evil. - AB1JX -------------- next part -------------- A non-text attachment was scrubbed... Name: illchar.gif Type: image/gif Size: 3947 bytes Desc: not available URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160409/f8ecc737/attachment.gif>

Reply by email

Michael Thompson
to Alan Corey
Alan Corey wrote 5 lines
I don't know where this illegal character error is coming from, but I didn't get it when I built and installed initially. From the screen shot. Lazarus IDE v1.0,14 is very old. I'm guessing you

installed it directly from your distribution repository? They're notorious for not keeping FPC/Laz up to date.

The first thing to do would be try a newer version

Any of these should help.

http://wiki.freepascal.org/Installing_Lazarus
https://sourceforge.net/projects/lazarus/files/
http://www.getlazarus.org/

Personally, I'd install FPC from a SourceForge, then I'd use SVN to get latest as per the wiki.

Good luck :-)

Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160410/299f7c10/attachment.html>

Reply by email

Giuliano Colla
to Alan Corey: I guess I've got to get to the bottom of why I get this ?Illegal character in format…

Il 09/04/2016 21:00, Alan Corey ha scritto:

Show quoted text 5 lines
I guess I've got to get to the bottom of why I get this ?Illegal character in format string? error under OpenBSD. I seem to be able to work around it in programs I might write by taking the Run ? Clean up Build Files -> Clean up and Build approach. But I don't seem to be able to rebuild the IDE to add help packages

If your locale is not English, it might be an error in one translation file. You may try to switch your Lazarus to English:
Tools->Options->Environment->Desktop and set Language to English, and then retry.

Otherwise consider to update your Lazarus to a more recent version, because your 1.0.14 is quite old.

Giuliano

Reply by email

Graeme Geldenhuys
to Alan Corey: I guess I've got to get to the bottom of why I get this ?Illegal character in format…
Alan Corey wrote

Yes that is a bit confusing. I used to put documentation in the "Documentation" directory on SourceForge. Now I put them in the same directory as the fpGUI release, because it is part of the release process. The latest INF docs can be found here:

https://sourceforge.net/projects/fpgui/files/fpGUI/1.4.1/

Filename: fpgui_docs_inf_1.4.1.tar.gz (1.9MB)

I've updated the website to reflect that.

Created /usr/local/share/lazarus/components/infhelp1 and copied the infs in there. How to connect to them?

You can place the INF files in any directory of your choice - I've got mine in a directory off my $HOME directory. No need for them to be in a globally shared (multi-user) location.

For further instructions on setting up DocView with various IDE's and Editors, it is documented on this web page:

http://fpgui.sourceforge.net/docview_ide_integration.shtml

The DocView help file itself [docview.inf] explains the various ways you can use DocView and all possible command line parameters.

In your case above, you can simply add the parameter value:

/usr/local/share/lazarus/components/infhelp1/ -k $CurToken

in the External Tools entry. That is what the Delphi 7 instructions used.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Graeme Geldenhuys
to Giuliano Colla: Il 09/04/2016 21:00, Alan Corey ha scritto: If your locale is not English, it might be an…
Giuliano Colla wrote
Otherwise consider to update your Lazarus to a more recent version, because your 1.0.14 is quite old.

:-) I still have 0.9.30 here in one of my Windows VM's. It still works great! If it ain't broken, don't fix it. ;-)

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Giuliano Colla
to Graeme Geldenhuys

Il 10/04/2016 02:00, Graeme Geldenhuys ha scritto:

:-) I still have 0.9.30 here in one of my Windows VM's. It still works great! If it ain't broken, don't fix it.;-)

Me too, in one of my USB disks. I happily keep it alive to support released software, but AFAIR it didn't handle too well chm help, and version 1.0 wasn't much better.

An "Illegal character in format string" error message makes it look a bit broken, IMHO ;-)

Giuliano

Reply by email

Alan Corey

OK, I downloaded 1.6 overnight and installed it, haven't seen the illegal character error since.

Nice to add: If the OS is one of the BSDs, Tools -> Options -> Environment -> 'Make' executable should default to gmake on install. Or just look for gmake in the path and default to it if found. OpenBSD's make gives an error on -w as an argument which rebuilding the IDE by the buttons at least uses.

There's no 'make uninstall' so I renamed my old lazarus directory and installed beside it. Should I have maybe removed ~/.lazarus?

I still can't get the chmhelp package to install, even after upgrading, rebuilding the IDE, restarting. It's mentioned in ~/.lazarus/idemake.cfg and ~/.lazarus/staticpackages.inc but it still shows with a green +.

Should I be able to get to the point where I can do ctrl-F1 on a keyword in the editor to bring up help on it? F1 in a field in Object Inspector is working to bring up htmlhelp.

Whaddya mean read the documentation? It doesn't even have a manpage. :)

Credit is the root of all evil. - AB1JX

Reply by email

Juha Manninen
to Alan Corey
Alan Corey wrote
Should I have maybe removed ~/.lazarus?

The local config is backwards compatible and updated automatically but soemtimes after experimenting a lot it can become corrupt. Then you can delete it.

I still can't get the chmhelp package to install, even after upgrading, rebuilding the IDE, restarting. It's mentioned in ~/.lazarus/idemake.cfg and ~/.lazarus/staticpackages.inc but it still shows with a green +.

You installed to a write protected dir /usr/local/share/lazarus, right? When you rebuild the IDE as normal user, the new binary goes to your home dir under ~/.lazarus.
Instead of "lazarus" you should run "startlazarus". It checks where the latest binary is and starts it for you.
I am sure it was documented somewhere ...

Juha

Reply by email

Graeme Geldenhuys
to Giuliano Colla: Il 10/04/2016 02:00, Graeme Geldenhuys ha scritto: Me too, in one of my USB disks. I…
Giuliano Colla wrote
but AFAIR it didn't handle too well chm help

Then lucky I only use INF help with DocView. It doesn't matter what version of Lazarus I use, and doesn't extra packages to be installed in Lazarus (thus a IDE recompile). DocView all the way! :)

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email