WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: JTaylor on December 07, 2020, 02:52:16 PM

Title: OT (Sort of): Visual Studio
Post by: JTaylor 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
Title: Re: OT (Sort of): Visual Studio
Post by: ChuckC 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.
Title: Re: OT (Sort of): Visual Studio
Post by: JTaylor 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
Title: Re: OT (Sort of): Visual Studio
Post by: td 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.
Title: Re: OT (Sort of): Visual Studio
Post by: JTaylor 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
Title: Re: OT (Sort of): Visual Studio
Post by: ChuckC 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.
Title: Re: OT (Sort of): Visual Studio
Post by: td 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.
Title: Re: OT (Sort of): Visual Studio
Post by: JTaylor 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
Title: Re: OT (Sort of): Visual Studio
Post by: td 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. 
Title: Re: OT (Sort of): Visual Studio
Post by: JTaylor 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
Title: Re: OT (Sort of): Visual Studio
Post by: td on December 09, 2020, 02:09:35 PM
Are you seeing any "File not found" errors in the compiler output?
Title: Re: OT (Sort of): Visual Studio
Post by: JTaylor on December 09, 2020, 02:27:17 PM
Not seeing any.

Jim
Title: Re: OT (Sort of): Visual Studio
Post by: JTaylor 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
Title: Re: OT (Sort of): Visual Studio
Post by: td on December 09, 2020, 07:11:19 PM
Then it is one of the many Visual Studio global settings.
Title: Re: OT (Sort of): Visual Studio
Post by: JTaylor 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
Title: Re: OT (Sort of): Visual Studio
Post by: td 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?
Title: Re: OT (Sort of): Visual Studio
Post by: JTaylor 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
Title: Re: OT (Sort of): Visual Studio
Post by: td 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.
Title: Re: OT (Sort of): Visual Studio
Post by: JTaylor on December 10, 2020, 03:04:09 PM
It was gone after cleaning.  Thanks though.

Jim
Title: Re: OT (Sort of): Visual Studio
Post by: JTaylor 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
Title: Re: OT (Sort of): Visual Studio
Post by: JTaylor 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
Title: Re: OT (Sort of): Visual Studio
Post by: JTaylor 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
Title: Re: OT (Sort of): Visual Studio
Post by: td 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.
Title: Re: OT (Sort of): Visual Studio
Post by: JTaylor 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
Title: Re: OT (Sort of): Visual Studio
Post by: JTaylor 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