Hmmm, got the same errors with EXTERN DEF.

So, I resorted to just including seperate Modules into one main.  I really would like to do it the "real" way though.
Posted on 2005-07-26 18:57:22 by BBS
The problem is that you don't specify other.obj on the linker commandline - do
C:\Masm32\Bin\LINK.EXE /SUBSYSTEM:WINDOWS /RELEASE /VERSION:4.0 /LIBPATH:"C:\Masm32\Lib" /OUT:"test.exe" "test.obj" "test.res" "other.obj"

(now it would be easy to throw a pun about "misleading learner programmers", but I'll leave it at that)
Posted on 2005-07-26 19:29:54 by f0dder

Yeah, I have been using RadAsm.


well the there are many examples at radasm page (you didnt look?)
http://radasm.visualassembler.com/projects/projects.html
one of them "demo.zip" has project "module"
and it is what you need. 
Posted on 2005-07-26 19:49:04 by drizz
If the problem has been that you did not try and link the external module, the correct solution if you have more than a couple is to create what is called a RESPONSE file which is very easy to do.

Make a plain text file that has the name of each object module on a seperate line and save it with a name someting like LINK.RSP.

On the link command line instead of listing one after another, you then use the file name you saved with an "@" symbol at the beginning of te name so you have @LINK.RSP. This is a standard Microsoft linker option to save the error prone very long command line.

Now if you think that this approach is complcated, you will understand why I suggested that you build all of the finished object modules into a library, then you only need to use the INCLUDELIB syntax to get all of them and as an added bonus, the LINKER resolves the dependencies among the modules as well.

Here is how you make a library out of all of your finished object modules.


@echo off
cls
echo.
echo    ** Assembling yourlib.lib library modules.
echo.
\masm32\bin\ml /c /coff *.asm
echo.
echo    ** Linking yourlib.lib
echo.
\masm32\bin\link -lib "*.obj" "/out:yourlib.lib"
del *.obj
dir *.lib
pause


Remember that you need to make a seperate INCLUDE file for all of the procedures in the library and include them as well.

Now with the code,


PUBLIC testing
testing PROC
invoke MessageBox,0,addr Message,addr Caption,MB_OK
ret
testing ENDP


You can save yourself some hassle by writing a prototype for the procedure as this automatically does an EXTERNDEF on the procedure name so by writing


  testing PROTO


before the procedure, you save yourself the bother of requiring EXTERNDEF for a procedure.


(now it would be easy to throw a pun about "misleading learner programmers", but I'll leave it at that)


Yes maybe you should as it will be dealt with elsewhere if you bother.
Posted on 2005-07-26 21:35:44 by hutch--
Yes! Yes! YesSS! :D  *Does a little dance*

Wooohoooo, finally got it to work!

As f0dder pointed out, RadAsm wasn't linking the other modules .obj files with the initial .obj file.  I tinkered around with RadAsm trying to get it to do so, but it wouldn't.  So I entered the command in myself in the Command Prompt and it linked perfectly and I was able to execute the file.

Anyways, thanks all for your input.  All appreciated!

BBS-
Posted on 2005-07-26 23:18:49 by BBS
You can get it to do it by tinkering with the project settings. I think it should be documentated in the help file available at Ketil's site.
Posted on 2005-07-27 04:21:42 by roticv
Yeah, I just figured out how to modify the linking with RadAsm

For anyone that needs to know:

Goto 'Projects'
        --> 'Project Options'
        --> Edit Box referenced by 'Link'

Then just edit the text in the edit box to your liking. :)
Posted on 2005-07-27 13:03:06 by BBS