OT (Sort of): Visual Studio

Started by JTaylor, December 07, 2020, 02:52:16 PM

Previous topic - Next topic

JTaylor

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

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

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

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

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

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

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

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

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

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

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


JTaylor

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

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

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

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

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

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

It was gone after cleaning.  Thanks though.

Jim

JTaylor

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

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

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

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

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

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