[ant-contrib - Help] RE: cc outfile not consistant
"SourceForge.net" <[email protected]> Thu, 16 Aug 2007 09:24:16 -0700
| Newsgroups | gmane.comp.java.ant-contrib.devel |
|---|---|
| Message-ID | <[email protected]> |
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4468494
By: philipmoore
Hi,
I found I was getting a problem like this when using g++ on Windows under
Cygwin.
I want to specify the output of my link as "HelloWorldCPP.dll", but instead
I get "libHelloWorldCPP.dll.so".
Easily rectified with a "move" task, but not exactly clean and tidy.
Is there some way to convince CC that I'm using Windows? I didn't see a way
to specify architecture (not sure whether this would even help). At any rate
the ccptask docs seem wrong as they suggest that specifying an extension will
override this behaviour, which it didn't for me:-
"outfile
Sets the output file name. If not specified, the task will only compile files
and not attempt to link. If an extension is not specified, the task may use
a system appropriate extension and prefix, for example, outfile="example" may
result in "libexample.so" being created."
Not a show stopper, but might be worth tidying this up.
Here's my <cc> and <move> blocks in case maybe I'm being a muppet:
<cc multithreaded="true" outtype="shared" outfile="${build}\${basename}.dll">
<compiler name="g++">
<includepath>
<dirset dir="C:\j2sdk1.4.2_15\include" />
</includepath>
<compilerarg location = "start" value = "-mno-cygwin"/>
<fileset file="${basename}.cpp" />
</compiler>
<linker name="g++">
<linkerarg location ="start" value = "-mno-cygwin"/>
<linkerarg location ="start" value = "--add-stdcall-alias"/>
</linker>
</cc>
<move file="${build}\lib${basename}.dll.so" tofile="${basename}.dll"/>
Cheers!
______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=113701
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/