December 20, 2016 at 8:56 pm #22607
I have recently upgraded my VM with dev environment to win 10 and when I set up everything I was unable to compile from MEW any more. For the compilation I use a self written macro which runs nmake from VS2015 and after that loading err files and makes analysis. To be able for nmake, midl.exe and cl.exe to work properly they need to run with VS environment variables registered. So I run multi-edit in a bat file where first line runs vcvarsall.bat and the second line starts multi-edit. Somehow MEW manages to see nmake.exe and midl.exe, but when it is turn of cl.exe it can’t find it. Needless to say that I checked the compilation just from the command line – it works perfectly. I also checked if I put into my bat file some program other than multi-edit – works perfectly, but multi-edit somehow swallows part of environment variables needed for the compilation…December 21, 2016 at 5:34 pm #22610
Not sure I am following this. Can you post the bat file and the macro?
ClayDecember 21, 2016 at 7:34 pm #22612
call “C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat” x86
start “MEW” Mew32.exe /SR
Macro is long, but main part is here:
str RealFile = FILE_NAME;
str prgName = CAPS(TRUNCATE_EXTENSION(TRUNCATE_PATH(RealFile)));
str devkitPath = COPY(RealFile, 1, XPOS(prgName, CAPS(RealFile), 1) – 1);
prgtorun = “nmake.exe -A /B nooptim=1 nosrc=1 ” + prgName + “.dll”;
ERR_CODE = ExecProg( prgtorun, devkitPath, “”, “”, _EP_FLAGS_ExeAuto | _EP_FLAGS_HIDE);
err processing stuff here…
Thanks!December 23, 2016 at 5:55 pm #22613
Have you put a makemessage call in there to verify the contents of devkitpath?
Also you are using exeAuto flag. Sounds like worked until win 10. So maybe you need to change from auto to actually specifying the exe type. For a list of these flags look at WinExec.sh. I think you want _EP_Flags_ExeDos. How are you executing your Cmac Macro? You said that in testing you replaced ME with another program, how did you execute the macro?
ClayDecember 27, 2016 at 10:29 am #22616
Hi! Thanks for following this. Yes, devkitpath is OK, and it points to the path where makefile is located and the source file as well. Changed exeAuto flag to ExeDos, no help… Played with other flags from winexec, no help either. I’m running macro via Ctrl-F9 hotkey. When I was replacing ME with another program, I didn’t run the macro, I just run “nmake -a [mydll].dll “, i.e. same what I’m trying to run from the macro and it works just fine.
In my further tests, I copied the virtual machine with all the stuff, I just copied all the files from my colleague’s Multi-Edit folder over the my installed one and surprisingly it works now. When I’m doing the same on this virtual machine it doesn’t… 🙁December 27, 2016 at 4:47 pm #22619
In your first post you said
“Somehow MEW manages to see nmake.exe and midl.exe, but when it is turn of cl.exe it can’t find it. ”
I did not see midl and cl in the macro, Been a while but is it not nmake that invokes them?
So what is the difference from your coworkers install and yours. Does he have the virtual studio integration selected at install time?
Arte you getting actual error messages when this fails?
ClayDecember 27, 2016 at 8:01 pm #22620
Well 🙂 MEW calls nmake.exe and actually finds it, so environment variables seems to be working right here. Next step, nmake is running through the makefile, which tells to run midl.exe, cl.exe, link.exe, rc.exe and other VC stuff for proper compilation, files copying, intermediate files deletion, etc. If this process, somehow it is able to call midl.exe, but all the rest it is failed to run with the error that there is no such program, which tells me that here environment variables are somehow spoiled.
The colleague of mine, I don’t really know if she selected the visual studio support at the installation time. Do you think there might be a difference? What exactly VS integration adds to the standard ME?December 28, 2016 at 5:33 pm #22624
The Visual Studio integration is supposed to allow you to compile etc. from ME and Jump back to ME from VS.
Is Midl and Cl in the same location? Do they depend on different environment variables? How is your coworker compiling?
- You must be logged in to reply to this topic.