West Wind Internet and Client Tools
Client 6.22.0 Variable wwversion_number not found
Gravatar is a globally recognized avatar based on your email address. Client 6.22.0 Variable wwversion_number not found
  Canonian
  All
  Mar 20, 2024 @ 04:51am
#include wconnect.h
DO wwHttp
LOCAL loHttp as wwHttp OF wwhttp.prg
loHttp = CREATEOBJECT("wwHttp")
lcHtml = loHttp.Get("https://microsoft.com")
? lcHtml

I'm running this from the root folder where wwclient 6.22.0 sits. Using the default config.fpw that is in that folder containing SCREEN=ON TITLE=West Wind Client Tools 6.22 EXCLUSIVE=OFF CENTURY=ON STRICTDATE=0 MEMOWIDTH=150 _vfpstart= PATH= .\classes;.\tools;.\console;.\wwipstuff_samples;.\wwipstuff_samples\wwdotnetbridge;

So everything is in the current default folder and path is set to find anything it could possibly need. As soon as I try to create the http object "loHttp = CREATEOBJECT("wwHttp")" The error about the Variable wwversion_number not found in wwhttp.prg on this line of code "cversion = TRANSFORM(WWVERSION_NUMBER)"

Gravatar is a globally recognized avatar based on your email address. re: Client 6.22.0 Variable wwversion_number not found
  Rick Strahl
  Canonian
  Mar 20, 2024 @ 09:43am

wconnect.h has to be in your FoxPro path when you are compiling or running your code inside of the IDE.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Client 6.22.0 Variable wwversion_number not found
  Canonian
  Rick Strahl
  Mar 20, 2024 @ 10:19am

That's in the default folder I'm running the program from and foxpro default folder. I'm pretty sure the current folder is by default in the path fox kooks for files.

Gravatar is a globally recognized avatar based on your email address. re: Client 6.22.0 Variable wwversion_number not found
  Rick Strahl
  Canonian
  Mar 20, 2024 @ 01:29pm

If that line is not compiling wconnect.h, it is not being included. Double check and make sure. Do FULLPATH("wconnect.h") from your start folder and make sure it's found and returns a valid path and then explicitly recompile the file.

lcFile =  FULLPATH("wconnect.h")
? lcFile
? FILE(lcFile)  && should be .t.

compile wwhttp.prg  && should show no errors

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Client 6.22.0 Variable wwversion_number not found
  Canonian
  Rick Strahl
  Mar 21, 2024 @ 02:20am

Thanks for the replies, yes it's .t.

Gravatar is a globally recognized avatar based on your email address. re: Client 6.22.0 Variable wwversion_number not found
  Canonian
  Canonian
  Mar 21, 2024 @ 03:24am
#include H:\FoxPro\wwclient-6.22.0\wconnect.h
DO H:\FoxPro\wwclient-6.22.0\classes\wwhttp
LOCAL loHttp as wwHttp OF wwhttp.prg
loHttp = CREATEOBJECT("wwHttp")
lcHtml = loHttp.Get("https://microsoft.com")
? lcHtmlwwHttp
LOCAL loHttp as wwHttp OF wwhttp.prg
loHttp = CREATEOBJECT("wwHttp")
lcHtml = loHttp.Get("https://microsoft.com")
? lcHtml

I have changed the program and specified the exact path, still the same error.

Gravatar is a globally recognized avatar based on your email address. re: Client 6.22.0 Variable wwversion_number not found
  Tore Bleken
  Canonian
  Mar 21, 2024 @ 06:18am

Are you absolutely sure that you have re-compiled the files?

Gravatar is a globally recognized avatar based on your email address. re: Client 6.22.0 Variable wwversion_number not found
  Canonian
  Tore Bleken
  Mar 21, 2024 @ 07:40am

No I'm not! Actually I did run a compile command, however sometimes Fox just does not do it unless you delete the FXP. I did that and boom got it working. Thank you!

Gravatar is a globally recognized avatar based on your email address. re: Client 6.22.0 Variable wwversion_number not found
  Mike McDonald
  Canonian
  Mar 21, 2024 @ 07:52am

Look in your wwHTTP.prg file and see how it references wconnect.h - it should be done on the first line as..

#INCLUDE "wconnect.h"

It's wwHTTP.prg that needs to 'include' the .h file, not necessarily your test.prg file.

You don't want to have to specify a path to wconnect.h within any of the ww*.prg files - the appropriate .h file should be available through the VFP path.

Mike McDonald

Gravatar is a globally recognized avatar based on your email address. re: Client 6.22.0 Variable wwversion_number not found
  Rick Strahl
  Canonian
  Mar 21, 2024 @ 09:26am

The issue isn't running your program - the issue is that when you compiled wwHttp.prg wconnect.h was perhaps not available. That's why I asked you to recompile the PRG explicitly...

Dependent on your SET DEVELOPMENT setting .prg files can autocompile or not after changes and re-running the prg. If you run an EXE or APP you have to recompile every time.

Compile should always do something - either it works, or you get an error and a <compiledFile>.err that contains the error message. Status bar should show an error or success message on compilation with set notify on.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Client 6.22.0 Variable wwversion_number not found
  Canonian
  Rick Strahl
  Mar 21, 2024 @ 09:35am

Thanks everyone, learned something new. I usually have no problems using these, something was not quite right. Above Mike mentioned my code did not need the include command and wwHTTP.prg is where the include should be. I removed it from my program and sure enough it's working fine. In the end for whatever reason deleting the FXPs and issuing a compile wwhttp, compile wconnect.h (probably did not need to do this one) got things working.

© 1996-2024