Author Topic: OT (Sort of): Visual Studio  (Read 867 times)

JTaylor

  • Pundit
  • *****
  • Posts: 1831
    • Data & Stuff Inc.
OT (Sort of): Visual Studio
« on: December 07, 2020, 02:52:16 pm »
I have a weird problem that maybe someone can shed some light on.   I noticed an issue with my SQLite Extender and made a very minor change and went to compile.  I got 52 errors all pointed at the sqlite3.c file.  I undid the change but same problem.  I went back through all my previous releases, exact same errors.  Even with older releases being a different version of SQLite.  I even updated to latest version of SQLite library.  Same errors.

I have not updated Visual Studio (2019).   I don't recall any windows updates since I last compiled.   Nothing has changed with the source.  Especially all my previous releases which, obviously, compiled.  Also, I know this one compiled fine prior to this last attempt.

I am getting errors like:

undeclared indentifier
nRef is not a member of ...
left of '->nMin' must point to struct/union
'sqlite3PcacheRefCount': too few arguments for call   

Any ideas on what could cause such an issue?  I am out of ideas.

Jim

ChuckC

  • Sr. Member
  • ****
  • Posts: 393
Re: OT (Sort of): Visual Studio
« Reply #1 on: December 07, 2020, 04:11:29 pm »
Punting on 1st down here...

Did you try doing a "Clean" operation on the project before doing a build?

Sometimes, incremental build information gets corrupted and will give all kinds of weird build errors until you do a clean, which removes all of the incremental build state information.

JTaylor

  • Pundit
  • *****
  • Posts: 1831
    • Data & Stuff Inc.
Re: OT (Sort of): Visual Studio
« Reply #2 on: December 07, 2020, 05:12:20 pm »
I had not as I didn't know about that option but just tried it.  Also deleted my Release folder as well.  Same problem.

Thanks for the reply.

Jim

td

  • Tech Support
  • *****
  • Posts: 4087
    • WinBatch
Re: OT (Sort of): Visual Studio
« Reply #3 on: December 07, 2020, 10:44:59 pm »
The error suggests that you have a missing structure declaration or something similar.  There are many, many reasons for that one.   You could examine the source at the point of error then perform a search in the header files for the declaration of the data type. Once you have that you should be able to figure out why that declaration isn't being found in the location of the error.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

JTaylor

  • Pundit
  • *****
  • Posts: 1831
    • Data & Stuff Inc.
Re: OT (Sort of): Visual Studio
« Reply #4 on: December 08, 2020, 06:04:05 am »
Thanks.  Will pursue that.   The odd thing though, as mentioned, is that it is also happening in all my old releases which are completely separate copies and which worked fine when I copied them.   If it was just this one it would make sense I accidentally screwed up something.   Just not sure why the exact same issue would appear across 10 different copies at the same time.   Appreciate the reply though and will see where that leads.

Thanks again.

Jim

ChuckC

  • Sr. Member
  • ****
  • Posts: 393
Re: OT (Sort of): Visual Studio
« Reply #5 on: December 08, 2020, 07:25:04 am »
Is there any chance that the PATH [or some other] environment variable is being relied upon to find a header file at build time?  I'm wondering if perhaps a change to the search list in PATH's value resulted in the build process no longer being able to find a required header file with the structure definition that's missing.  Possibly related is build solution/project configurations and/or conditional compilation constructs that are affected by the environment outside of Visual Studio.

td

  • Tech Support
  • *****
  • Posts: 4087
    • WinBatch
Re: OT (Sort of): Visual Studio
« Reply #6 on: December 08, 2020, 07:35:35 am »
Visual Studio has global settings that are inherited by all projects and solutions.  I know from first-hand experience that these settings can get altered and cause all manner of problem.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

JTaylor

  • Pundit
  • *****
  • Posts: 1831
    • Data & Stuff Inc.
Re: OT (Sort of): Visual Studio
« Reply #7 on: December 08, 2020, 03:41:12 pm »
A number of things were in "DEBUG" sections so defined SQLITE_DEBUG

   #define SQLITE_DEBUG 1

and it compiled successfully.  Still can't find any explanation on the web for such behavior and still don't know of any settings I changed in VS.

???????????

Jim

td

  • Tech Support
  • *****
  • Posts: 4087
    • WinBatch
Re: OT (Sort of): Visual Studio
« Reply #8 on: December 08, 2020, 10:23:42 pm »
Preprocessor defines can be placed in Visual Studio's settings so by itself the need for a define does not rule out settings as the culprit. 
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

JTaylor

  • Pundit
  • *****
  • Posts: 1831
    • Data & Stuff Inc.
Re: OT (Sort of): Visual Studio
« Reply #9 on: December 09, 2020, 01:26:09 pm »
ARRRGGGGGHHHHHH!!!!!    Now my Dialog Extender won't compile.  Tells me


          Error (active)   E0289   no instance of constructor "CWilExtenderT<T>::EntryT<T>::EntryT [with T=CDialogEx, T=CDialogEx]" matches the argument list   

on all my function declarations.

I posted the question to the SQLite Forum.  They have been very responsive but nothing that has helped.

At least one of my other Extenders is still working at the moment.  Hopefully that will continue.

Jim

td

  • Tech Support
  • *****
  • Posts: 4087
    • WinBatch
Re: OT (Sort of): Visual Studio
« Reply #10 on: December 09, 2020, 02:09:35 pm »
Are you seeing any "File not found" errors in the compiler output?
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

JTaylor

  • Pundit
  • *****
  • Posts: 1831
    • Data & Stuff Inc.
Re: OT (Sort of): Visual Studio
« Reply #11 on: December 09, 2020, 02:27:17 pm »
Not seeing any.

Jim

JTaylor

  • Pundit
  • *****
  • Posts: 1831
    • Data & Stuff Inc.
Re: OT (Sort of): Visual Studio
« Reply #12 on: December 09, 2020, 02:29:16 pm »
I also created a brand new DLL project and ended up with same problem on SQLite Extender.   I also took the Math64 Extender and replaced its file contents but same result.

Jim

td

  • Tech Support
  • *****
  • Posts: 4087
    • WinBatch
Re: OT (Sort of): Visual Studio
« Reply #13 on: December 09, 2020, 07:11:19 pm »
Then it is one of the many Visual Studio global settings.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

JTaylor

  • Pundit
  • *****
  • Posts: 1831
    • Data & Stuff Inc.
Re: OT (Sort of): Visual Studio
« Reply #14 on: December 09, 2020, 07:23:12 pm »
Probably since it affected all the projects without them ever being opened or changed.   Just wish I knew what happened.  Don't recall changing anything in the settings.   Thanks again.  I know you have better things to do so I do appreciate your time.

Jim

td

  • Tech Support
  • *****
  • Posts: 4087
    • WinBatch
Re: OT (Sort of): Visual Studio
« Reply #15 on: December 10, 2020, 07:02:40 am »
The errors you posted here are usually caused by a missing header file because that is where definitions are normally placed. However, missing header files generate a compiler error at the line containing the #include preprocessor statement. Obviously, there are other ways to generate the errors you posted but they are more esoteric and can be harder to identify without a hands-on investigation.

Have you tried updating your version of Visual Studio?
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

JTaylor

  • Pundit
  • *****
  • Posts: 1831
    • Data & Stuff Inc.
Re: OT (Sort of): Visual Studio
« Reply #16 on: December 10, 2020, 07:33:29 am »
Yes.  After I had exhausted all my ideas and other suggestions I decided updating wouldn't add anymore confusion to the mix and might help so did that but with no effect.

Jim

td

  • Tech Support
  • *****
  • Posts: 4087
    • WinBatch
Re: OT (Sort of): Visual Studio
« Reply #17 on: December 10, 2020, 02:23:47 pm »
It is a really long shot but you could check the stdafx.obj file in your Release and Debug directories after you have VS clean your projects.  The clean command is supposed to delete that object along with all the rest of the obj files.  However, I have had cases where it doesn't, and having that file out of date can cause the errors you are seeing.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

JTaylor

  • Pundit
  • *****
  • Posts: 1831
    • Data & Stuff Inc.
Re: OT (Sort of): Visual Studio
« Reply #18 on: December 10, 2020, 03:04:09 pm »
It was gone after cleaning.  Thanks though.

Jim

JTaylor

  • Pundit
  • *****
  • Posts: 1831
    • Data & Stuff Inc.
Re: OT (Sort of): Visual Studio
« Reply #19 on: December 11, 2020, 08:51:07 am »
Just to provide an update since you all have been kind enough to help me out...I installed VS on another machine and it works.   Apparently something has gotten corrupted on my machine so will do a reinstall.  Thanks again.

Jim

JTaylor

  • Pundit
  • *****
  • Posts: 1831
    • Data & Stuff Inc.
Re: OT (Sort of): Visual Studio
« Reply #20 on: December 11, 2020, 01:12:07 pm »
Unfortunately it didn't solve my Dialog Extender problem.   I did a repair on VS on my main machine and that didn't help so I am now uninstalling it and see if a reinstall helps.

Jim

JTaylor

  • Pundit
  • *****
  • Posts: 1831
    • Data & Stuff Inc.
Re: OT (Sort of): Visual Studio
« Reply #21 on: December 11, 2020, 01:23:43 pm »
Oddly enough if I remove my UNICODE definition the Dialog Extender errors go away.  had to resolve a Can't open afres.h error.    Once I get my main machine back up I will see if that solves the problem permanently.

Jim

td

  • Tech Support
  • *****
  • Posts: 4087
    • WinBatch
Re: OT (Sort of): Visual Studio
« Reply #22 on: December 11, 2020, 01:47:40 pm »
Could be as simple as a misplaced "#if defined( UNICODE)" or to use MSFTs nonstandard version "#ifdef UNICODE". Or that might not have anything to do with it.

Reminds me of a Visual Studio bug I have dealt with for years with one and only one project. For whatever reason when I edit the project's rc file, save it, and compile, the file reverts to the previous version so the changes do not appear in the compiler output. I have to hand-edit the file outside of the Visual Studio environment to make changes stick.  Rebooting or killing the VS process doesn't even work.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

JTaylor

  • Pundit
  • *****
  • Posts: 1831
    • Data & Stuff Inc.
Re: OT (Sort of): Visual Studio
« Reply #23 on: December 11, 2020, 02:52:32 pm »
Well...after reinstall and UNICODE change I got my Dialog Extender back to working but SQLite still has the same problem  :'(

Oh well, if anything critical happens I can fix it on the other machine for now while I keep hacking away at it on my main machine.

Thanks again.

Jim

JTaylor

  • Pundit
  • *****
  • Posts: 1831
    • Data & Stuff Inc.
Re: OT (Sort of): Visual Studio
« Reply #24 on: December 12, 2020, 01:43:29 pm »
Mostly ranting here [again]...Dialog Extender was working great.  Spent the morning adding a TreeView Control and then from one Compile to the next, with the only change being removing a blank space from a quoted string, it started up with the previous 300+ errors.   Still no change on SQLite front.

Jim