Board index » cppbuilder » Re: linker error

Re: linker error


2004-07-02 09:39:55 PM
cppbuilder34
If I remember correctly _InitVCL (public name __InitVCL) is only
called if the project is built in Release mode as dynamic linked. If
you switched between debug mode and release mode then try doing a
File|Save_All and then a Project|Build_All.
. Ed
Quote
Sophi wrote in message
news:40e485af$ XXXX@XXXXX.COM ...

Thanks to all who responded re: output files. It helped alot.
Now I can't get my code to compile w/o error due to a linker
error. I know it is not the code since I am copying it directly
from a book and it is pretty simple. The error message is:
[Linker Error] Unresolved external '__InitVCL' referenced
from C:\PROGRAM FILES\BORLAND\CBUILDER5\LIB\
CP32MTI.LIB|crtlvcl

and I understand it to mean that my files .obj,.lib etc. are
not linking correctly with the .cpp Is there a procedure for
this? I am just going to file-new-console wizard or to
file-new-cpp...either way it is a problem.
 
 

Re:Re: linker error

Sophi,
When you created your console application, did you check the "Use VCL"
option? If so, uncheck that and try again.
-- YH --
 

Re:Re: linker error

I hate to post it again but I could not fix it with the help from the last
post.
[Linker Error] Failed to read from C:\PROGRAM
FILES\BORLAND\CBUILDER6\PROJECTS\LIB\BSVCL.LIB at offset 4774144 for 8192
bytes
[Linker Error] Failed to read from C:\PROGRAM
FILES\BORLAND\CBUILDER6\PROJECTS\LIB\BSVCL.LIB at offset 4882944 for 8192
bytes
...
If I changed codes and click "Project | Make" recompile it, the errors
appear. But it is disppeared when I make the project again. So every time I
need to make a project twice.
I hope Borland guys can figure out the problem. Thanks
Qimiao
 

{smallsort}

Re:Re: linker error

What is BSVCL.LIB?
-- YH --
 

Re:Re: linker error

That is my package name.
QL
"Yu-Chen Hsueh" < XXXX@XXXXX.COM >wrote in message
Quote
What is BSVCL.LIB?

-- YH --


--
Please confine your posts to the newsgroups and DO NOT reply to this
e-mail
account unless asked. Any unsolicted e-mail will be ignored.


 

Re:Re: linker error

Hi,
I tried to install an updated version of SDL components on my C++ Builder6.
I have sucessfully installed the new version of component.
But when i compile my code which implement these component it throws an
Fatal Linker error
The compiler says
it cannot open a library file (*.LIB) belonging to previous version.
How to eliminate this fatal error.
thank you.
Johnson Abraham
 

Re:Re: linker error

Johnson Abraham < XXXX@XXXXX.COM >wrote:
Quote

[...] How to eliminate this fatal error.
I assume that you are working with a new application. If not,
you need to make sure that all references to the old version
have been removed from the source. References can be found in
the header directly above the start of the class definition
and in the unit with #pragma link statement(s).
Then, in the IDE, Click Project | Options and select the
Packages tab. Toward the bottom of the tab, there is a section
labeled 'Runtime packages' which has a check box, an edit box
and a button.
These options can be misleading because it seems like these
items are for *only* the current project but they also affect
all new projects.
What you need to do is enter the edit box and locate and
remove *all* references to the old version but be careful.
If that doesn't solve the problem, you should ask in the IDE
group.
~ JD
 

Re:Re: linker error

Any idea of the cause of this?
[Linker Error] Fatal: Error detected (IMP2412)
[Linker Error] Fatal: Access violation. Link terminated.
thanks,
Simeon
 

Re:Re: linker error

Simeon wrote:
Quote
Any idea of the cause of this?

[Linker Error] Fatal: Error detected (IMP2412)
[Linker Error] Fatal: Access violation. Link terminated.
What version of Builder are you running (including patches)?
--
Andrue Cope [TeamB]
[Bicester, Uk]
info.borland.com/newsgroups/guide.html
 

Re:Re: linker error

Borland 5.0 build 12.34 update pack1
"Andrue Cope [TeamB]" < XXXX@XXXXX.COM >wrote in message
Quote
Simeon wrote:

>Any idea of the cause of this?
>
>[Linker Error] Fatal: Error detected (IMP2412)
>[Linker Error] Fatal: Access violation. Link terminated.

What version of Builder are you running (including patches)?

--
Andrue Cope [TeamB]
[Bicester, Uk]
info.borland.com/newsgroups/guide.html
 

Re:Re: linker error

Hi all,
I want to use the TIdDateTimeStamp from Indy. If i use
the component in a new project everything works fine.
But if i want to use the component in an exsisting project
(i add #include "IdDateTimeStamp.hpp" just like in
my other new project ) but eventually i get the message:
[Linker Error] Unresolved external 'Iddatetimestamp::TIdDateTimeStamp::'
referenced from
D:\__ORDERCONTROL__\__ORDERCONTROL__VERSIE\FRAME_BEZORGERS.OBJ
[Linker Error] Unresolved external '__fastcall
Iddatetimestamp::TIdDateTimeStamp::TIdDateTimeStamp(Classes::TComponent *)'
referenced from
D:\__ORDERCONTROL__\__ORDERCONTROL__VERSIE\FRAME_BEZORGERS.OBJ
[Linker Error] Unresolved external '__fastcall
Iddatetimestamp::TIdDateTimeStamp::AddTDateTime(System::TDateTime)'
referenced from
D:\__ORDERCONTROL__\__ORDERCONTROL__VERSIE\FRAME_BEZORGERS.OBJ
[Linker Error] Unresolved external '__fastcall
Iddatetimestamp::TIdDateTimeStamp::GetWeekOfYear()' referenced from
D:\__ORDERCONTROL__\__ORDERCONTROL__VERSIE\FRAME_BEZORGERS.OBJ
Also all include path's have a refernce to the indy source.
Any suggestions ?
Frans
 

Re:Re: linker error

Frans wrote:
Quote
Hi all,

I want to use the TIdDateTimeStamp from Indy. If i use
the component in a new project everything works fine.
But if i want to use the component in an exsisting project
(i add #include "IdDateTimeStamp.hpp" just like in
my other new project ) but eventually i get the message:

Go to Project - options - Tab Packages
Add indy to the runtime packages at the bottom.
regards,
Koen
 

Re:Re: linker error

Quote

Go to Project - options - Tab Packages
Add indy to the runtime packages at the bottom.

The package is already installed, therefore also
visible on this tab.
If a inlcude the .hpp file there is no problem. But if
i make a new object then the warnings appear.
Frans
 

Re:Re: linker error

Frans,
Does your Library Path point to where the Indy libs and objs are?
-- YH --
 

Re:Re: linker error

Quote

Does your Library Path point to where the Indy libs and objs are?

Yes it does.
I just discovered that the option "build with runtime
packages" wasn't selected. While it is selected there
is no problem. Only the big disadvantage of selecting this
option is that the executable needs extra files.
Frans