View Full Version : VB6 projects not getting compiled properly from VBP
saurabh
02-16-2012, 12:23 PM
Hello,
I'm compiling around 290 VB6 projects from my Visual Buid Pro script.
Have listed these project (.vbp) files with their path in a file and using a loop I'm reading these files one at a time and compiling them.
As part of this loop, I'm also updating the references if required using a script.
The issue I'm facing is that the project gets built successfully including all compilations. But when I launch the application I get display issues like some buttons on dialog boxes not seen full, texts on the right or bottom edge of the dialog boxes, forms getting half or full cut.
So I compiled these VB6 projects manually, registered their DLLs/OCXs and then launched the application again. I was now able to see everything working perfectly fine.
What could be the reason behind this? How do I fix this. I need to automate this project.
Any help would be greatly appreciated.
Thanks!
Saurabh
saurabh
02-16-2012, 12:32 PM
Another thing I forgot to mention:
When I compile the projects individually from visual build pro, i.e., only those projects separately as part of the script and not as part of the full build, everything works fine.
This is getting mysterious. I have no clue whats going wrong behind the curtains.
Help please!!
kinook
02-16-2012, 12:45 PM
What exactly is the difference between
"When I compile the projects individually from visual build pro, i.e., only those projects separately as part of the script"
and a "full build"?
Whatever those differences are apparently is a factor?
saurabh
02-16-2012, 01:00 PM
Here are my steps (full build)
1. Read VB6 proj name with its path from a file using loop action
----> 1a. Update reference for the %LOOP_VALUE% using a script
----> 1b. Compile %LOOP_VALUE% using Make VB6 action
And this is what I do for compiling projects individually
Copy 1a and 1b in the same VBP script. Replace %LOOP_VALUE% by the project name with its path and do the same what I have done above.
I'm not doing this in a different VBP script, rather in the same script.
DLL is created in both the cases. But in the latter case, the DLL produced has no issue. I did a diff between the two DLLs (of the same VB project) and found there are differences (hexadecimal differences). They got to be same, right. But they are different.
kinook
02-16-2012, 01:21 PM
It's possible for two sequential (no source code change) compiles of the same project to produce an executable file with differences (timestamps or other build-specific info stored in the executable), but all else being equal, they should have the same behavior. I can't explain how steps in a loop would generate executables with different behavior than identical steps not in a loop -- there must be some other difference coming into play. At any rate, it's the VB6 command-line executable (vb6.exe) that compiles projects into executables, not Visual Build itself.
saurabh
02-16-2012, 01:29 PM
I agree with both the points you mentioned:
There will be ifferences in the two DLLs, atleast timestamp difference. And Make VB6 does nothing but call VB6.exe in turn.
BTW, I have not tried/tested running the step group containing only the compile part (i.e group having step 1, 1a and 1b). I have eaither run full build (start to end) or have run only the extra step included to compile a single project.
DLL/OCX produced (from full build) have only run time issues (display not proper).
Do you think there could be some underlying issue which I'm not able to imagine. Only if I know the root cause of the problem will I be able to find a solution for that. I'm stuck bdaly!!
kinook
02-16-2012, 01:44 PM
I haven't heard of anything like that before. Could there maybe be some sort of circular dependency between projects that requires a particular build order for everything to work properly?
You might try putting all the projects in a .VBG file (could generate this using the loop you already have and write the filenames out like Project=filename) and building that from a Make VB6 step instead, letting it update references, and see if that makes any difference.
vBulletin® v3.8.11, Copyright ©2000-2024, vBulletin Solutions Inc.