3

I realize this is probably caused by some _dllexport() somewhere, not in my code but in some third-party piece. (Qt, Boost, OpenSG, ...)

Is there a simple linker option to disable this? I've searched but not found anywhere.

BIBD
  • 15,107
  • 25
  • 85
  • 137
Macke
  • 24,812
  • 7
  • 82
  • 118
  • Note that it can also be caused by CUDA libraries and any other GPU libraries to demand high-performance GPU from the OS -- examples are `AmdPowerXpressRequestHighPerformance`, `NvOptimusEnablement` `NvOptimusEnablementCuda`. – Igor Levicki Jan 31 '23 at 12:34

3 Answers3

1
  • To disable generation of .lib use /NOIMPLIB linker switch.
  • To disable generation of .exp files use /NOEXP linker switch.
Igor Levicki
  • 1,017
  • 10
  • 17
0

AFAIK, no, because the relevant #pragma's override the linker settings.

MSalters
  • 173,980
  • 10
  • 155
  • 350
-3

I suggest you make sure that you have different folders for intermediate files and output files.

I use to setup the projects this way (project properties/general configuration page):

Output Directory = $(SolutionDir)\Build\$(ConfigurationName)
Intermediate Directory = $(SolutionDir)\Build\$(ConfigurationName)\$(ProjectName)
Cătălin Pitiș
  • 14,123
  • 2
  • 39
  • 62