creating a .dll

mskeel

Well-known member
Joined
Oct 30, 2003
Messages
913
Location
Virginia, USA
I would like to create a .dll of a class I reuse regulary and I need some help.

I keep getting the following errors on the command line compilation,

C:> vbc -t:library myClass.vb

Error BC30002: type ArrayList is not defined
Error BC30002: type HashTable is not defined

is this a linker problem (am I not linking properly)? Am I not importing other libraries correctly?

A little help with the command line compalitaion is greatly appreciated.

Thank you
 
tried imports in two ways

I tried importing system.collections both in the code itself, as I normally would, using the -imports argument via tha command line, and both at the same time to get the same results, same errors.
 
I can only speak for vb, but there you first need to rerefence the dll / component where the class resides.

Then you may want to add an "import" statement - which is just for the purpose of importing the namespace, thus allowing you to adress the object as "new Hashtable" instead of "new System.Collections.Hashtable".
 
I think I got it

I think I figured out what the problem was. I changed two things and it worked. Im not really sure if one or both had an impact.

I imported system.collections instead of the individual system.collections.hashtable, system.collections.arrrayList, etc.

I added an argument for setting the name of the output when compilation is complete.

I think the first had the primary impact on succesful compilation.

any ideas why this would be the case? Having to import the entire collections library instead of the individual parts?
 
Last edited by a moderator:
Back
Top