tyoma/micro-profiler

Incomplete installation?

BengtGustafsson opened this issue · 4 comments

I just installed MicroProfiler in VS 2019.

When I enable profiling and start I get a linker error:

LINK : warning LNK4044: unrecognized option '/micro-profiler_x64.lib'; ignored

This turns out to be caused by the lack of a macro in VS as the linker input is set to be: $(MICROPROFILERDIR)/micro-profiler_$(PlatformName).lib

There is no variable MICROPROFILERDIR in VS macro list.

I assume the installation process should have created it and I have no idea how to create it manually.

I found the lib file in C:\Users\bengtg\AppData\Local\Microsoft\VisualStudio\16.0_7e09f2b5\Extensions\15mex1k0.gw5 so it is not very easy to guess where it is.

UI replaced the macro name with the path for testing, and now it misses the corresponding DLL instead.

Any ideas of what went wrong?

tyoma commented

Hello Bengt!
it sometimes requires restart of visual studio after the first run upon microprofiler installation. after you exit VS, please check if the env var mentioned is set in cmd.exe:

set

thank you!

Had the same thing happen. Can confirm that after installation I needed to open vs, enable profiling, close vs, then open vs again, and everything was well!

tyoma commented

Added a termination of child VS processes upon first VS run since MicroProfiler installation - this should fix the missing library issue.

@tyoma
This needs to be reopened:
Installed V 2.0.651.0 via VS 2022 (17.3.7)
Performed "Right click" on project then build
Got the error described in the OP.

After some searching found this item.
Can confirm that after shutting down and restarting VS it then built as expected.
The fix instructions Need to be placed in the description and in the landing page of the project until fixed please.