FoxPro Programming
Trouble with INCLUDES
Gravatar is a globally recognized avatar based on your email address. Trouble with INCLUDES
  Russell Campbell
  All
  Apr 23, 2017 @ 03:04pm

Today, when trying to use wwHTTP, I kept getting an error that said "WWVERSION_NUMBER is not found." That definition is in the C:\WCONNECT\WCONNECT.H file. I have the C:\WCONNECT folder in my path (confirmed right before I try to instantiate the oHTTP object). I also had WCONNECT.H in the INCLUDE file for my class that instantiates the oHTTP object (accessed from the CLASS menu when the class is open and selected). The INCLUDE file for the class referenced another include file, but that include file included WCONNECT.H. Include files can be a bit problematic in that if you change the INCLUDE file, but don't change the class/prg/etc. that references it, the change to the INCLUDE file will not get compiled in. So I made sure I was changing the class that referenced it. I've done a recompile all, I've exited and restarted VFP, I've included the WCONNECT.H contents in another INCLUDE file that I knew was getting included and still, no matter what, I get the "WWVERSION_NUMBER is not found" error. Aggravating! Finally, as a kludge, I took the WCONNECT.H contents and stuck them at the top of wwHTTP.PRG. That worked and at least I was able to test my code and make sure it worked. It did, but I don't want to keep using that kludge and I'm trying to figure out why WCONNECT.H is seemingly not being included. The VFP help docs do say "The maximum number of compiler levels for #INCLUDE is 4." But what does that mean? You can't nest INCLUDES more than 4 levels deep? You can't have more than 4 include files? Something is killing the process here and I can't figure it out. Any suggestions would be appreciated.

Gravatar is a globally recognized avatar based on your email address. re: Trouble with INCLUDES
  Russell Campbell
  Russell Campbell
  Apr 23, 2017 @ 07:17pm

Nevermind, it was finding an older version of WCONNECT.H along the path. Doh!

© 1996-2024