C++ pch and stadfx importing simple library to Rhino Plugin project

Hi,

I have issue with precompiled headers “pch.h” and “stadfx”

In console application I have a simple library that calls pch.h math methods such as “min” , “max” and etc.
It builds and runs good.

When I open Rhino C++ plugin template and add this library (it is only 1 header and 1 source file) it complains about those min max methods used int pch.h.
I tried to change pch.h to stadfx.h since it is more or less the same thing. But not, because I get errors while building the project.

I attached the console application with source code of .h and .cpp files that runs correctly.
Could someone give a hint how to add this library to rhino plugin to solve occuring errors?

Project file:
https://1drv.ms/u/s!AnwaB50XU22ei-pjxTzRFr2Z1mzkZg

Just removing std from std::max solves issue.

Why would in rhino plugin project I cannot specify std::SomeMethod ? and I directly have to call SomeMethod?

Do you have a using namespace std statement?

– Dale

No, that was the reason for asking, is it possible that rhino plugin template references “globally” stadfx so that I do not need to specify std:: in the new file I create?

This is what I have in both header and cpp file and I can type math function without typing std namespace: