Hyderabad Jobs Book Website FREE PowerBuilder Training I Love Hyderabad Hyderabad Colleges
Home Business Emails Hyderabad Classifieds Contact Us
7 Wonders of Hyderabad Web Hosting Yellow Pages Our Network

 
Webpowerbuilder.hyderabad-colleges.com

Advanced PowerBuilder

HomePrevious Lesson: Limits of a C++ User Object
Next Lesson: Embedded & Dynamic SQL

Other Issues to Consider

There are some project sites that maintain all the source code and that need to create the executable on their machine in batch mode; they don't want to do any GUI process and later they want to compare their executable file with the file we created byte by byte. To allow them to create the executable and DLL, you need to provide all the C++ source files and the make file as a DOS batch file.

If you come across this situation, capture the log file created by Watcom when you select Make All and submit the file to the production center. While creating the DLL, you will see this log file at the bottom of the main window:

Connecting...
cd c:\my-dlls
wmake -f c:\my-dlls\pb_fact1.mk -h -e
wpp ccuo_fcd.cpp -i=D:\WATC\h;D:\WATC\h\win -fhq -w4 -e25 -zq -otexan
-d2 -zu -bt=windows -ml
wpp cuo_facd.cpp -i=D:\WATC\h;D:\WATC\h\win -fhq -w4 -e25 -zq -otexan
-d2 -zu -bt=windows -ml
wpp lmain.cpp -i=D:\WATC\h;D:\WATC\h\win -fhq -w4 -e25 -zq -otexan -d2
-zu -bt=windows -ml
wlink SYS windows dll op m d all op st=8192 libf libentry.obj op maxe=25
op q op symf @pb_fact1.lk1
wrc -q -ad -s2 -s0 pb_fact1.dll
wfscopy pb_fact1.dll D:\WATC\binw\pb_fact1.dll
Execution complete

Remove the top and bottom line from the file and save this as a batch file with the .bat extension.

You'll also need to think about the path for the DLL file. When you create the user object, you specify the location and DLL file name in the Select C++ DLL file dialog box. If you simply specify the DLL file name, PowerBuilder will store the full path in its definition, as shown below:

string LibraryName="c:\my-dlls\pb_fact1.dll"

It will also look for the same path at execution time, which isn't what we want. Specifying .\pb_fact1.dll in the dialog box will overcome this problem. If you have already created the .DLL, before you create the final executable file, export the user object, edit the path and import it back.
HomePrevious Lesson: Limits of a C++ User Object
Next Lesson: Embedded & Dynamic SQL

Copyright © 1996 - 2006 HamaraShehar.com Pvt. Ltd. All Rights Reserved.
Domain Registration, Website Design, Website Hosting by HamaraShehar.com