[ 
http://issues.apache.org/jira/browse/AXISCPP-855?page=comments#action_12332024 
] 

Henrik Nordberg commented on AXISCPP-855:
-----------------------------------------

Adrian wrote:
> Currently, the ANT scripts always use /MD for all built artefacts, but this 
> isn't always correct.
>
> In production builds (non-debug), the following should be used:
>  /MD for all libraries (DLLs) <--- This is currently correct!
>  /MT for all executables (EXEs, ie: SimpleAxisServer and test clients)

Actually, I believe always using /MD is not incorrect.
The /Mxx switches just say what version of the run time library should be used. 
You can link to it either statically or dynamically (i.e., as a DLL), and you 
can link to the thread aware version or the non-thread aware version.

/MD links with the thread-aware run time library in a DLL, but this doesn't 
mean you can only do so when your code should be in a DLL.
/MT links with the thread-aware run time library statically, but this doesn't 
mean you cannot do so when your code should be in a DLL.

> Incorrect combinations of multithreading flags for MS VC++ in ANT scripts
> -------------------------------------------------------------------------
>
>          Key: AXISCPP-855
>          URL: http://issues.apache.org/jira/browse/AXISCPP-855
>      Project: Axis-C++
>         Type: Bug
>   Components: Build - ANT
>     Versions: current (nightly)
>  Environment: MS Windows, MS Visual C++
>     Reporter: Adrian Dick
>     Priority: Minor

>
> I have noticed we're not always using the correct compiler flag when 
> producing multithreaded binaries on Windows with Visual C++.
> Currently, the ANT scripts always use /MD for all built artefacts, but this 
> isn't always correct.
> In production builds (non-debug), the following should be used:
>   /MD     for all libraries (DLLs)                      <--- This is 
> currently correct!
>   /MT      for all executables (EXEs, ie: SimpleAxisServer and test clients)
> In debug builds:
>   /MDd   for all libraries (DLLs)
>   /MTd    for all executables (EXEs, ie: SimpleAxisServer and test clients)
> So far, this isn't seen as causing problems on any our testcases, but this 
> could be down to luck, or perhaps our testcases don't stress the system 
> sufficiently to expose the problems.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to