Visual studio code not finding librarys

Goodday!

I have a small problem with visual studio code. It keeps giving me squiqly error about not finding the librarys like <iostream> and <windows.h>. I have installed mingw and windows sdk.

most of the time my program will compile fine, but it definetly doesn't find windows.h because it failed implementing dll's.

Here is my proporties file.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
{
    "configurations": [
        {
            "name": "Mac",
            "includePath": [
                "/usr/include",
                "/usr/local/include",
                "${workspaceRoot}"
            ],
            "defines": [],
            "intelliSenseMode": "clang-x64",
            "browse": {
                "path": [
                    "/usr/include",
                    "/usr/local/include",
                    "${workspaceRoot}"
                ],
                "limitSymbolsToIncludedHeaders": true,
                "databaseFilename": ""
            },
            "macFrameworkPath": [
                "/System/Library/Frameworks",
                "/Library/Frameworks"
            ]
        },
        {
            "name": "Linux",
            "includePath": [
                "/usr/include",
                "/usr/local/include",
                "${workspaceRoot}"
            ],
            "defines": [],
            "intelliSenseMode": "clang-x64",
            "browse": {
                "path": [
                    "/usr/include",
                    "/usr/local/include",
                    "${workspaceRoot}"
                ],
                "limitSymbolsToIncludedHeaders": true,
                "databaseFilename": ""
            }
        },
        {
            "name": "Win32",
            "includePath": [
                "C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/um",
                "C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/ucrt",
                "C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/shared",
                "C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/winrt",
                "${workspaceRoot}"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE"
            ],
            "intelliSenseMode": "msvc-x64",
            "browse": {
                "path": [
                    "C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/um",
                    "C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/ucrt",
                    "C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/shared",
                    "C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/winrt",
                    "C:\\MinGW\\lib\\gcc\\mingw32\\6.3.0\\include\\c++",
                    "${workspaceRoot}"
                ],
                "limitSymbolsToIncludedHeaders": true,
                "databaseFilename": ""
            }
        }
    ],
    "version": 3
}


hopefully somebody can help me.


Sincerily krreisys
Last edited on
Hello krreisys,

Which version of VS does this problem apply to? And what operating system are you using?

The 2015 version I use worked fine right from the start, but the 2017 version I have had problems with.

If you have installed and trying to use the "mingw" This might be a problem as "mingw" may not be getting the information of where to find the include files when it runs. I have just used the compiler that came with VS and have not had any problem with it.

Unless someone else has another idea.

Hope that helps,

Andy
Last edited on
Thank you Andy for your reply!
So i did not have any visual studio installed, just visual studio code ( a new text editor by microsoft wich i very much like ), MinGW and the c++ SDK from microsoft.

The program that i had saved and wanted to edit didn't work anymore and somehow it got solved by re-compiling the dll that i made for that program.
Thank you!

i am still wondering why i needed to recompile the dll though?

Not neccesary but i had a few questions about setting up a c++ IDE:
1. can you make Command Line c++ apps without downloading visual studio?
2. what are all the programs that you need for setting up a IDE?
3. Where are exactly all the standard librarys located? <iostream>, <windows.h>?
Last edited on
Hello krreisys,

I am not sure why you would have to recompile the ".dll" unless something chaged in the ".dll" file. I have not tried making a ".dll" yet, so I am not that familiar with them. I did make a ".lib" file that I use all the time and it works great.

1. can you make Command Line c++ apps without downloading visual studio?
Yes. All you need is a text editor to write the code, and a compiler.

2. what are all the programs that you need for setting up a IDE?
That would depend on the IDE, but I believe that most IDEs are equiped to set them selves up. I know that when I set up my Visual Studio Community 2015 every thin needed for setup was done by Microsoft. I would say that Code::Blocks and other more used IDEs are the same way.

3. Where are exactly all the standard librarys located? <iostream>, <windows.h>?
This would depend on the compiler that you are using. I would say look to where the compiler is stored and the "include" and "lib" sub directories should be close.

Hope that helps,

Andy
Registered users can post here. Sign in or register to post.