I have a VC++ project and I have got the .dsw file. I want to build the project through TeamCity and obtain the .dll file.

In the TeamCity, In Build Steps I have given the Runner type as Command Line and passing in the following parameters.

Myproject.dsw /MAKE "Myproject - Win32 Release MinSize"

It creates empty output directories and all but I get this error

fatal error RC1015:  cannot open include file 'afxres.h'

I have checked that the file is located at 'C:\ProgramFiles\Microsoft Visual Studio\VC98\MFC\Include'. I don't understand why it is not picking up the file from this location. I tried adding this location to Environment Variable PATH, but it does not work.

The TeamCity picks up few files from 'C:\ProgramFiles\Microsoft Visual Studio\VC98\Include' though.

Please help.

有帮助吗?

解决方案

I some how figured out the solution for this.

The TeamCity Agent runs as a windows service. So, it can not access the User environment variable for e.g. %include% and %lib%.

What I did is, I passed these two variables as environment variables to TeamCity Build. And voila!!! It works. :)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top