public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Using Visual C++ under Cygwin build system
@ 2000-10-03 13:07 Chad Loder
  2000-10-03 14:51 ` Matthew Smith
       [not found] ` <200010032207.e93M7bh18034@laxmls02.socal.rr.com>
  0 siblings, 2 replies; 7+ messages in thread
From: Chad Loder @ 2000-10-03 13:07 UTC (permalink / raw)
  To: cygwin

Hello. I am developing a build system using Cygwin (GNU make, bash,
etc.) on Windows 2000.

Some of our subsystems must be built using Visual C++. Obviously
Visual C++ will not understand paths like "/c/foo/bar.c" (where
/c is the Cygwin mounted C: drive). However, since GNU make will
be producing targets and processing prerequisites with precisely
those kinds of paths, I foresee problems.

Has anyone dealt with this problem before? Any suggestions
(or examples)?

Thanks,
	Chad


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Using Visual C++ under Cygwin build system
  2000-10-03 13:07 Using Visual C++ under Cygwin build system Chad Loder
@ 2000-10-03 14:51 ` Matthew Smith
       [not found] ` <200010032207.e93M7bh18034@laxmls02.socal.rr.com>
  1 sibling, 0 replies; 7+ messages in thread
From: Matthew Smith @ 2000-10-03 14:51 UTC (permalink / raw)
  To: cygwin, Chad Loder

> Hello. I am developing a build system using Cygwin (GNU make, bash,
> etc.) on Windows 2000.
>
> Some of our subsystems must be built using Visual C++. Obviously
> Visual C++ will not understand paths like "/c/foo/bar.c" (where
> /c is the Cygwin mounted C: drive). However, since GNU make will
> be producing targets and processing prerequisites with precisely
> those kinds of paths, I foresee problems.

Use the 'cygpath' program included with cygwin.  It will convert back and
forth between cygwin and windows paths.  An example of using this in a make
file would be like this:

RES_FILE := $(shell cygpath -w $(OBJ_DIR)/resource.o)

cheers,
-Matt Smith



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Cygpath, backslashes, and sh.exe
       [not found]   ` <003101c02d8c$500db1c0$3c5350d8@guinness>
@ 2000-10-03 17:53     ` Chad Loder
  2000-10-03 17:57       ` DJ Delorie
  0 siblings, 1 reply; 7+ messages in thread
From: Chad Loder @ 2000-10-03 17:53 UTC (permalink / raw)
  To: cygwin

Hi all. Thanks for your help with cygpath (I *did* look in 
the FAQ, I just didn't know what to look for). :)

cygpath *seems* to be doing the right thing (it's hard
to tell), but there is some sort of problem with
backslashes. I have a rule like this:

%.obj : %.cpp
	$(CC) $(CPPFLAGS) $(shell cygpath -w $<)

The idea is that this will invoke sh.exe with something like:

 /c/VC98/bin/cl.exe /Fo:globref.obj c:\r7\jni\src\globref.cpp

But instead it seems to do:

 /c/VC98/bin/cl.exe /Fo:globref.obj c:r7jnisrcglobref.cpp

which causes the compiler to bomb out with:

 fatal error C1083: Cannot open source file: 'c:r7jnisrcglobref.cpp': No
such file or  directory

I figured I need to escape the backslashes before passing them
to a shell command. So I tried things like:

%.obj : %.cpp
	$(CC) $(CPPFLAGS) $(subst,\\,\\\\,$(shell cygpath -w $<))

but the subst function seems to just return an empty string (this
happens even when I use something without backslashes,
like $(subst,a,b,whatever).

Has anyone run into this?

Thanks,
	c

	c

At 05:50 PM 10/3/2000 -0500, you wrote:
>Chad:
>
>    Hey, no problem.  Let me know if you run into other problems.  My
>company uses it's own make system under cygwin as well.  We also use Visual
>C++ as the compiler.
>
>cheers,
>-Matt



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Cygpath, backslashes, and sh.exe
  2000-10-03 17:53     ` Cygpath, backslashes, and sh.exe Chad Loder
@ 2000-10-03 17:57       ` DJ Delorie
  2000-10-03 18:01         ` Chad Loder
  0 siblings, 1 reply; 7+ messages in thread
From: DJ Delorie @ 2000-10-03 17:57 UTC (permalink / raw)
  To: cloder; +Cc: cygwin

> %.obj : %.cpp
> 	$(CC) $(CPPFLAGS) $(shell cygpath -w $<)

Try this:

%.obj : %.cpp
	$(CC) $(CPPFLAGS) '$(shell cygpath -w $<)'

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Cygpath, backslashes, and sh.exe
  2000-10-03 17:57       ` DJ Delorie
@ 2000-10-03 18:01         ` Chad Loder
  0 siblings, 0 replies; 7+ messages in thread
From: Chad Loder @ 2000-10-03 18:01 UTC (permalink / raw)
  To: DJ Delorie; +Cc: cygwin

That did the trick! Now on to the next problem.

"Is life always this hard, or just when you're
 a kid?" :)

Thanks,
	c	

At 08:56 PM 10/3/2000 -0400, you wrote:
>
>> %.obj : %.cpp
>> 	$(CC) $(CPPFLAGS) $(shell cygpath -w $<)
>
>Try this:
>
>%.obj : %.cpp
>	$(CC) $(CPPFLAGS) '$(shell cygpath -w $<)'
>
>--
>Want to unsubscribe from this list?
>Send a message to cygwin-unsubscribe@sourceware.cygnus.com
> 


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Using Visual C++ under Cygwin build system
@ 2000-10-09 17:38 Suhaib M. Siddiqi
  0 siblings, 0 replies; 7+ messages in thread
From: Suhaib M. Siddiqi @ 2000-10-09 17:38 UTC (permalink / raw)
  To: cygwin

This is a bit late, but might be of interest to you and others.

From OpenDx CVS at http://www.research.ibm.com/dx

get dx/windows directory.  Greg, one of the IBM's OpenDX developer, wrote
some wrapers, which could allow you to use MSVC from Cygwin bash shell, and
execute GNU configure scripts to generate Makefiles.  The wrappers uses
MSVC, instead of GCC.

Suhaib

--------------------------------------------------------

--- Chad Loder <cloder@acm.org> wrote:
> Hello. I am developing a build system using Cygwin (GNU make, bash,
> etc.) on Windows 2000.
>

You might just want to use automake, autoconf and libtool.  AFAIK, they are
supporting VC++ syntax.

> Some of our subsystems must be built using Visual C++. Obviously
> Visual C++ will not understand paths like "/c/foo/bar.c" (where
> /c is the Cygwin mounted C: drive). However, since GNU make will
> be producing targets and processing prerequisites with precisely
> those kinds of paths, I foresee problems.
>

You should be able to use c:/foo/bar.c as a path name.  You may also want to
check the -win32 switch to the make command.

Cheers,

=====
Earnie Boyd
mailto:earnie_boyd@yahoo.com

---         < http://earniesystems.safeshopper.com >         ---
--- Cygwin: POSIX on Windows < http://gw32.freeyellow.com/ > ---
---   Minimalist GNU for Windows < http://www.mingw.org/ >   ---


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Using Visual C++ under Cygwin build system
@ 2000-10-04  8:49 Earnie Boyd
  0 siblings, 0 replies; 7+ messages in thread
From: Earnie Boyd @ 2000-10-04  8:49 UTC (permalink / raw)
  To: Chad Loder, cygwin

--- Chad Loder <cloder@acm.org> wrote:
> Hello. I am developing a build system using Cygwin (GNU make, bash,
> etc.) on Windows 2000.
> 

You might just want to use automake, autoconf and libtool.  AFAIK, they are
supporting VC++ syntax.

> Some of our subsystems must be built using Visual C++. Obviously
> Visual C++ will not understand paths like "/c/foo/bar.c" (where
> /c is the Cygwin mounted C: drive). However, since GNU make will
> be producing targets and processing prerequisites with precisely
> those kinds of paths, I foresee problems.
> 

You should be able to use c:/foo/bar.c as a path name.  You may also want to
check the -win32 switch to the make command.

Cheers,

=====
Earnie Boyd
mailto:earnie_boyd@yahoo.com

---         < http://earniesystems.safeshopper.com >         ---
--- Cygwin: POSIX on Windows < http://gw32.freeyellow.com/ > ---
---   Minimalist GNU for Windows < http://www.mingw.org/ >   ---

__________________________________________________
Do You Yahoo!?
Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free!
http://photos.yahoo.com/

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2000-10-09 17:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-10-03 13:07 Using Visual C++ under Cygwin build system Chad Loder
2000-10-03 14:51 ` Matthew Smith
     [not found] ` <200010032207.e93M7bh18034@laxmls02.socal.rr.com>
     [not found]   ` <003101c02d8c$500db1c0$3c5350d8@guinness>
2000-10-03 17:53     ` Cygpath, backslashes, and sh.exe Chad Loder
2000-10-03 17:57       ` DJ Delorie
2000-10-03 18:01         ` Chad Loder
2000-10-04  8:49 Using Visual C++ under Cygwin build system Earnie Boyd
2000-10-09 17:38 Suhaib M. Siddiqi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).