Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Posted

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.

Posted

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".

.nerd
Posted (edited)

I think I got it

 

I think I figured out what the problem was. I changed two things and it worked. I'm 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?

Edited by mskeel

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...