Menu

#1 msvc static library

open
nobody
None
5
2002-05-18
2002-05-18
Anonymous
No

Hi,
i have to write a build file for the project which is
a combination of c++ and java code.
I got the Java part building using Ant and i am using
cc task from ant contrib to build the C++ part. I saw
a posting in Ant user forum, regarding the CC task. So
i was wondering if you can please help me with this. I
need to build a shared library. So i have written a cc
task like this.

<target name="_compile_GsmModem"
depends="_prepare_build">
<condition property="use.msvc">
<os family="windows" />
</condition>

<cc debug="false" link="static"
objdir="${gsmmodem.dir}/Debug"
outfile="${ovissdk.dir}/GsmModem.lib">
<compiler name="msvc" if="use.msvc" >
<defineset define="WIN32, _DEBUG,
_MBCS, _LIB"/>
</compiler>
<fileset dir="${gsmmodem.dir}" />
<includepath location="**/Ovis/**" />
</cc>
</target>

when i execure the ant, i get the following error.

_compile_GsmModem:
[cc] Compiling "GsmConfig.cpp"
because "GsmConfig.obj" does not exist.
[cc] GsmConfig.cpp
[cc] Compiling "GsmModem.cpp"
because "GsmModem.obj" does not exist.
[cc] GsmModem.cpp
[cc] Compiling "PduUtil.cpp"
because "PduUtil.obj" does not exist.
[cc] PduUtil.cpp
[cc] Compiling "SmsContent.cpp"
because "SmsContent.obj" does not exist.
[cc] SmsContent.cpp
[cc] Linking "GsmModem.lib" because it does not
exist.
[cc]
C:\EMMS\Prototype\Ovis\GsmModem\GsmModem.dep : fatal
error LNK1136: invalid or
corrupt file

BUILD FAILED

Can you please help me with this to find out what may
be going on. Do i need to add more compiler
definitions?

also, the folder i gave as src contains some files
other than c/c++ type. When i run ant, i get the error
saying corrupt file. What do i do?

Thanks,
Vani.

Discussion


Log in to post a comment.