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: Thu, 20 Oct 2005 12:08:46 -0700

Bugs item #1326665, was opened at 2005-10-14 13:35
Message generated for change (Comment added) made by bagder
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: Closed
>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: Daniel Stenberg (bagder)
Date: 2005-10-20 21:08

Message:
Logged In: YES
user_id=1110

Sorry, the confusion was on my part since the file said 1.17
(while being 1.67).

Your patch was applied and committed just now. If you give
me your real name I'll use that when giving credit for this
change.

Thanks!

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

Comment By: TemPRImuS (temprimus)
Date: 2005-10-20 18:23

Message:
Logged In: YES
user_id=1359436

ok. I attached the results with "diff -u".

(My lib/Makefile.vc6 has really the version 1.67 and the
src/Makefile.vc6 is 1.31 . My cvsroot is
"cool.haxx.se:/cvsroot/curl")

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

Comment By: Daniel Stenberg (bagder)
Date: 2005-10-20 13:26

Message:
Logged In: YES
user_id=1110

ok, sounds like a fair approach

Can you please make your patch with diff -u? I couldn't
apply this.

(My lib/Makefile.vc6 is now at 1.17 while this patch is said
to be for 1.67, typo or confusion?)

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

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-20

These mail archives are generated by hypermail.

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

File upload with ASP.NET