I don't know if anyone else is interested in this, but ...

I found that to get an OBJ file that was created by MS's C++ compiler,
to link with GoLink, you need to do 2 things in a hex editor:

1) Change _memset to memset (delete the '_')
2) Add a zero to the bunch of zeros after memset.

This might also be possible if you're really carefull in a text editor (Note/Word pad).
Does anyone know if this will always work?

I had a problem doing the same thing with the GNU compiler:

There's some thing called "__alloca" and I have no idea is what DLL
in which is exists.

- Mike
Posted on 2003-06-28 20:05:18 by ASMMike
Have you tried just using

memset equ _memset
Posted on 2003-06-28 20:17:34 by donkey
Kind of hard to do that in C++...

Posted on 2003-06-28 20:26:23 by Sephiroth3
That's what I mean, link your C++ object file to an ASM file with the proper equates. I thought he was talking about linking C++ object files to GoAsm projects using GoLink. Sorry if I made a mistake, but otherwise this would belong in the heap as it is not related to Win32asm at all.
Posted on 2003-06-28 21:06:17 by donkey
Yes, that is what I'm trying to do.

I should have thought of that before...

But, how do I do that?
Posted on 2003-06-28 21:38:46 by ASMMike
Just use an equate in your main asm file and specify multiple objects to link with the main one (with the equate) first. I've never tried this so I'm not sure it will work properly but it should.
Posted on 2003-06-28 22:15:22 by donkey
I tried assembling this with MASM:

.model flat,stdcall
option casemap:none
memset equ _memset
END start

That's probably not what you meant for me to do,
because it doesn't work..

Your last message went whoosh (over my head).
Posted on 2003-06-28 22:23:50 by ASMMike
In MASM you would do this:
[size=12]C:\Masm32\Bin\LINK.EXE /FILEALIGN:512 /SUBSYSTEM:WINDOWS /RELEASE /VERSION:4.0  LIBPATH:"C:\Masm32\Lib" "Main.obj" "Test.obj"[/SIZE]

The function would be in test.obj (in this case _TestProc)

in the main.obj file is the equate:

TestProc equ _TestProc
TestProc PROTO

and a call to TestProc:

invoke TestProc

seems to link ok. The proc executed ok
Posted on 2003-06-28 22:42:56 by donkey
I tried with GoAsm as well using :

C:\GoAsm\BIN\GoLink.EXE @C:\GoAsm\BIN\GFL.txt /entry Start "testmain.obj" "Test.obj" "testmain.res"

and the equate in testmain.asm I got it to work on one that was assembled by ML.EXE. I don't have C++ or any object files from it so I can''t really test it with them. I think there would be problems with the external imports though (i.e. __imp_MessageBoxA@16).

This is the syntax to use for your equate :

TestProc equ _TestProc@16

This seems to work.
Posted on 2003-06-28 23:26:27 by donkey
I haven't been able to get it to work. :(

Are you sure that EQUs make it into the
final OBJ ?

Here's the C++ OBJ file:
Posted on 2003-06-29 19:27:23 by ASMMike
yeah, I can't get it working either, I geuss that the obj file makes a call to _memset and that is not being handled by GoLink. I'll play around with it but I think that you have the only solution for this. Too bad it would have been useful.
Posted on 2003-06-29 19:46:31 by donkey
Remember to declare the EQU as global...
Posted on 2003-06-30 14:39:24 by Sephiroth3

Here is an example of using VC++ with GoLink:

Posted on 2003-07-04 08:45:28 by Vortex