Board index » cppbuilder » Re: BCB 6 - Annoying 'unresolved external' problems

Re: BCB 6 - Annoying 'unresolved external' problems


2003-08-08 01:10:24 PM
cppbuilder69
"George P Boutwell" < XXXX@XXXXX.COM >wrote in message
Quote
Anyone have somethings to try.
What is the "Build with runtime packages" setting set to in your EXE project
options?
- If it is not checked then the most likely cause of your problem is that
the BPR is missing LIB files. To fix this close your project, edit the bpr
(in notepad), make sure that for every BPI in the "PACKAGES" tag you have a
LIB in the "SPARELIBS" tag. Don't bother with the "LIBRARIES" tag since the
compiler will change that one as it sees fit.
- If it is checked then the most likely cause is either missing PACKAGE
keywords or you are missing packages in the EXE's runtime packages list.
You mentioned that you've already checked this so this probably isn't the
cause.
- Clayton
 
 

Re:Re: BCB 6 - Annoying 'unresolved external' problems

Clayton Arends wrote:
Quote
"George P Boutwell" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...


>Anyone have somethings to try.


What is the "Build with runtime packages" setting set to in your EXE project
options?

- If it is not checked then the most likely cause of your problem is that
the BPR is missing LIB files. To fix this close your project, edit the bpr
(in notepad), make sure that for every BPI in the "PACKAGES" tag you have a
LIB in the "SPARELIBS" tag. Don't bother with the "LIBRARIES" tag since the
compiler will change that one as it sees fit.
I've already done this. It won't compile with or without the 'Build
with runtime packages' checked.
Quote
- If it is checked then the most likely cause is either missing PACKAGE
keywords or you are missing packages in the EXE's runtime packages list.
You mentioned that you've already checked this so this probably isn't the
cause.
The classes have the keyword PACKAGE, the packages are in the Runtime
Package List, they are in the SPARELIBS and when I compile I still get
'unresolved external' link errors. I get them wheter I have 'Build with
runtime packes' checked or not.
Basically I can't link the EXE no mater what I do. I've even rebuilt
the EXE project and I get the same 'unresolved external' errors. If I
remove .LIBs from the SPARELIBS, I get errors about the .LIB missing,
instead. If I remove the .BPIs from the PACKAGES I get the same
'unresolved external' error messages. It's like it see the package
import file, but not the contents.
As an aside, Clayton, we have exchanged ng posts and e-mails about
this problem before. On a different project of mine. I continue to
have the same kinds of problems I had on the project with this one, the
difference between this project and the other one that we worked on, is
that this one has WAY more BPLs involved with it and so adding #pramga
link (which is what we ended-up with as an solution on the last project)
really doesn't seem to be an option on this project as it involves
adding more than way too many #pragma link statements. I've alredy
tried doing this and after adding the #pragma link for all the
unresolved externals that initially show-up (which it then all of sudden
finds), it then finds a BUNCH of unresolved externals in EACH of the 20
or so #pragma link files... So basically I go from 70-90 unresolved
externals to 400-something.
It's getting really frustrating. I had these same projects in BCB5
without problems. I haven't made such drastic changes that this should
be a problem. The only difference that seems to be significant in this
is BCB6.
Thanks,
George
 

Re:Re: BCB 6 - Annoying 'unresolved external' problems

Well... Turned-out to be an Header file that included an bunch of other
header files was problematic. Not sure exactly what at this point, but
removing (commenting out) that header file in all the files that
included it, and then adding specific includes seems to have fixed all
the problems. Just thought it'd bring everyone up to speed, incause
this ever helps someone else in the 'google' searches.
George
George P Boutwell wrote:
Quote
I'm constantly and continually running into 'unresolved external'
linker errors in BCB6. I've never had this kind of problem in my
programs/projects before in any of the BCB versions I've used before 6.
The problem I'm currently facing is in an project which builds my EXE
file, and uses an bunch (like a 20 or so) packages. I can't compile the
EXE as it says every form that I use in the EXE from the packages is
unresolved. I've got the keyword PACKAGE in front of these. If I look
at the package files in Dependancy Walker these forms are being
exported, etc.
 

{smallsort}

Re:Re: BCB 6 - Annoying 'unresolved external' problems

if the unresolved external is a "__intover" type then you can also get
around this by deleting all your .obj, .tds file and recompiling. This will
also clear it all up if you can work out which headers are causing the
problems.
"George P Boutwell" < XXXX@XXXXX.COM >wrote in message
Quote
I'm constantly and continually running into 'unresolved external'
linker errors in BCB6. I've never had this kind of problem in my
programs/projects before in any of the BCB versions I've used before 6.
The problem I'm currently facing is in an project which builds my EXE
file, and uses an bunch (like a 20 or so) packages. I can't compile the
EXE as it says every form that I use in the EXE from the packages is
unresolved. I've got the keyword PACKAGE in front of these. If I look
at the package files in Dependancy Walker these forms are being
exported, etc.

Why if I can see the export, if I include the Package in the Packages
list in the EXE, if the packages and EXE have all the same 'base' BPLs
can't I even get the EXE to compile statically!!!

Is there a systematic way to troubleshoot unresolved references.
Perhaps the link is confused and there's something I can do to nudge it
in the right direction?

At this point I can't even get it to compile after adding all 20 or
so packages as an #pragma link "FormName" statment in the .cpp that is
generating the link error (as doing that cause the number of unresolved
externals to go from 50 to 400) and I don't have the time to go through
and #pragma link all the individual files that this project uses.

Anyone have somethings to try. I've wasted the entire week on it
without really getting anywhere. I've gotta have a solution, get this
compiling and running, so I can make a bunch of changes before my
dead-line. HELP!

 

Re:Re: BCB 6 - Annoying 'unresolved external' problems

Daniel,
It wasn't. It was unresolved eternals on my own (properly exported)
forms, datamodules, and TObject-based classes. Just something in the
header was really confusing the linker.
George
Daniel wrote:
Quote
if the unresolved external is a "__intover" type then you can also get
around this by deleting all your .obj, .tds file and recompiling. This will
also clear it all up if you can work out which headers are causing the
problems.