Compiling c++

Home Forums Multi-Edit FAQ Compiling c++

This topic contains 7 replies, has 2 voices, and was last updated by  Clay Martin 4 months, 4 weeks ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #22607

    VZH
    Participant

    Hi,

    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…

    #22610

    Clay Martin
    Keymaster

    Hi,
    Not sure I am following this. Can you post the bat file and the macro?
    Thanks,
    Clay

    #22612

    VZH
    Participant

    Hi!
    BAT file:
    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 CompileScalaStr()
    {
    str RealFile = FILE_NAME;
    str prgName = CAPS(TRUNCATE_EXTENSION(TRUNCATE_PATH(RealFile)));
    str devkitPath = COPY(RealFile, 1, XPOS(prgName, CAPS(RealFile), 1) – 1);
    str prgtorun;
    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!

    #22613

    Clay Martin
    Keymaster

    Hi,
    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?

    Thanks,
    Clay

    #22616

    VZH
    Participant

    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… πŸ™

    #22619

    Clay Martin
    Keymaster

    Hi,
    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?

    Thanks,
    Clay

    #22620

    VZH
    Participant

    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?

    #22624

    Clay Martin
    Keymaster

    Hi,
    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?

    Clay

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.