Skip to main content
GameDev.net gamedev.net
🔒 Locked

#pragma warning doesn't work

Started by proanim Nov 3, 2013 at 1:58 AM 1 replies 2.4k views
Original Post
proanim
proanim

When linking static sfml libraries i get annoying LNK:4099 warning about missing PDB files. I tried using #pragma warning(disable:4099) works every 10 or so cleans/rebuilds. And I also tried to use #pragma comment(linker, "/ignore:4009") which also doesn't work - ever. How can I fix this? I tried placing #pragma in both *.cpp and *.h in case something funny was happening - but no difference. Is this specific warning for VS or is it present in all compilers?

L. Spiro
L. Spiro

All error numbers reported by compilers and linkers are unique to those compilers and linkers, so while another linker may report a similar warning (likely not specifically about PDB files since those are specific to Visual Studio®) it would have a different number.

As for warning 4099, it cannot be ignored without patching link.exe with a hex editor.

http://bitsquid.blogspot.jp/2011/12/code-share-patch-linkexe-to-ignore.html

If you want to do it manually, you can look at that code and easily see that all it does is search for 3 unsigned shorts in a row: 4088, 4099, and 4105, and replaces them with 4088, 65535, and 4105, effectively removing 4099 from the exclusion list. This can easily be done via any hex editor. I use MHS.

L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid
tivolo
tivolo

This probably doesn't help the OP, but why are the .PDB files missing? Aren't they included in the SFML release?

If not, try asking the developers why the files are missing - they need to realize that shipping .PDB files doesn't hurt their product at all.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.