Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: Compiling on Windows with MS VC Express 2008 and mr 3.6+

  1. #11
    Join Date
    Dec 2004
    Location
    Marina Del Rey, California
    Posts
    4,143

    Default Re: Compiling on Windows with MS VC Express 2008 and mr 3.6+

    Hi all,

    I noticed that the SP1 version of Express 2008 takes a lot longer to download and install. Just thought I'd warn you.

    Also, when loading the SDK for 64-bit you can choose to leave out some elements, and it should go faster.

    I'm not sure, but it looks like maybe some of what was in the SDK was moved into the Express 2008 download, so that is why the shifting in time. But I noticed that overall, for a 64-bit system, the total download and install time was faster.
    Barton Gawboy

  2. #12
    Join Date
    Dec 2007
    Posts
    27

    Default Re: Compiling on Windows with MS VC Express 2008 and mr 3.6+

    I think I mention this above in step 2, but I'll repeat it here...

    Copy io.h to unistd.h in the same directory.

    Thanks, but copy them from where? , I have the io.h by default in my VC 2008 include folder , but all I need is unistd.h

  3. #13
    Join Date
    Dec 2004
    Location
    Marina Del Rey, California
    Posts
    4,143

    Default Re: Compiling on Windows with MS VC Express 2008 and mr 3.6+

    make a copy of the io.h in that directory and rename it as unistd.h

    The same contents, just different names.
    Barton Gawboy

  4. #14
    Join Date
    Dec 2007
    Posts
    27

    Default Re: Compiling on Windows with MS VC Express 2008 and mr 3.6+

    Hi Bart,

    Perfect at least one of my problems is gone Thank you so much again.

  5. #15
    Join Date
    Jul 2009
    Posts
    2

    Default _secure_scl

    Hi Bart,

    Your mention of -D_SECURE_SCL=0 in an earlier post seems to be significant. We have a large existing application compiled with VC9 (where the default is _SECURE_SCL=1), and there are compatibility problems with some STL containers between code compiled with VC8 and VC9, unless the VC9 code is compiled with _SECURE_SCL=0. Is Mental Ray compiled with VC9 available, or will it be soon ?

    Thanks,
    Steve.

  6. #16
    Join Date
    Feb 2010
    Posts
    1

    Default Files

    Hi

    I was woundering where i can get the msiand lib file for MR?

    >>INCLUDE C:\Program Files\mental images\mental ray nt-x86-vc8\include

    >>LIB C:\Program Files\mental images\mental ray nt-x86-vc8\lib;

  7. #17
    Join Date
    Nov 2009
    Posts
    12

    Default Link fatal error

    Having a linking error:

    running 'one_color_64.bat' in the SDK v7.1 cmd window after setting everything from above. The cl line finishes with no issue, but the Link line does not: I get this:

    fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'

    Anyone have a clue as to what this is, or possibly how to reset the /MACHINE config so that x86 is either x64 ever, or x86 is not included in this possibility?

    And, of course, from the command line.

    VS express 2008 is no longer available. Im using VS 2010 express (but it still does not come with the 64bit bat files it needs to be configured through vcvarsall.bat, so you can't use that natively.

    I have downloaded and am using the cmd window through Windows SDK v7.1 to do all of this. And I am using the setenv.cmd with these args: /Debug /Release /x64 /win7

    BOTH the Windows VS 2010 and Windows SDK 7.1 get the same machine config error.

    And yes, I'm on a 64bit win7 machine.

    Cheers.
    - Jimbo

    Here is the stdout of the one_color_64.bat

    C:\Program Files\Microsoft SDKs\Windows\v7.1>cd "C:\cygwin\home\jimbo\mray\ackShaders\WMRS_source_ april_2008\shaders"

    C:\cygwin\home\jimbo\mray\ackShaders\WMRS_source_a pril_2008\shaders>one_color_64.bat

    C:\cygwin\home\jimbo\mray\ackShaders\WMRS_source_a pril_2008\shaders>REM Microsoft "Windows" batch file for the compilati

    C:\cygwin\home\jimbo\mray\ackShaders\WMRS_source_a pril_2008\shaders>REM in the book "Writing mental ray Shaders: A perce

    C:\cygwin\home\jimbo\mray\ackShaders\WMRS_source_a pril_2008\shaders>REM Compilation is described in http://www.writingsh

    C:\cygwin\home\jimbo\mray\ackShaders\WMRS_source_a pril_2008\shaders>REM Also see the subsection "Dynamic Linking of Shad

    C:\cygwin\home\jimbo\mray\ackShaders\WMRS_source_a pril_2008\shaders>REM Writing Shaders" in the on-line mental ray docum

    C:\cygwin\home\jimbo\mray\ackShaders\WMRS_source_a pril_2008\shaders>REM Compilation commands for shader "one_color.c"

    C:\cygwin\home\jimbo\mray\ackShaders\WMRS_source_a pril_2008\shaders>REM for 64-bit systems using Visual C++ 2008 Express

    C:\cygwin\home\jimbo\mray\ackShaders\WMRS_source_a pril_2008\shaders>call set_variables_64.bat

    C:\cygwin\home\jimbo\mray\ackShaders\WMRS_source_a pril_2008\shaders>set WMRS_C_FLAGS=/c /O2 /MD /nologo /W3 -DWIN_NT -DB

    C:\cygwin\home\jimbo\mray\ackShaders\WMRS_source_a pril_2008\shaders>set WMRS_CPP_FLAGS=/TP /c /O2 /MD /nologo /W3 /EHsc

    C:\cygwin\home\jimbo\mray\ackShaders\WMRS_source_a pril_2008\shaders>set WMRS_INCLUDE_FLAGS=/I"C:\Program Files\Autodesk\

    C:\cygwin\home\jimbo\mray\ackShaders\WMRS_source_a pril_2008\shaders>set WMRS_LINK_FLAGS=/nologo /nodefaultlib:LIBC.LIB /

    C:\cygwin\home\jimbo\mray\ackShaders\WMRS_source_a pril_2008\shaders>set WMRS_MT_FLAGS=-nologo -manifest

    C:\cygwin\home\jimbo\mray\ackShaders\WMRS_source_a pril_2008\shaders>cl /c /O2 /MD /nologo /W3 -DWIN_NT -DBIT64 /I"C:\Pro
    one_color.c

    C:\cygwin\home\jimbo\mray\ackShaders\WMRS_source_a pril_2008\shaders>link /nologo /nodefaultlib:LIBC.LIB /OPT:NOREF /INCR
    miaux.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'

    C:\cygwin\home\jimbo\mray\ackShaders\WMRS_source_a pril_2008\shaders>mt -nologo -manifest one_color.dll.manifest -outputr

    one_color.dll.manifest : general error c1010070: Failed to load and parse the manifest. The system cannot find the file

    C:\cygwin\home\jimbo\mray\ackShaders\WMRS_source_a pril_2008\shaders>
    Last edited by Jimbo; September 3rd, 2010 at 02:37.

  8. #18
    Join Date
    Nov 2009
    Posts
    12

    Default

    Windows 7; 64bit -- compiling Andy's shaders.

    It worked.

    I ran "all_shaders_64.bat" this morning and everything compiled.

    Yesterday:
    1.) reloaded "Microsoft Visual Studio 2010" -- chose the C++ version
    2.) rebooted
    3.) reloaded "Microsoft SDK v7.1"
    4.) rebooted
    Today:
    5.) opened the cmd window from the "Microsoft Visual Studio 2010" directory.
    6.) setenv /Release /x64 in the window (Forgot one important thing: The setenv.cmd file CLEARS LIB and INCLUDE. You must edit 'setenv.cmd' so that it points to the LIB and INCLUDE directories that you need. SetEnv.cmd is contained in: ...Microsoft SDKs/Windows/v7.1/Bin/
    Just below where it says "Clear the paths", you will see:
    SET LIB=
    SET LIBPATH=
    SET INCLUDE=

    Add the following below those:
    SET LIB="C:\Program Files\Autodesk\Maya2011\devkit\eg# V8457Blib\nt"
    SET LIBPATH="C:\Program Files\Autodesk\Maya2011\devkit\mentalray\lib\nt"
    SET INCLUDE="C:\Program Files\Autodesk\Maya2011\devkit\mentalray\include"

    Then, cd'd to my work area and...

    7.) ran "set_variables_64.bat"
    8.) ran "components_64.bat"
    9.) ran "one_color_64.bat" -- It completed with no errors.
    10.) ran "all_shaders_64.bat" -- It completed with no errors.

    Why? You got me. But this is what I did.

    Windows 7; 64bit -- compiling Andy's shaders.
    Last edited by Jimbo; September 7th, 2010 at 18:25.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •