Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unresolvable external when linking reference error

Status
Not open for further replies.

VBmim

Programmer
Jun 25, 2001
361
BE
Hello

I am brand new to Powerbuilder and I have to support a quite big application. The company I work for has made a sort of framework of their own (containing multiple pbl's) to base their apps on (at least 5). In these apps you have to include the framework pbl's.
To get myself to learn this framework I built a little app of my own including the framework.

The problem is, I get an "unresolvable external object_name when linking reference at line 999 in event of object object" when I access a certain instance of user defined object (let's call it x) of this framework.

So, the situation is that I have two apps: my testapp, and the company app. If the error occures in my testapp, I can build it and then it is gone, but then it occures at the company's app. When I build the company's app, the error is gone there, but reapears at my testapp.

It seems like there is only one app that can use this framework in designtime. No problems occur at runtime however (Lucky for our customers :) ).

At first, I did not get the error message because powerbuilder crashed with a windows I-want-to-send-an-error-report error. I trapped the error by running the app in debug mode, and stepping through the app untill just before the offending line. There I tried a "quick watch" on the line 'isvalid(x)'. Strangely, quick watching x itself gives me the expected results.

Euhmm... is this clear? It's kind of complicaded huh?

My coworkers are aware of the problem but haven't found (or had time to find) a solution...
Because I can reproduce this situation, and because I isolated the line of code where it all hapens, I am sure that there is a solution out there...

If there is anyone who can help me?

Thanks in advance!

Greetz

VBMim
 
I forgot to mention,

The apps crashes when trying to access x, however if I do isValid(x) before trying to access x, powerbuilder just jumps to totally unrelated code... It always jumps to the same place, it is not arbitrary.
 
When you have multiple apps referencing the same base objects you have this problem. For example if your library list is:

c:\bigapp\bigapp.pbl
c:\ancestor\ancestor.pbl

for one app

c:\testapp\testapp.pbl
c:\ancestor\ancestor.pbl

for the other app

when you build/regenerate one you screw up the references to the objects in the ancestor.pbl for the other.

One solution is to make a copy of c:\ancestor\ancestor.pbl to some other folder and change the library list in your test app.

Matt

"Nature forges everything on the anvil of time
 
Hello Matt,

So, there is realy nothing I can do except make separate copies of our framework pbls for every program that exists? I knew it was gonna be something like that.

For the moment, I put the offending line in comment (it's setting a title of a window so not very important), and until now, I didn't had any problems but maybe it will reapear somewhere else later...

Thanks for the help!

Greetz

PBMim

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top