1

I've been trying to figure this one out for the last couple of days and I haven't found anything related on the web.

I have a series of Projects which generate .exe files using Visual Studio 2012 (the behavior happens under newer versions as well). I use Property Sheets to set all compile options; therefore, all my CL & Link switches are consistent throughout my .exe Projects. I have verified that none of the switches haven been locally overwritten within the problem Projects.

So the issue I have is that 2 of my 41 Projects generate .lib & .exp files AS WELL as the desired .exe file. I've never seen this before and I don't quite understand why those would be needed for .exe. It's as if the linker momentarily treats the Projects as .dll, but ultimately generates an .exe.

Would anyone know if this could be expected behavior, under certain conditions?

Thanks for the help.

I have found this link, which pretty much exactly describes what I'm getting. But the solution doesn't seem to apply in my case.

Why does my Visual C++ .exe project build create .lib and .exp files?

Community
  • 1
  • 1
ThermoX
  • 277
  • 3
  • 11
  • 1
    Always hate when people down vote and provide no explanation/reason. Thanks for that meaningless feedback. – ThermoX Jan 09 '17 at 13:39
  • 1
    The downvote is probably because you didn't give enough information to reproduce the problem. – Mark Ransom Jan 09 '17 at 20:21
  • It could be.. The question was fairly generic because I was looking for possibilities as to when, in general, can an exe also generate these files. In the end, however, it ended up being the same reason as the one mentioned in the link. Now, I have no issues with people down voting my questions *provided* that they give an explanation for it. Thanks for your input. – ThermoX Jan 10 '17 at 11:54

1 Answers1

2

Alright... After a lot more digging, I have finally found the problem.

The issue was indeed related to the one mentioned in the link I had provided. Somewhere, under an old Sun Microsystem library (portmap related), there was 1 function which had the __declspec(dllexport) statement in it. Even though that library is used by all my .exe projects, only the 2 problem programs were indirectly calling the exported function.

In retrospect... I should have simply looked at the .lib file directly. It showed which single function was exported.

ThermoX
  • 277
  • 3
  • 11