|
| Re: Linking problem. |
 |
Thu, 07 Jun 2007 10:00:17 -070 |
Ricardo wrote:
>ilink32 -aa c0w32 testres.obj,testres,,import32 cw32,,testres.res
>Fatal: Access violation. Link terminated.
Does the link work without the resource?
Are you using brcc32 instead of brc32 (brcc32 is the correct one)
You might try doing the link this way:
> ilink32 /aa c0w32.obj+testres, testres, testres, import32+cw32,
,testres.res
|
| Post Reply
|
| Re: Linking problem. |
 |
Thu, 07 Jun 2007 16:52:25 -070 |
Ricardo wrote:
> Warning W8057 testres.c 71: Parameter 'hPrevInstance' is never used in
>function WinMain
Those are normal for WinMain and my be turned off by adding
#pragma argsused
On the line just before the function that generates them.
In this case, WinMain.
They are just reminding you that you didn't use all of the parameters
passed to the function (Most functions use all or their parameters).
>2. Now, following the tutorial I am trying to include my resource, namely a
>24-bit icon "testres.ico" into the EXE
Probably still too big. Largest I've used is 32x32 by 256 colors
>3. Building a testres.RES file is working fine for me now (after I have
>changed the problematic icon causing trouble at first), no matter if I am
>using brc32.exe (recommended by the tutorial) or brcc32.exe.
brc32 is incorrect whether the tutorial recommends it or not.
brc32 does things that we don't want to do (such as rlink).
brcc32 only does what we are wanting to do.
>4. Now I am experiencing this linking problem
Did you recompile the testres.c using the -c option ?
bcc32 -tW -c testres.c
>Warning: Unable to perform incremental link - performing full link...
Add /C/Gn to the link to get rid of that
(I think, otherwise ignore it)
>Fatal: Access violation. Link terminated.
Ok, so something is too big (usual reason for linker access violation)
Maybe your 24 bit icon.
|
| Post Reply
|
| Linking problem. |
 |
Thu, 7 Jun 2007 18:43:57 +0200 |
Help please!
I have just happened on a nice Borland C++ 5.5 tutorial at
http://www.webnotes.org/bcc55eng.htm, meant for the very novice like myself
:) I got stuck at the linking step, oh my... Launched a batch according to
the tutorial:
ilink32 -aa c0w32 testres.obj,testres,,import32 cw32,,testres.res
and got this error:
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Warning: Unable to perform incremental link - performing full link...
Fatal: Access violation. Link terminated.
Any idea why?
Thanks so much for any help. Kindest regards,
Ricardo
|
| Post Reply
|
| Re: Linking problem. |
 |
Thu, 7 Jun 2007 21:58:42 -0400 |
I have some pages which are intended for those working from the command
line. Look at them and see if they help you get comfortable with the
compiler and linker.
http://www.mulroy.org/howto.htm
. Ed
> Ricardo wrote in message
> news:46687f61@newsgroups.borland.com...
|
| Post Reply
|
| Re: Linking problem. |
 |
Thu, 7 Jun 2007 23:57:57 +0200 |
Uzytkownik "Bob Gonder" <notbg@notmindspring.invalid> napisal w
wiadomosci
news:hkdg635nm0rf05eob4kffurkigs40ar6ou@4ax.com...
> Ricardo wrote:
>
>>ilink32 -aa c0w32 testres.obj,testres,,import32 cw32,,testres.res
>>Fatal: Access violation. Link terminated.
>
> Does the link work without the resource?
>
> Are you using brcc32 instead of brc32 (brcc32 is the correct one)
>
> You might try doing the link this way:
>> ilink32 /aa c0w32.obj+testres, testres, testres, import32+cw32,
>> ,testres.res
First of all thank you for your kind and quick help!!! :)
Let me precisely describe the problem...
1. I am starting with a testres.c file copied from the online tutorial at
http://www.webnotes.org:80/bcc55eng.htm.
The code is relatively simple (though for me still a bit magical :) as it
is meant just to open an empty window.
If I compile it with: "bcc32 -tW testres.c" (so without including
any
resources) I get a functional EXE which does its job.
However upon compilation I get two warnings:
Warning W8057 testres.c 71: Parameter 'hPrevInstance' is never used in
function WinMain
Warning W8057 testres.c 71: Parameter 'lpCmdLine' is never used in
function WinMain
2. Now, following the tutorial I am trying to include my resource, namely a
24-bit icon "testres.ico" into the EXE. I have the .ico file in the
same
folder as the .c and .rc file. My "testres.rc" file is just a copy
from the
tutorial - a one-liner, containing:
MAINICON ICON testres.ico
3. Building a testres.RES file is working fine for me now (after I have
changed the problematic icon causing trouble at first), no matter if I am
using brc32.exe (recommended by the tutorial) or brcc32.exe.
4. Now I am experiencing this linking problem either using either the
tutorial command or yours. In the case of yours the linker couldn't actually
find a few files, like uuid.lib, import32.lib, cw32.lib and c0w32.obj. After
I have copied them into the working dir from c:\Borland\Bcc55\Lib it ended
up with the same error as in the case of the tutorial version of the
command, i.e.
Warning: Unable to perform incremental link - performing full link...
Fatal: Access violation. Link terminated.
It looks hopless for me. Don't have a clue how to proceed now. Any help very
much appreciated.
Kindest regards,
Ric
|
| Post Reply
|
|
|