I have a very large project and I am tired of having to fight with Code
Gear's crappy linker (either it runs out of memory, I get access
violations and it terminates, etc).
Best Regards,
Shane
Go to http://andy.jgknet.de/cpp/ and download and install the excellent
Bcc32Pch plugin. It will give you an easy way to specify the alternate
linker.
Next go to ftp://ftp.styx.cabel.net/pub/UniLink/ and download
ulnb0317.zip (or a more recent verison if one exists). Expand the zip
file somewhere. One of the files is the alternate linker ulink.exe.
Now start CPB and then select Bcc32Pch Project Options... from the
Project menu. Now click on Compiler Tools in the list on the left. Next,
click on the ellipsis (...) button next to the iLink32 replacement
(Linker) edit box, and then select the ulink.exe file you expanded
previously.
You should be all set to use the alternate linker.
HTH
Dennis Cote
> Go to http://andy.jgknet.de/cpp/ and download and install the
> excellent Bcc32Pch plugin.
Better download the lastest snapshot version that fixes some bugs:
http://andy.jgknet.de/cpp/builds/
--
Regards,
Andreas Hausladen
Dennis,
Well, I guess I didn't originally do anything wrong.
I have done all that but the BCCIDE still invokes the default Borland
linker.
Any other missing steps?
Best Regards,
Shane
Oops, yes there is a missing step. I forgot to tell you to setup the
configuration file for ulink.exe.
I copied the ulink.bds file from the sample.cfg directory into the same
directory as ulink.exe and renamed it ulink.cfg. Then I edited the file
to replace the BDS paths with the equivalent paths for my RAD Studio
installation. My ulink.cfg file looks like this:
-LC:\CodeGear\RAD\5.0\Lib;C:\CodeGear\RAD\5.0\Lib\Obj;C:\CodeGear\RAD\5.0\Lib\Release
-zimport32
-F -Gw -Ge
And it successfully links my application. I can switch back and forth
between ulink and ilink32 by changing the selection in bcc32pch options.
HTH
Dennis Cote
I had already done that too ... I should have exited the IDE and then
restarted it.
Now it attempts to use ULINK but I get an error message ... it is hard
to tell if my command line is too long or what.
I guess for now I will just have to keep plugging along with ILINKER
until it just doesn't work.
Thanks for the help.
Best Regards,
Shane
> Could any one provide me with step by step IDIOT proof instructions
> on how to use ULINK with C Builder 2007's IDE?
1) download the last version from (the last update was 01 Jul 2008)
ftp://ftp.styx.cabel.net/pub/UniLink
2) copy Ulink.exe and Ulink.cfg into Studio\Bin directory
3) alter Ulink.cfg as described in docs; for example I use:
-F
-Ge
4) download magic Andreas' IDE plugin from
http://andy.jgknet.de/cpp/files/bcc32pch278Setup.zip
3) Install plugin (simply run exe)
4) Run IDE and tune up the plugin:
Tools->C++ compiler Enh Opts
Tick
- IDE Compiler speed fix
- Replacement compiler
Enter in Replacement compiler->ILink replacement
C:\Program Files\CodeGear\RAD Studio\5.0\bin\ulink.exe
5) Enjoy.
6) As beta-tester of ULink you have to report all problems to author.
He will fix them (usually in week ;-)).
Additionally you can
1) use enhanced precompiled headers (PCH)
Project->Create PCH (start to use)
Project->Delete PCH (don't use)
2) Enable/Disable compiler replacement for current project
Project->Bcc32Pch Opt->Compiler Tools->En/Dis compiler (and linker)
replacement for this project
--
Alex
Hi Shane,
in addition to Dennis Cote's reply, I would like to suggest - for RAD
Studio 2007 - to create a ulink.cfg file as the following one:
-zimport32
-zrtl
-zvcl
-zvclx
-F -Gw -Ge
Maybe it was a my fault, but the ulink.bds file provided with the unilink
distribution (that you've to rename to ulink.cfg), it doesn't worked for
me with RAD Studio 2007.
Regards.
Giuliano
Unfortunately, none of the ideas have worked on my system. I am trying
to link a LARGE statically linked application and it always exits
without doing anything.
If the author is reading this thread, I would recommend making it to
where one could just replace the Code Gear ILINK32.exe by deleting it
and renaming ULINK.EXE to ILINK32.exe!
Again, thanks for all the help.
Best Regards,
Shane
> ...just replace the Code Gear ILINK32.exe by deleting it
> and renaming ULINK.EXE to ILINK32.exe!
Is this work for you ?
> Unfortunately, none of the ideas have worked on my system. I am
> trying to link a LARGE statically linked application and it always
> exits without doing anything.
Hmm. It was strange error in some of recent releases (fixed in build
3.15 and I use this build now) when linker didn't work under Win2k.
If it's not that case when please report this issue to author (as
described in docs) for fix.
--
Alex
[ILINK32 Error] Fatal: Could not open Debug\myApp.exe (error code 5)
from this point on the executable myApp.exe can not be deleted or
renamed any longer
i have to either reboot or run chkdsk /f to unmount the drive
i'm running rad studio 2007 release 2 bcb on windows xp64
this can't be the answer, to chkdsk /f, to continue from some type of
compile/link errors.
i have not found any utility running on xp64 which allows a locked file
to be deleted either.
when i try to delete the xxx.exe file in windows i get an error message
saying
cannot delete xxx.exe access is denied
i don't need to explain that this is a pretty desperate situation and i
don't know how to go around it or fix it
i'm using bcb on and off for about 8 years and don't recall of ever
having a similar problem
any help is highly appreciated !!!!!!!!!!
best regards, EinHexenMeister
I am not following you? If you are asking if I tried it, yes and it
didn't work.
>
>> Unfortunately, none of the ideas have worked on my system. I am
>> trying to link a LARGE statically linked application and it always
>> exits without doing anything.
>
> Hmm. It was strange error in some of recent releases (fixed in build
> 3.15 and I use this build now) when linker didn't work under Win2k.
>
> If it's not that case when please report this issue to author (as
> described in docs) for fix.
>
Without much to go on why it isn't working, I am afraid I wouldn't be
doing the author any service reporting "it just doesn't work on my
system...".
Best Regards,
Shane
>[ILINK32 Error] Fatal: Could not open Debug\myApp.exe (error code 5)
>
>from this point on the executable myApp.exe can not be deleted or
>renamed any longer
Did you execute the application before rebuilding?
If the program fails to terminate all of its threads
before exiting, the remaining threads will keep
the exe locked. Look under Processes in Task Manager
and kill any leftover threads.
i know for sure that the chance to have this problem is when i run
(execute) it through the debugger or stand alone, with some errors
preventing it to close properly and then rebuild
i then close bcb and look in the task manager for any leftover bcb
processes, but since i don't know all of their names i did not start to
randomly kill processes
but i'm 99% sure that a failed link can cause it too.
i did not have this problem with bds 2006 only with 2007
and the os xp64 did not change
yes, I'm aware that any leftover process can prevent the file from
deletion. but how to find out which process.
also is it possible that the process which opened the file exits without
closing, or similar and now the file is left with an open handle or similar.
i'm an electrical engineer and write firmware.
it just happens that i also have to write the gui in my one man show.
please if anyone could help me with some explanations on how to find out
which process still owns this xxx.exe and if this process is still
running or what handle or similar is still open.
any utility i found to supposedly fix this problem is not supported
under xp64
i usually copy my whole work directory with a different name and
continue and after a series of these copies i run chkdsk /f to unmount
the drive and then clean up the mess.
by doing the copying i always have to close all files in the editor and
then re-opening.
i dont want so sound complaining but it's quite a drag
any help is highly appreciated
best regards EinHexenMeister
While I can't comment on the source of your problem, you will probably find
Process Explorer helpful:
http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx
It's available for free from Microsoft. I use it almost exclusively as a
replacement for the normal task manager.
You'll be looking for your own program's executable filename, you can kill
it through there (just highlight and press delete). If the IDE itself
freezes you can kill that as well, it's BDS.EXE. There should only be one
BDS.EXE per instance of the IDE you are running.
You can also use Process Explorer to search for programs that have files
open. If you go to Find -> Find Handle or DLL, and type the string you are
looking for (like program.exe), it will display all open handles to that
file as well as which process has it open.
I'm sure you'll find some other useful things there as well.
Jason
See my other post in this thread.
I have had this happen on occasion with bds2006 - unfortunately I cannot
always terminate the ilink32.exe process from taskmgr and still have to
reboot to get rid of the hung linker process. (Somewhere there's a utility
that tries to be firmer about terminating than taskmgr is, but don't
remember where I found it and don't currently have it.)
"EinHexenMeister" <EinHexe...@gmail.com> wrote in message
news:4846...@newsgroups.borland.com...
> Bob Gonder wrote:
>> EinHexenMeister wrote:
>>
>>
>
> i then close bcb and look in the task manager for any leftover bcb
> processes, but since i don't know all of their names i did not start to
> randomly kill processes
>
> but i'm 99% sure that a failed link can cause it too.
>
>
P.S. You can even close that handle from procexp, if you need to close the
file in a pinch without killing the application that has it open. Just be
aware that usually ends up leaving the application in a fairly unstable
state.
thanks guys
i can delete the exe now, but it was a very rocky road, let me explain
process explorer did initially not work on my xp64 setup
it opened the x64 version and immediately closed it again
i had to run it from the right click menu "runas" administrator, even my
login had admin privileges
make a copy of the now available procexp64.exe
rename the original procexp.exe to procexp_org.exe to save it for the future
i made now a copy of the procexp64.exe and gave it the original name
procexp.exe
and now it works
i also disabled my virtual dimension multi desktop mgr (maybe it was not
necessary) during the procexp64 extraction and conversion
as i then processed the deletion of the bcb produced exe file, proxexp
said something ... that teatimer had a handle on it open. teatimer is
part of the anti-spy-ware package called spybot search/destroy
thanks again, guys, ladies are always included, thanks
EinHexenMeister
In addition try to link in IDE and/or in command lane a small dummy
application. What is occures in this case?
--
Alex
> > Is this work for you ?
>
> If you are asking if I tried it, yes and it didn't work.
OK, as expected :-)
In your previous post:
> Now [IDE] attempts to use ULINK but I get an error message ...
> it is hard to tell if my command line is too long or what.
What is the error message ?
Does linker work from command line or the problem is in IDE only ?
What is your OS ? What is length of your command line ? (In fact I
don't know what length of command line is valid in different OS
versions. But if ILink accepts the whole command line then the length
is not a problem...)
> I am trying to link a LARGE statically linked application
> and it always exits without doing anything.
"Error message" and "exits without doing anything" are different
results.
Try to run linker with empty command line. Does it show help info ?
(the absence of the help info was the first indication of the problem I
mentioned earlier)
Try to run linker with your actual command line. What is error message
and ErrorLevel value ?
--
Alex
You know, recently it seems the anti spyware causes more problems than the
spyware itself...