问题
We have an application that is built using PFC. I am facing a strange problem. When I define a workspace and open only the PFC librares, I can migrate and do a full Build. However, when I include this in my application library, it will not build, and gives me an error stating C0001: Illegal datatype s_printsetupattrib.
This error occurs wherever it is used.
Googling hasn't given any answers. I have tried to regenerate s_printsetupattrib within the pfcapsrv.pbl, and it regenerates fine. The next step I tried was to regenerate pfc_n_cst_platform (pfcapsrv.pbl), and other such objects, but these do not regenerate, and throw this error.
Is there anything in the sequence in which the pbl need to be listed in the application migration library list?
I will appreciate any help in the matter.
Regards, Ndesai.
回答1:
If you can migrate your PFC without errors, it isn't the 6.5 PFC. I've migrated 6.5 to 9.0 but I don't have my notes anymore. The printer setup is one of the things Sybase added around version 8 or 9. Older PFC used a custom DLL and the structure to show the system printer dialog, but newer vintages of PB have the call built in so the PFC calls that. Newer versions of the PFC use objects instead of structures to pass values. That's another way I know you aren't using an old PFC. Your 6.5 app however is written for the old PFC.
I recommend you get the latest build of the PFC for 10.5 from Codeplex. I think the help is in that package, if not ping me and I'll find you a link. Look at the new way to call the print setup in PFC and change your code accordingly. There are some non-PFC gotchas to look out for. Look through Terry's archive of PowerBuilder changes to see what might bite you. Off the top of my head, I think there are behavior changes for editmasks, treeviews, and DataWindow events (order they happen).
回答2:
I noticed this question is dated, but adding my 2cents since you didn't really get an answer.
If you are using a project object, and perform the build "deploy" from there and "full build" is specified then PB automatically compiles things in the right order, no need to put things in order unless you have duplicate object names which isn't the best idea. I guess I'd recommend checking to make sure you don't have duplicate objects in your PBL's also.
If you still run into problems I've had problems where PB compiler gets confused like self referencing situations or other complex situations and it's a PITA, most the time this happens it is something that was poorly designed anyway so try to understand what is going on and modify the code, not what you want to hear but stuff happens.
Or... as another workaround we've had trouble code that doesn't compile properly and when it fails, you find the object that won't compile (in your case the one referencing the structure) and open it with file--> open source, find code referencing the structure and if feasible comment it out and try the recompile. After everything compiles open the manually commented object and compile.
What you are describing isn't totally uncommon, sometimes you have to get creative especially when using the dated PFC.
Sincerely, Rich
来源:https://stackoverflow.com/questions/3123941/migrating-from-powerbuilder-6-5-to-10-5