This is the mail archive of the cygwin mailing list for the Cygwin project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
"Rajagopalan, Karthik" wrote: [...] > I am > trying to compile a C program through "Makefile" from Cygwin. This C > program has syntax errors which are supposed to be shown by Cygwin when > running C compiler. It just indicates the following lines and stops : > > make: *** [/cygdrive/h/test.obj] Error 1 > > If I run the C program without using "Makefile" from Cygwin, errors are > properly indicated. [...] If you does invoke VC compile in Makefile like this: > msdev MakeTest.dsp /MAKE "MakeTest - Win32 Debug" then use this workarounds: > msdev.com MakeTest.dsp /MAKE "MakeTest - Win32 Debug" or that one: > bash -c '{ msdev MakeTest.dsp /MAKE "MakeTest - Win32 Debug" | cat; [ "$${PIPESTATUS[0]}" = 0 ]; }' This is probably issue somehow related to: http://groups.yahoo.com/group/vimdev/message/33770 In case any Cygwin developer care to debug this problem, I've prepared minimal test case. Attached MakeTest.tgz contains VC++ 6.0 project and Makefile: MakeTest/Makefile MakeTest/MakeTest.cpp MakeTest/MakeTest.dsp MakeTest/MakeTest.dsw There is intentional syntax error in MakeTest.cpp file. Makefile does have two targets: > all: > msdev MakeTest.dsp /MAKE "MakeTest - Win32 Debug" > > betterall: > bash -c '{ msdev MakeTest.dsp /MAKE "MakeTest - Win32 Debug" | cat; [ "$${PIPESTATUS[0]}" = 0 ]; }' Steps to reproduce: - Unpack attached tgz - Make sure that directory with 'msdev.exe' from Visual C++ 6.0 is in your PATH (usually c:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin\) - start bash in normal windows console (NOT rxvt) - cd to MakeTest directory - type 'make all' Output will NOT contain messages from msdev: > $ make all > msdev MakeTest.dsp /MAKE "MakeTest - Win32 Debug" > make: *** [all] Error 1 - type 'make betterall' Output WILL contain messages from msdev: > $ make betterall > bash -c '{ msdev MakeTest.dsp /MAKE "MakeTest - Win32 Debug" | cat; [ "${PIPESTATUS[0]}" = 0 ]; }' > --------------------Configuration: MakeTest - Win32 Debug-------------------- > Compiling... > MakeTest.cpp > d:\Sources\MakeTest\MakeTest.cpp(6) : error C2059: syntax error : '}' > d:\Sources\MakeTest\MakeTest.cpp(6) : warning C4508: 'main' : function should return a value; 'void' return type assumed > Error executing cl.exe. > > MakeTest.exe - 1 error(s), 1 warning(s) I've encountered this problem long long time ago, so it's not some recent regression. Both invocations of msdev from Makefile display messages correctly under rxvt console. Win2kSP4, all updates, cygwin1.dll snapshot 20040720, make 3.80-1, Visual C++ 6.0. Regards, Jacek. BTW: Shouldn't Cygwin and/or bash give preference to *.com over *.exe as windows' cmd does? Currently if you have t.exe and t.com in some directory in your path and you'll type 't' in shell then cygwin will start t.exe, and windows' cmd will start t.com.
Attachment:
MakeTest.tgz
Description: application/compressed
-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |