Coder Social home page Coder Social logo

Comments (10)

batzen avatar batzen commented on June 10, 2024

I rarely setup a new machine, so i might have forgotten to add something to the config file.
Will try to find out what's missing.

from snoopwpf.

batzen avatar batzen commented on June 10, 2024

I just tested this in a Windows Sandbox using a clean install of VS 2022 17.8.3 Community.
Everything compiles as it should (except a missing .NET SDK version error for SDK 6.0.400 and a new warning when using .NET SDK 8.0).

Which version of Visual Studio are you using?
On my machine share.h is located in C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\share.h.
Maybe your Windows SDK install is broken?

from snoopwpf.

arkoste avatar arkoste commented on June 10, 2024

All c# projects are ok. I'm also able to start the application with F5
I have only a problem with Snoop.GenericInjector
It gives me the error C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xiosbase(10,10): error C1083: Cannot open include file: 'share.h': No such file or directory

After specifying the path C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt in Project Include Directory, the message is gone but i receive a linker error:

1>LINK : fatal error LNK1104: cannot open file 'libucrtd.lib'

Sorry but i'm not a C++ guy!

from snoopwpf.

batzen avatar batzen commented on June 10, 2024

libucrtd.lib should be located in architecture specific directories x86, x64, arm and arm64 inside C:\Program Files (x86)\Windows Kits\10\lib\SOME_VERSION\ucrt.

In my case it looks like this:
image

I still guess something is wrong with your Windows SDK install.
Could you try to do a repair install of Visual Studio or the SDK if you installed it manually?

from snoopwpf.

arkoste avatar arkoste commented on June 10, 2024

ye yes, i did but if i add the x86 path to Poject Library Directory like this C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\ucrt\x86;$(LibraryPath), the linker told me that is unable to find Kernel32.dll!

Error	LNK1181	cannot open input file 'kernel32.lib'

Maybe i have to repair the vs installation but i have a fresh copy of vs2022 and the .net6 sdk manually installed, nothing else!

from snoopwpf.

batzen avatar batzen commented on June 10, 2024

That's very strange.
There should be no need to specify any include or library paths.

I tested with an Windows Sandbox and everything worked as expected.

I think there isn't much i can do, aside from guessing your VS installation or something else on your system is faulty.

You could try to do a build with diagnostic verbosity and attach the log as a file here.
Maybe i can see something in the log that helps to find out what's wrong with your system.

from snoopwpf.

arkoste avatar arkoste commented on June 10, 2024

log.txt

this is the log

I've tried on another pc and it seems to work. No errors at all. The only difference is the other has win 10 pro

from snoopwpf.

arkoste avatar arkoste commented on June 10, 2024

I want to report what i've done on my notebook with win11 pro and vs2022 17.8.3:

  1. Uninstall vs2022
  2. Reboot
  3. Install vs2022 with this configuration
    vsconfig.txt
  4. Open the project AND NOT INSTALL WHAT SUGGESTED

image

This way i'm able to compile the C++ project with no errors

If i install what vs2022 suggests, i won't be able to compile it anymore.

I don't know why but if i install what suggested, Include Directory and Library Directory in vs2022 change from this

C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\atlmfc\include
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include
**C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt**
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\shared
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\winrt
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\cppwinrt
C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\Include\um

to this:

C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\atlmfc\include
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include
**C:\Program Files\Windows Kits\10\Include\10.0.22621.0\ucrt**
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\shared
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\winrt
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\cppwinrt
C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\Include\um

The 4th entry doesn't not exists! At this point i'm not able neither to manually add this include nor the library link (whit that one that works). It always gives me strange errors (but this probably is my fault .... but what?)!

Thanks

from snoopwpf.

batzen avatar batzen commented on June 10, 2024

I added an additional Windows 11 SDK to the .vsconfig to hopefully fix the issue.
It also got installed on my clean machine (Sandbox) even though it wasn't listed in the .vsconfig file.
Maybe the installer behaves different if installing on a clean machine vs a machine where it was once installed...

from snoopwpf.

arkoste avatar arkoste commented on June 10, 2024

Thank you.
I think this can be closed

from snoopwpf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.