|
Wait! You upset me!
I mean, I expected that C/C++ compilers built an EXE or a LIB without
any particular library, 'cuz the program is compiled in machine code.
On the contrary, I knew that VB needed its
runtime libraries because EXE created with VB aren't "really compiled",
but need to be interpreted by an external server.
I built a simple "Hello world" C++ program with MS Visual Studio and
with DEV-C++ (using g++ compiler).
The result is that the first one depends on MSVC9 libraries and DOESN'T
work on the other machines, but the second one (which doesn't depend on
MSVC9 dlls) correctly runs everywhere...
Cannot I make a DLL-independent EXE with Visual Studio? It must be possbile!!!
|
|
|
|
|
Capitanevs wrote: I mean, I expected that C/C++ compilers built an EXE or a LIB without
any particular library, 'cuz the program is compiled in machine code.
Partially true. Code is compiled into native code modules that are linked together, either by stitching modules together into the .EXE or .DLL or by including external import table entries that load and call into external modules (library .DLL's) at runtime.
Capitanevs wrote: On the contrary, I knew that VB needed its
runtime libraries because EXE created with VB aren't "really compiled",
Yes they are. For VB6 and below, the code is compiled into native code, but with a bunch more imports of external library calls. For any language targeting the .NET CLR, code is compiled into a CPU-agnostic "middle" language, called MS intermidiate Language (MSIL), whcih is then compiled into native machine code on-demand, at runtime. But, the library import process is approximately the same.
Capitanevs wrote: I built a simple "Hello world" C++ program with MS Visual Studio and
with DEV-C++ (using g++ compiler).
The result is that the first one depends on MSVC9 libraries and DOESN'T
work on the other machines, but the second one (which doesn't depend on
MSVC9 dlls) correctly runs everywhere...
Cannot I make a DLL-independent EXE with Visual Studio? It must be possbile!!!
No, it's not. Every version of the .EXE or .DLL you make depends on the VC runtime libraries. It's just that some versions of the libraries come preinstalled in Windows, while other versions are installed by other applications when they're installed. This is why you seem to think that a version of your .EXE/.DLL doesn't require the runtimes. They do need them. It's just that they're already installed for you by something else.
If you made an installer for your application or .DLL, you'd have to include the runtime libraries in your installer.
|
|
|
|
|
Ok tnx!
I have worked out the matter.
VS2008 dynamically links to runtime libraries (vs98 dind't), and this confused me a bit.
Now it's all ok, as I was told how to force statical link of libraries.
Thank you a lot!
Michele
|
|
|
|
|
I'm a bit confused and thou made me upset...
I compiled a C-"Hello World" and a C++"Hello world" using MS VC++ 2008 Express edition default release settings.
Inspecting, I noticed that both of them depend on some kind of "Runtime Libraries" you told.
They are MSVC90R.DLL for pure C EXE and MSVC90R.DLL plus
MSCVP90DLL for C++ EXE.
I compiled the same sources with gcc/g++ compilers and, of course, there are no dependencies on external DLL.
I compiled the sourcers with my old VC++ compiler (Visual Studio 6, professional edition) and, again, I found
no dependencies on external DLL.
So
1) Why Ms decided to make EXE files DLL-dependent as default setting? Shouldn't C/C++ produce an executable the
most library-free as it can?
2) How can I avoid this? As I expect I CAN produce an executable which doesn't need VC2008 runtime libraries...can't I?
|
|
|
|
|
Capitanevs wrote: I compiled the same sources with gcc/g++ compilers and, of course, there are no dependencies on external DLL.
There are two ways to link an .EXE/.DLL together. One is to reduce the size of your final .EXE/.DLL by including all external code dependancies as imports from external libraries (dynamic linking.) The other is to sacrifice image size by including the actual code from the external libraries in your final .EXE/.DLL, thereby avoiding the imports (static linking.)
The downside to static linking is the greatly increased size of the final binary file as you've just included the minimum runtime and and external function calls into your code.
Some compilers/linkers setup static linking as default and some default to dynamic linking. MS preferes dynamic linking to reduce binary file size and decrease load times.
Capitanevs wrote: 2) How can I avoid this? As I expect I CAN produce an executable which doesn't need VC2008 runtime libraries...can't I?
You can't. Your code will always have the dependancies. It's just a matter of how you want to link the code together and what price you want to pay. If you want the external code linked into your.EXE, you'll pay for it with a much larger executable size. If you want a smaller file, you put up with installing the runtime libraries seperately.
No matter what compiler you use, you will always have external library dependancies. Even your gcc compiler uses runtime libraries. it's just that those external references have been resolved by copying the code from those libraries into your final .EXE/.DLL.
|
|
|
|
|
hey !
i want to write a program with out using dll file ..
i need the read, write and append functions :
and also plz tell how to check the file is already existing
with a eg
thx!
with regards!
varun
If I have seen further it is by standing on the shoulders of giants.
Isaac Newton, Letter to Robert Hooke, February 5, 1675
The key is always be open to learn from youngs or elders.
i know a little want to know lot more
|
|
|
|
|
varun conday wrote: need the read, write and append functions
How about using google (www.google.com - just in case)? A good start would be: "vb.net stream read write"
varun conday wrote: and also plz tell how to check the file is already existing
Use FileInfo or DirectoryInfo to find out whether a file or directory exists.
varun conday wrote: with a eg
No! There are plenty of examples out on the internet. Google!
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
That kind of stuff is hidden in the .NET Framework documentation. Basic File I/O[^]
|
|
|
|
|
Hello,
I need to extend the ComboBox control so that while the user types text, it automatically displays its drop-down containing only those of its items that contain the text being typed by the user. This is almost similar to using AutoCompleteMode = Suggest and AutoCompleteSource = ListItems but It must show not only items that start with the text being typed but all that have it as substring. How can I achieve this?
Thanks
Silvia Terzi
|
|
|
|
|
|
Yes, it's good. But how much is this?
|
|
|
|
|
Hello,
You can visit our website www.componentone.com for details to
purchase the control.
Regards,
Allen
Allen Smith
Software Engineer
ComponentOne LLC
www.componentone.com
|
|
|
|
|
It will be better if you use the Text_Changed Event of the combobox to fill out the details as items
by selecting from the database
In the database we can use some query for filtration as like '%datahere%'
before filling the data in the combo box we can clear all the previous items there.
|
|
|
|
|
Your seriously going to consider doing a database fetch on every keystroke in the control??
Think about the number of records you could possibly return, possible network speeds involved, how long to fetch and transfer those records, wipe out and repopulate the combo's list, yada, yada, yada, ... and you'll see how bad of a solution this is.
|
|
|
|
|
There is no event name "Text_Changed" under combo box of wpf.
|
|
|
|
|
Here we set the ComboBox Property
DropDownStyle=DropDownList
after setting the combobox property user only select a value from this list ,user can't write any in this combobox.
If user want to add more values in this list, user set the combobox property "Items", Here user can write our values
|
|
|
|
|
Hi..i m a student.
I m developing a project management tool which will track any software.
I want to send e-mails to all the developers to inform about a meeting.How can i do it using VB.NET.
Hope for your assintance....
|
|
|
|
|
Sending mail Through VB.net Application
See This link
http://www.codeproject.com/KB/vb/Manage_Dialup_Automatic.aspx[^]
or
Dim oMsg As System.Net.Mail.MailMessage = New System.Net.Mail.MailMessage()
oMsg.From = New System.Net.Mail.MailAddress("Sender ID", "Displayname")
oMsg.To.Add(New MailAddress(txtemailaddrs.Text, "Manage Dialup."))
oMsg.Subject = "mail subject"
oMsg.Body = " Test Mail"
Dim oSmtp As New SmtpClient("smtp.mail.yahoo.com")
oSmtp.DeliveryMethod = SmtpDeliveryMethod.Network
Dim oCredential As New NetworkCredential("yourmailid", "yourpassword")
oSmtp.UseDefaultCredentials = False
oSmtp.Credentials = oCredential
oSmtp.Send(oMsg)
Thnaks
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
You might want to shorten up your name a bit. It's 3 lines long and wastes a bunch of screen real estate.
|
|
|
|
|
Is their anyway to send without using SMTP Best Regards,
SOFTDEV
If you have knowledge, let others light their candles at it
|
|
|
|
|
I'm developing a piece of software too (not web based). On monday I was doing some research into how to send email. First thing I thought was "I need to send email using visual basic .net". So I went to google and typed in strings such as (by 'no luck' i mean that the answer wasnt on the first page)
"send mail .net" - no luck (only comes up with asp.net solutions)
"send email visual basic" - no luck (only comes up with vb6 solutions)
"send email .net" - no luck (only comes up with asp.net solutions)
"send email .net msdn" - THE ANSWER
how hard was that?
I dont want to put you off posting questions, I've found a lot of answers here in the past, but in future use GOOGLE before you ask.
and if you're still stuck heres the page that gave me all my answers
http://msdn2.microsoft.com/en-us/library/system.net.mail.aspx[^]
|
|
|
|
|
Hi Friends,
I am using DateTimePicker in my page.
But I want that datetimepicker control should be enabled for only current month and when we select previous or next month it should be disabled.
Please help me for this.
Regards,
|
|
|
|
|
What you will need to do is to write some code within the selecteddate changed event.
you should check the datetiempicker selecteddate vs system date...do a month comparison and then set the dtp.enabled to true/false.
hope this helps
|
|
|
|
|
Try this code
Private Sub DateTimePicker1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateTimePicker1.ValueChanged
If Not (DateTimePicker1.Value.Month = Now.Month AndAlso DateTimePicker1.Value.Year = Now.Year) Then
DateTimePicker1.Enabled = False
Else
DateTimePicker1.Enabled = True
End If
End Sub
|
|
|
|
|
For displaying current month in vb.net
we use Month(ToDay)
It display current month only
|
|
|
|