Click here to Skip to main content
16,020,973 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I read the book, which name is "Object-Oriented Programming with Visual Basic .NET"
I don't understand how to create file hello.dll from file hello.vb and what mean's "C:\>vbc /t:library hello.vb" in the part 2.1:
"
Example 2-1 contains the listing for our "Hello, world" component. It contains a single class named Hello with a single method named Write. Save the listing to a file named hello.vb. The rest of the chapter will use this listing as a foundation of discussion.

Example 2-1. The "Hello, world" component

Option Strict On
Imports System Namespace Greeting
Public Class Hello
Public Sub Write(ByVal value As String)
Console.WriteLine("Hello, {0}!", value)
End Sub
End Class
End Namespace


The Visual Basic .NET command-line compiler is a program called vbc.exe that should be in your path once the .NET Framework is installed. All examples in this book assume that the example code exists in the root directory of your hard drive. This assumption is made to improve readability. If the code is not in your hard drive's root directory, you need to specify a fully qualified pathname to the compiled file or compile from the directory where the source code is located. With this in mind, you should be able to compile Example 2-1 to a dynamic link library (DLL) as follows:

C:\>vbc /t:library hello.vb
The /t: option is short for target, which can be one of the following values:

exe
A console application. If the /t switch is omitted, this is the default value.

winexe
A Windows executable.

library
A DLL.

module
A module. This value is similar to a .lib file in C++. It contains objects but is not an executable.

As a default, the compiler gives the output file the same name as the file being compiled. Here, a file named hello.dll is produced.

"
can you help me???
thanks in advance!
Posted
Updated 4-Jan-10 2:27am
v2

It means you need to enter the "vbc..." bit into a command line. If you've got visual studio installed, there'll be a shortcut in your start menu (Microsoft Visual Studio 20xx -> Visual Studio Tools -> Visual Studio 20xx Command Prompt) that'll open a command prompt with all the paths set up to run the visual studio command line tools (like vbc, the Visual Basic Compiler)
 
Share this answer
 
If you are using Visual studio, just create a class library and build using the build menu option.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900