Just as it's okay to print money corresponding to central bank gold reserves, so too it's okay to print money to pay for the construction of the gold mine. Either way currency holders have real gold on the other side of the ledger.
Taking this one step further, it should be okay to print money to fund any enterprise whose output can be traded into gold. For example if we printed money to build a silver mine then the silver could be traded for gold at some ratio, so the currency holders would be in a protected position.
In fact whether the enterprise produces silver, timber, cars or software doesn't really matter as long the output is tradable for gold; and produces enough "gold value" to justify the newly printed currency.
I think the economics on this actually checks out. Although politicians in the real world would realistically use money printing for consumption rather than production.