R
Ramsey
Recently I was having a problem where the creation of an fstream object
in my lib file would crash. The lib file was linked to a managed dll.
I fixed the problem by changing the 'Run time library' to have a value
of 'Multi-threaded Debug DLL (/MDd)' on all the lib files, dlls, and
the executable in my solution.
Question 1) Why does my code require a Run time library? My lib file
makes no windows api calls. Just standard c++ objects like fstream.
Now I can understand the difference between debug mode and non-debug
mode. I can also understand the difference between single threaded and
multi-threaded. But I have no clue what the difference is between
'Multi-threaded (/MT)' and 'Multi-threaded DLL (/MD)'
Question 2) What is the difference between 'Multi-threaded (/MT)' and
'Multi-threaded DLL (/MD)'?
Question 3) Is this the difference between my code statically linking
to the Run-time library vs dynamically linking to the run-time library?
Question 4) And am I going to have to package extra dlls with my
release? I'd rather not if possible.
Question 5) Since my project uses a GUI, i can understand why
multithreaded libraries are required. But I don't understand why
creating an fstream object would crash when using 'Multi-threaded
(/MT)' while it would succeed when using 'Multi-threaded DLL (/MD)'.
Question 6) if 'Multi-threaded DLL (/MD)' setting is required when for
dlls, why didn't VS automatically set the when I created dll project in
my solution.
Any help in resolving my cluelessness is greatly appreciated.
Thank You,
Ramsey
in my lib file would crash. The lib file was linked to a managed dll.
I fixed the problem by changing the 'Run time library' to have a value
of 'Multi-threaded Debug DLL (/MDd)' on all the lib files, dlls, and
the executable in my solution.
Question 1) Why does my code require a Run time library? My lib file
makes no windows api calls. Just standard c++ objects like fstream.
Now I can understand the difference between debug mode and non-debug
mode. I can also understand the difference between single threaded and
multi-threaded. But I have no clue what the difference is between
'Multi-threaded (/MT)' and 'Multi-threaded DLL (/MD)'
Question 2) What is the difference between 'Multi-threaded (/MT)' and
'Multi-threaded DLL (/MD)'?
Question 3) Is this the difference between my code statically linking
to the Run-time library vs dynamically linking to the run-time library?
Question 4) And am I going to have to package extra dlls with my
release? I'd rather not if possible.
Question 5) Since my project uses a GUI, i can understand why
multithreaded libraries are required. But I don't understand why
creating an fstream object would crash when using 'Multi-threaded
(/MT)' while it would succeed when using 'Multi-threaded DLL (/MD)'.
Question 6) if 'Multi-threaded DLL (/MD)' setting is required when for
dlls, why didn't VS automatically set the when I created dll project in
my solution.
Any help in resolving my cluelessness is greatly appreciated.
Thank You,
Ramsey