mskeel Posted February 23, 2004 Posted February 23, 2004 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 Quote
*Experts* mutant Posted February 24, 2004 *Experts* Posted February 24, 2004 You probably forgot to import the System.Collections namespace in which both ArrayList and HashTable reside. Quote
mskeel Posted February 24, 2004 Author Posted February 24, 2004 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. Quote
Heiko Posted February 24, 2004 Posted February 24, 2004 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". Quote .nerd
mskeel Posted February 27, 2004 Author Posted February 27, 2004 (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 February 27, 2004 by mskeel Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.