April 6, 2012

DocOx DocOx
Ant Farmer
145 posts

[SOLVED] Qt Creator + CMake + MSVC 2010 Express = annoying LNK4099 warning

 

Hi, I am working towards building my application using MSVC 2010 Express, and though I have made good progress (not as easy/convenient as MinGW though), I have come across a LNK4099 warning when building a debugged version of my application.

Now, I have seen may threads which pretty much say that we can safely ignore that LNK4099 warning, and I can see why. Still, I don’t like warnings. It just doesn’t look good. So, is there really no way to get rid of that annoying warning?

Cheers, Alan.

5 replies

April 6, 2012

koahnig koahnig
Mad Scientist
2199 posts

You may check-out the work-around found here [connect.microsoft.com]

April 6, 2012

DocOx DocOx
Ant Farmer
145 posts

Thanks a lot for this koahnig, I clearly hadn’t come across that page before (http://www.bottledlight.com/docs/lnk4099.html [bottledlight.com] for the workaround itself).

Anyway, I applied the workaround, compared my new link.exe file against the original version to make sure that I had properly applied the workaround, and yet I still get that LNK4099 warning…?! I even renamed link.exe and tried to build my application which (obviously) failed, telling me that I indeed modified the right file, but still no luck…!?

April 6, 2012

koahnig koahnig
Mad Scientist
2199 posts

I did not apply myself. So far, I can live with this warning even so I agree that it is a nuisance. The information seems to have already some layers of dust. It came actually before msvc 2008 and msvc 2010. I did not see this.

May 11, 2012

DocOx DocOx
Ant Farmer
145 posts

FWIW, I had another look at my LNK4099 warning issue and managed to get rid of it by adding /ignore:4099 as a linker option. Apparently, /ignore is an undocumented option. Whatever the case, it works for me and thought it might be of use to other people in my situation, i.e. wanting/needing to build their Qt application using MSVC.

May 11, 2012

koahnig koahnig
Mad Scientist
2199 posts

Thanks for sharing your findings.
With google you find some references, but those are not ms pages. So, you are probably right that it is an undocumented feature.

 
  ‹‹ scanf with TextEdit      QTCreator doesn’t parse CMake defined ifdef’s ››

You must log in to post a reply. Not a member yet? Register here!