Recent

Author Topic: Jwa needs update!  (Read 16384 times)

Anonymous

  • Guest
Jwa needs update!
« on: January 31, 2006, 01:09:48 pm »
Just using JwaWinBase for example will most likely break any application since it statically links functions like EnumDirTree or SymEnumSourceFiles which are not available even on a standard XP.

Newer Jwa packages (I just copied over one from October and compiled without any problems) have a compiler switch in windefines.inc that allows to use those units either statically or dynamically linked (which is necessary for those unavailable functions). This switch should be set by default as well.

I'll post a corresponding question in the proper forum section.

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
RE: Jwa needs update!
« Reply #1 on: January 31, 2006, 01:33:33 pm »
Strange. Since smartlinking is enabled by default on windows, those functions won't be linked into the application, unless you actually use (i.e. call) them in your program.

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
RE: Jwa needs update!
« Reply #2 on: January 31, 2006, 01:34:20 pm »
If you want this package to be updated, make a bug report (wishlist item) at www.freepascal.org/bugs.

Anonymous

  • Guest
RE: Jwa needs update!
« Reply #3 on: January 31, 2006, 01:50:22 pm »
I'm using 0.9.10 beta

Compiler option -CX was disabled (not by me), re-enabled it - no change.
Put {$smartlink on} into the one form and the lpr file - no change.
Used FileAlyzer to take a look at the import table, which shows 115 imports from imagehlp.dll

I'm definitively not using those functions from JwaWinBase. All I use is ImageLoad and ImageUnload.

Could -Sd (Delphi compability) be the problem? Or is there anything else I could do to force (or at least check) smartlinking?

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
RE: Jwa needs update!
« Reply #4 on: January 31, 2006, 02:00:54 pm »
You enable smartlinking by on the linking tab -XX.

But on second thought, I didn't make those units smartlinkable (-CX) when I created those units, (you see no libjwawinbase.a file) So smartlinking those units doesn't have any effect. I will fix that in 0.9.12.

A real good solution I cannot give you.

You can do the following:
- download a lazarus snapshot from www.de.freepascal.org/Lazarus.
- download and install fpc 2.0.2 (that installer has smartlinkable units)
- install the lazarus snapshot and change the compiler in the environment options, so that is uses the fpc 2.0.2 you installed.

Alternatively you can wait for the next win32 snapshot installer, it will propably have those smartlinkable units.

All of the above is untested, so no guarentee that it will work.

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
RE: Jwa needs update!
« Reply #5 on: January 31, 2006, 09:17:47 pm »
The current win32 snapshot on http://www.de.freepascal.org/Lazarus should have the smartlinkable units. It would be nice if you could test it.

Anonymous

  • Guest
RE: Jwa needs update!
« Reply #6 on: February 01, 2006, 03:17:42 pm »
Since the Jwa packages are not available under Linux anyway probably, I started writing my own PE structure reader (the thing I needed Jwa for). I'm halfway through already, but using ImageHlp functions under Windows would still be better propably, so thank you very much for your suggestions and work!
I'm downloading the snapshot (it's a small L in the path btw ;) ), and will let you know how it went :)

Anonymous

  • Guest
RE: Jwa needs update!
« Reply #7 on: February 01, 2006, 04:57:06 pm »
Did install Lazarus-0.9.11-20060201-win32 over the installation of Lazarus-0.9.11-20060129-win32 I had installed yesterday.
Trying a simple build: still the old error message.
Trying a complete rebuild: still the old error message.
But the libjwa*.a files are there now.

Complete removing the Lazarus folder and installing a fresh Lazarus-0.9.11-20060201-win32...
Trying a simple build: still the old error message.
Trying a complete rebuild: still the old error message.

Compiler options are:
 -S2cdgi -CX -OG2 -gl -XX -WG -vewnhi -l -FuC:\Development\Units\ -Fuc:\Apps\Lazarus\lcl\units\i386-win32\ -Fuc:\Apps\Lazarus\lcl\units\i386-win32\win32\ -Fuc:\Apps\Lazarus\packager\units\i386-win32\ -Fu. -oC:\Development\LararusTest\Test.exe -dLCL -dLCLwin32

Removed project file, opened new project, removed unit1/form1 and replaced with existing form.
Trying a simple build: still the old error message.
Trying a complete rebuild: still the old error message.

(another unrelated suggestion: have the list of installed packages sorted alphabetically)
(another unrelated thing: command line apps don't have LCL defined, intention or mistake?)

matthijs

  • Hero Member
  • *****
  • Posts: 537
Re: RE: Jwa needs update!
« Reply #8 on: February 01, 2006, 05:48:07 pm »
Quote from: "Anonymous"
(another unrelated thing: command line apps don't have LCL defined, intention or mistake?)

How can you use visual components in a command line application? Lazarus Component Library is a library of visual components, only usuable in an application with a GUI.

Or do I misunderstand you?
What's in a sig? Would my posting look less if it didnot have a sig? (Free after William S.) :)

:( Why cannot I upload my own Avatar? :(

Anonymous

  • Guest
RE: Re: RE: Jwa needs update!
« Reply #9 on: February 01, 2006, 06:37:45 pm »
To be more exact: If I use New->Application, LCL is defined, if I use New->Program, LCL is not defined. "Program" is defined as a FreePascal program managed by Lazarus. I'm looking for a compiler switch that tells me I use FPC/LCL so that I know I have to use some special LCL instead for Delphi units.

Anyway, having visual components in a command line application isn't that difficult. You just have to handle some stuff that TApplication usually does yourself. If you want an example where this is useful or needed: command line applications you want to have an alternate user interface. Like the "touch" command from Dos times - I wrote it that it would run as a command line application if parameters were given (so I could use it in batch files), but without parameters, it would show a visual user interface. So a command line app with an alternate GUI is perfectly possible ;)

(reminder to myself when I read this: create an account at this forum ;) )

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
RE: Re: RE: Jwa needs update!
« Reply #10 on: February 01, 2006, 09:00:11 pm »
Here are 2 steps that will probably acomplish what you want (be able to use LCL):

1 - Add "Interfaces" as the first unit on the uses clause of your main program file

2 - Open the Menu "Project" >>> "Compiler Options"

Now on "Other Unit Files" and also on "Other sources" go and add the two first template paths available. This will alow the compiler to search for LCL units.

Anonymous

  • Guest
RE: Re: RE: Jwa needs update!
« Reply #11 on: February 02, 2006, 02:04:48 pm »
@sekel: not sure what that should accomplish?
It's not about being able to use the LCL - that (which was not the main issue anyway) was just about a COMPILER SWITCH so that I could adjust my own code ;)

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
RE: Re: RE: Jwa needs update!
« Reply #12 on: February 02, 2006, 07:42:39 pm »
Well ... that was about this small comment:

Quote
(another unrelated thing: command line apps don't have LCL defined, intention or mistake?)


Not about the main issue.

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
RE: Re: RE: Jwa needs update!
« Reply #13 on: February 02, 2006, 09:51:34 pm »
I can compile a program with uses JwaWinBase;

It runs also without error.

Try again with 20060202?

Anonymous

  • Guest
RE: Re: RE: Jwa needs update!
« Reply #14 on: February 03, 2006, 10:57:30 am »
20060202 has already been replaced with 20060203. Since 20060203 does not compile this project (unit InterfaceBase missing - without me making any changes since I successfully compiled it quarter of an hour ago with 20060201), I'll probably wait for tomorrows daily ;)

 

TinyPortal © 2005-2018