Hi people,

I'm trying to compile my C++ project under Windows, which it should be able to.
I've got a whole bunch of dependency libraries.

When I compile everything seems fine until these error pop up:

1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\rpc.h(27) : error C2598: linkage specification must be at global scope
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\rpcdce.h(23) : error C2598: linkage specification must be at global scope
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\rpcdce.h(76) : fatal error C1903: unable to recover from previous error(s); stopping compilation

I have no clue what, where or why this is included in the first place.
I don't see why this Microsoft SDK file should contain error.
In my opinion, it doesn't even seem like there's anything wrong (I attached it).

I have WinSDK and PlatformSDK installed.

Does anyone have the slightest clue what I can do about this?

Thank you :D

Recommended Answers

All 4 Replies

It would be helpful if you posted the code you wrote.

It's around 15.000 lines of code depending on some 10 libraries with many hundreds lines of code in total :s As I don't know where this issue occurs, I can't even create a small reproduction.. thoughts?

I've spent a long time with this program and chosen all platform independant libraries. Previously, it has been able to run on windows, but I've updated Windows several times and updated the libraries since last buildtest..

Oh god.. I can't believe this..
I talked to a Windows developer about this error too, he suggested I was including the file from inside a function, i stated NO I wouldn't do that.. And the very latest function in my program.. does that.. I couldn't even remember..

Well sorry for bothering :) Remember lads, don't include from inside functions xD

commented: Great going on your research :) +28
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.