Because the difference in directory, firstly, I enter in d:/Program Files/VC (in VS cmd) cl OK.cpp it shows: > Microsoft <R> 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for > 80X86 > Copyright <C> Microsoft Corposration. All rights reserved. > > OK.cpp > Microsoft <R> Incremental Linker Version 10.00.30319.01 > Copyright <C> MIcrosoft Corporation. All rights reserved. > > /out:OK.exe > OK.obj
then echo %errorlevel% 0 then, I login into cygwin in VS cmd, enter cd /cygdrive/d/Program\ Files/VC cl OK.cpp with exactly the same output as you wrote. echo $? 0 then login into the directory that petsc is in: $ /home/petsc-3.3-p6/bin/win32fe/win32fe cl -c OK.cpp OK.cpp $echo $? 0 Thanks! Hao Hao ________________________________________ 发件人: Satish Balay [[email protected]] 发送时间: 2013年5月21日 22:42 收件人: 余浩 抄送: [email protected] 主题: Re: [petsc-users] 答复: 答复: 答复: 答复: 答复: 答复: 转发: PETsc problem On Tue, 21 May 2013, 余浩 wrote: > I have a program OK.cpp in the directory d:/Program Files/VC/ thats a strange location to do compiles. > > #incldue<stdio.h> hm - typo? > int main() > { > printf("OK"); > return 0; > } > > after cl OK.cpp , > > Microsoft <R> 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for > 80X86 > Copyright <C> Microsoft Corposration. All rights reserved. > > OK.cpp > Microsoft <R> Incremental Linker Version 10.00.30319.01 > Copyright <C> MIcrosoft Corporation. All rights reserved. > > /out:OK.exe > OK.obj > > > Thanks! Please copy/paste the complete output from the following sequence of commands. Satish --------- C:\cygwin\home\balay\junk>cl OK.c Microsoft (R) C/C++ Optimizing Compiler Version 14.00.50727.762 for x64 Copyright (C) Microsoft Corporation. All rights reserved. OK.c Microsoft (R) Incremental Linker Version 8.00.50727.762 Copyright (C) Microsoft Corporation. All rights reserved. /out:OK.exe OK.obj C:\cygwin\home\balay\junk>echo %errorlevel% 0 C:\cygwin\home\balay\junk>c:\cygwin\bin\bash --login balay@msnehalem2 ~ $ cd junk/ balay@msnehalem2 ~/junk $ cl OK.c Microsoft (R) C/C++ Optimizing Compiler Version 14.00.50727.762 for x64 Copyright (C) Microsoft Corporation. All rights reserved. OK.c Microsoft (R) Incremental Linker Version 8.00.50727.762 Copyright (C) Microsoft Corporation. All rights reserved. /out:OK.exe OK.obj balay@msnehalem2 ~/junk $ echo $? 0 balay@msnehalem2 ~/junk $ ~/petsc.clone/bin/win32fe/win32fe cl -c OK.c OK.c balay@msnehalem2 ~/junk $ echo $? 0
