Environment Variable is wrong in VS

Bryan Kelly 486 Reputation points
2022-07-26T01:31:00.097+00:00

Windows 11, Visual Studio 2019, C++
Start with the environment variable. Here is the dialog.

224691-environment-variable-wxwin.png

The logging was set here: Tools -> Options -> and the two verbosity fields set to Detailed. From the output, beginning at line 1018 is this segment:

1>VSLANG = 1033
1>VSSKUEDITION = Professional
1>windir = C:\WINDOWS
1>WXWIN = C:\WXWIDGETS\3.1.7
1>ZES_ENABLE_SYSMAN = 1

WXWIN is set to a value that was updated several weeks ago. As can be seen in the first image it is C:\WXWIDGETS/3.2.0
But Visual Studio is using the wrong value.
I’ll even post a screen capture from that section of the Output panel.

224684-wxwin-is-wrong.png

What might have caused this and how can it be corrected?

Side question: are there any allowed tags for Visual Studio. Typing in "vi" or "vs" results in nothing so I use C++

Developer technologies C++
Developer technologies Visual Studio Other
0 comments No comments
{count} votes

10 answers

Sort by: Most helpful
  1. Bryan Kelly 486 Reputation points
    2022-07-28T22:25:15.487+00:00

    Should I remove all the WXWIN stuff from administrator environment variables and keep them only in my user variables?

    What are all the settings I might set to get verbose logs about what VS is doing and details about errors discovered? For example: What is the full path used as it searches for specific files?

    Better yet, where might I find that information?

    And based off suggestions from people on the wxwidget forums, I use Build -> Batch Build.
    In that dialog there is a column for Project and there are a flock of different projects.
    Examples: base, core, and minimal. But now that I have it open, it is different from a few minutes ago. The list was much longer and a few of them included:

    _custom_build, html, media, net, propgrid, qa, ribbon, and many more.

    I did some searches and was not able to find web page that describes this/these items. What does each one mean and where can I find that information?

    0 comments No comments

  2. RLWA32 49,536 Reputation points
    2022-07-29T01:03:38.23+00:00

    Should I remove all the WXWIN stuff from administrator environment variables and keep them only in my user variables?

    Lets get your understanding corrected. There are two kinds of environment variables. System environment variables and User environment variables. I suggest you define environment variables used for development as User Environment variables for the account(s) that you use (e.g., Administrator).

    I disagree with the suggestions about using batch build. During the course of our discussions I have built the wxwidgets library numerous times in all its configurations without error without ever using batch builds. I've built it from within the VS IDE and from the command line using msbuild. I also had no difficulty building the minimal sample exactly as it was installed without making any changes to it.

    I believe that the comments you have received about build times and "build preparation projects" have confused and misled you. The times you posted in the other forum were NOT for builds of the entirety of wxwidgets. At this point, you should not be concerned about the individual projects that comprise wxwidgets.

    In my opinion getting involved with the details of diagnostic messages for errors associated with builds that should not fail is a waste of time and effort. As I previously suggested I think that your best course of action is to uninstall wxwidgets 3.2.0 and then do a clean re-install to start fresh. If you follow the guidance to properly define environment variables, and use the wxwidgets.props property sheet for new projects you should have no difficulties. I don't understand why you are fixated on wrestling with the minimal sample when it doesn't reflect how you would create your own new project.

    I've provided you with wxBryan and tons of diagnostic advice. I've tried to give you a simple path to get up and running.

    How you proceed is up to you.

    0 comments No comments

  3. Bryan Kelly 486 Reputation points
    2022-07-29T03:07:12.057+00:00

    LWA32-6355: I've provided you with wxBryan and tons of diagnostic advice. I've tried to give you a simple path to get up and running.

    Yes, you have spent much time on my behalf. But something goes wrong with everything. Regarding wxBryan

    Yes, I have tried that one. First configured as unzipped, I think, Debug, x86. It builds but when run produces this error dialog.

    225992-wxbryan-system-error.png

    Then tried:
    Debug x64
    Release, x64
    Release, x86
    All built but did not run with the same error

    Searched for that file in the working directory, not there.
    Searched in the WXWIDGETS directory and found these two files:

    "C:\WXWIDGETS\3.2.0\build\msw\vc_mswuddll\base\wxbase320ud_vc_custom.dll.recipe"  
    "C:\WXWIDGETS\3.2.0\lib\vc_dll\wxbase320ud_vc_custom.dll"  
    

    They are close enough for Explorer to find, but not a match.


  4. Bryan Kelly 486 Reputation points
    2022-07-29T16:37:38.923+00:00

    I am uncertain as to exactly where to add the path to the DLL, so put it in my user environment variable Path.
    I get there by clicking the Windows icon in the tool bar, type in “edit envir” and it completed the phrase “edit environment variables for your account. Here is the top panel of the dialog.

    226218-29jul-env-var-top.png

    Editing Path produces this, after the edit

    226281-29jul-edit-path.png

    It looks just like the one I found from you. But I might be reading something wrong.
    Reboot the computer just to be certain, then capture those images shown just above.
    Clean, Build, Start Debugging, and get these two dialogs

    226168-29jul-start-debug-dialog-1.png

    226229-29jul-start-debug-dialog-2.png

    I note again, that files do not exist in my local directory and do not exist in the WXWIDGETS directory. VS is not creating it. I don’t know if the error is when the WXWIDGETS sources are built or when the project is built.
    I have tried many things since working your suggestions. After a few tasks here, I will what I have created and start over running your procedure from scratch.


  5. Bryan Kelly 486 Reputation points
    2022-07-29T23:09:45.127+00:00

    It was that path and the errant $ that was wrong. Changed it at the project runs. Build as Release and Debug in X64 and they all worked. Recognizing that from my perspective I cannot tell the difference.

    If I were famous, or even moderately well known and local circles, it would be to looking at something like that and not seeing what I need to see.

    You have been very generous with your time and patient with me.
    Thank you very much.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.