Morgen alle zusammen!
Bin ja jetzt von MatLab auf C++ mit VisualStudio umgestiegen und bin
durchgehend am Googlen, wenn ich irgendwo nicht weiterkomme. Kennt man
ja :)
Und auf das, was ich soeben gestoßen bin, muss ich hier unbedingt
posten, um die Uhrzeit konnte ich mir n Lacher nicht verkneifen :>
1 | "#include <commctrl.h> gives me errors"
|
2 | Hey, I have a weird problem when I #include <commctrl.h>....
|
3 | Here is what the compiler (MSVC 2008) tells me.
|
4 |
|
5 | C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include\commctrl.h(19) : error C20
|
6 | 59: syntax error : 'return'
|
7 | C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include\prsht.h(97) : error C2065:
|
8 | 'CALLBACK' : undeclared identifier
|
9 | C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include\prsht.h(97) : error C2065:
|
10 | 'LPFNPSPCALLBACKA' : undeclared identifier
|
11 | C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include\prsht.h(97) : error C4430:
|
12 | missing type specifier - int assumed. Note: C++ does not support default-int
|
13 | C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include\prsht.h(97) : fatal error
|
14 | C1903: unable to recover from previous error(s); stopping compilation
|
15 | NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\bin
|
16 | \cl.EXE"' : return code '0x2'
|
17 | Stop.
|
18 |
|
19 | Huh?
|
20 | I should probably mention that this header gets included more than once, but in different compilation units (I think that is the right term).
|
1 | Have you <windows.h> included too?
|
1 | Yeah in Application.cpp, but not in Notebook.cpp.
|
2 | Are you saying I have to #include <windows.h> before <commctrl.h>?
|
3 | EDIT:
|
4 | Ok I just did that and it works now. :P
|
5 | Why on earth do I have to do that?
|
1 | You probably know this, but because you asked anyway, commctrl.h depends upon windows.h.
|
1 | Ok, so it needs windows.h, but doesn't include it? LOL
|
2 | Typical.
|