2

eMbedded Visual C++ 3 project, that is building for PocketPC 2000. On the ARM build, the linker throws the following error:

fatal error LNK1223: invalid or corrupt file: file contains invalid pdata contributions

On SH3, the project compiles, links, and works. The project also works when built for ARM on Visual C++ 2005, but I need to test builds specifically from eVC3.

Any ideas, please? What's a pdata contribution and how do I affect (or disable) those? It's something to do with exception handling; I've tried disabling SEH by specifying /EHsc, to no effect.

valiano
  • 16,433
  • 7
  • 64
  • 79
Seva Alekseyev
  • 59,826
  • 25
  • 160
  • 281
  • Just curious, have you tried EVC++ 4 to see if it builds? Is there something EVC3 gives you for your legacy build that EVC4 would not? – codenheim Mar 24 '10 at 03:23
  • eVC4 does not start for me, claiming I don't have any CE SDKs installed. In fact, I have plenty, both PlatMan-compliant and CoreCon-compliant, all the way from PPC2000 to WM6.1. Rather than fight with eVC4, I went with eVC3. – Seva Alekseyev Mar 24 '10 at 03:30
  • Disabling SEH solved my problem, ignore my last comment. Thanks. – HMD Aug 16 '17 at 09:54

2 Answers2

1

Very weird. I tried commenting out everything in the file. The error went away when I commented out a function that was extern "C" void __declspec(naked) with no body (body #ifdef'fed away). I have similar functions in the project, but they did not throw any errors like this. Maybe a compiler bug...

Seva Alekseyev
  • 59,826
  • 25
  • 160
  • 281
  • I have the same issue and can't find any working solution on internet for my case. I tried removing functions with no body as you and [this](https://msdn.microsoft.com/en-us/library/15t6d69w.aspx) site says but no progress. Have you any other suggestion for this case? – HMD Aug 16 '17 at 05:30
  • That was 7 years ago. Do you honestly think I remember the details? – Seva Alekseyev Aug 16 '17 at 15:39
  • As I said above, I found the solution, but there is almost nothing about this problem in the internet, so asking from you was my last chance. Thanks anyway. – HMD Aug 19 '17 at 04:02
0

No idea from me, but the Google-mind dredged up this thread which might give you a clue how to fix/workaround the problem... maybe:

After looking at the error more closely, I finally figured out that this is a side-effect of my hijacking of SC_SetDaylightTime() in the kernel with my own version. Apparently, something that I'm doing in my code there is causing the compiler to generate pdata entries that are wrong in some way. A strategically-placed #ifndef worked around it.

Michael Burr
  • 333,147
  • 50
  • 533
  • 760