|P is for Practical|
Problems with FREE MS VC++ toolsby JamesNC (Chaplain)
|on Nov 22, 2005 at 13:37 UTC||Need Help??|
JamesNC has asked for the
wisdom of the Perl Monks concerning the following question:
My perl is ActiveState 5.8.7 build 813.
I do not encounter any issues running this code on an older version of Visual Studio C++. This problem only happens with the newer (free) enviroment ( as in there is no such thing as free beer I suspect ).
I downloaded and installed the free Visual C++ tools at: http://lab.msdn.microsoft.com/express/visualc/ and the new Platform SDK (which you need).
Then, I did a quick and dirty test.
1. h2xs -A -n myModule
2. perl Makefile.pl 3. edit myModule.xs
(I only got 1 warning about -Gf being deprecated, so I looked up the error and changed the flag to -GF and it compiles with out error. All good so far. )
5. nmake install
6. open up the editor and write a quick script where I call the brain-dead function.
7. When I run the script I get a VC++ runtime error:
And perl dies complaining:
Question 1: Does anyone know what is broken and how to fix it?
Question 2: I can see that the -Gf flag needs to be fixed, how to I make the change so that when I use h2xs in the future that that flag is fixed?
Update and solution:
The solution is to create an XML file called perl.exe.manifest and place it in the same directory as your perl.exe and put the following contents in that file:
Thanks to everyone who helped. Especially ++Pod Master.