views:

1239

answers:

3

Anyone knows how to compile a vb6 webclass dll from a command line? I am trying to build a tool for automating version building, but it fails with an 'Compile Error in File '[file name]', Line xxxx : Variable not defined' alert displayed.

+1  A: 

It sounds like you need to CTRL-F5 and see what the compile error is, VB6 will allow you to run in debug while there are still errors that won't make it past the compiler, there is probably something that needs to be resolved. Here's a sample for compiling from the command line from a bat file.

set vssdir=c:\_vss\
VB6 /MAKE "%vssdir%Project.vbp" /outdir "%vssdir%testbuild"
cmsjr
Project is compiling fine from IDE - without any error. I use the same method you wrote and get this error. Do you use it to build webclass dll?
Michal Dymel
A: 

Does the code build in the debugger?
Check the help available for the switches by running "vb6.exe /?" Something like:

path_to_vb6_exe /l path_to_my_project_name

should work. I'm thinking /l not /m as it's a webclass dll so will be activeX. Whenever I've had errors like the one you describe reported from VB6 run from the command line, it's been 'cos the code wouldn't build.

However it does have a few foibles when run from the command line. I found that if I had custom tabs for user controls set up in the IDE, the compile from the command line would always fail.

Hamish Smith
/l gives the same error
Michal Dymel
+8  A: 

Known bug http://support.microsoft.com/kb/190165

cmsjr
Is there any known workaround to make it compile without using IDE?
Michal Dymel