automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Trouble with MSVC `cl -c -o ...'


From: Milan Tichy
Subject: Trouble with MSVC `cl -c -o ...'
Date: Mon, 11 Oct 2004 14:20:30 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040803

Hello,

could someone help me with the following problem please?

I have some Makefile.am which uses feature of "renaming objects". It works fine with gcc etal. but fails with MSVC `cl' because of ``-c -o'' doesn't work. Here is a simple example:

---------------------
AM_CPPFLAGS        = ...

bin_PROGRAMS       = myprog-vX myprog-vY

myprog_vX_CPPFLAGS = $(AM_CPPFLAGS) -DXXX
myprog_vX_SOURCES  = myprog.c

myprog_vY_CPPFLAGS = $(AM_CPPFLAGS) -DYYY
myprog_vY_SOURCES  = myprog.c
---------------------

Then Makefile tries `cl ... -c -o myprog_vX-myprog.obj myprog.c' which generates 'myprog.obj' instead of 'myprog_vX-myprog.obj' and fails later when tries to link 'myprog_vX-myprog.obj' which cannot be found.

I used both AC_PROG_CC_C_O and AM_PROG_CC_C_O but it didn't help.

When I need to build libraries and using Libtool it's OK because Libtool does something like `cl ... -c myprog.c' and `mv -f myprog.obj ...'

Can I resolve this problems simply unless I have to write my own "rules"?

Thanks for any advice,

Milan Tichy
--
 Department of Computer Science       http://www.cs.tcd.ie/Milan.Tichy
 Trinity College Dublin               e-mail: address@hidden
 Westland Row 14.1.7                  phone:  +353-1-6083126
 Dublin, D2, Ireland                  fax:    +353-1-6772204




reply via email to

[Prev in Thread] Current Thread [Next in Thread]