cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-1326665 ] VC6 Build static with /MT not /MD

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Sat, 15 Oct 2005 00:40:40 -0700

Bugs item #1326665, was opened at 2005-10-14 13:35
Message generated for change (Comment added) made by temprimus
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1326665&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: compile or build problem
Group: portability problem
Status: Open
Resolution: Fixed
Priority: 5
Submitted By: TemPRImuS (temprimus)
Assigned to: Daniel Stenberg (bagder)
Summary: VC6 Build static with /MT not /MD

Initial Comment:
Version: 7.15.0

In the file Makefile.vc6 the code is always generated
as Multi-threaded DLL or Multi-threaded DLL Debug, but
I think the static library should be Multi-threaded and
Multi-threaded Debug.

In other words I think the /MD and /MDd options at line
70 and 71 needed to be /MT and MTd for the static library

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

>Comment By: TemPRImuS (temprimus)
Date: 2005-10-15 09:40

Message:
Logged In: YES
user_id=1359436

Sorry my mistake. I didn't think you would make the changes
so fast.

The thing is, I don't know what's good about "Mulithreaded
DLL", because I build all my codes "Multithreaded".

But I can't say it's wrong or not, so I think the best way
is to make an option from it.

The attached diff file makes a build option available so if
you set rtlibcfg=static for the make, then it would build
with /MT. The default behaviour is /MD (the original). I
hope the CRLF line endings
are no problem.

so example:

nmake -f Makefile.vc6 cfg=release rtlibcfg=static

would build the static release library with /MT

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

Comment By: Daniel Stenberg (bagder)
Date: 2005-10-14 23:13

Message:
Logged In: YES
user_id=1110

You said line 70 and 71, I changed them. Now you say I did
wrong. What was wrong?

Now I remember why I should insist on getting patches.

So can you please spell it out to me what you want those
lines to look like? I'm completely unaware of all those
details in the MS and Microsoft world.

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

Comment By: TemPRImuS (temprimus)
Date: 2005-10-14 17:47

Message:
Logged In: YES
user_id=1359436

Thanks.
I see you changed the configuration for both the static and
the dll versions was this intentional?

I read a little because I was not sure in something so here
is my concern:

As I saw the difference between the two build options is how
dlls and executables interact with each other, so for static
libraries /MT is probably the best, but for the dlls only if
there is no memory allocation or deallocation of external
variables.

I only know the interface of the library so I don't know if
this is true for your code or not. But if you allocate or
deallocate memory for variables you got not from libcurl,
then this option for the dll is not safe so you need to
divide this part to two one for the static libraries with MT
and one for the dlls with MD.

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

Comment By: Daniel Stenberg (bagder)
Date: 2005-10-14 15:23

Message:
Logged In: YES
user_id=1110

Thanks, applied and committed to CVS just now.

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

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1326665&group_id=976
Received on 2005-10-15

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET