Hi, Ketil,

I have reinstalled my computer, and reopened your sent example where application modules are used. Once again I get linkage errors:

Debug Version:

Assembling: Module.asm
Microsoft (R) Incremental Linker Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.

Module.obj : error LNK2019: unresolved external symbol _Module1@4 referenced in function _DlgProc@16
Module.obj : error LNK2019: unresolved external symbol _Module2@4 referenced in function _DlgProc@16
Module.exe : fatal error LNK1120: 2 unresolved externals

Make error(s) occured.
ERROR On Build: Version Number Was Not Increased.
DEBUG Build: Version Number Was Not Increased.

Release Version:

C:\Masm32\Bin\ML.EXE /c /coff /Cp /nologo /I"C:\Masm32\Include" "Module.asm"
Assembling: Module.asm
C:\Masm32\Bin\LINK.EXE /SUBSYSTEM:WINDOWS /RELEASE /VERSION:4.0 /LIBPATH:"C:\Masm32\Lib" *.obj "Module.res"
Microsoft (R) Incremental Linker Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.


Make error(s) occured. <=== though executable is compiled!!!!!! :((((((
ERROR On Build: Version Number Was Not Increased.

Where can I find the latest Options configuration that I could use as default?
Can someone send me configuration options which build with modules in release
and debug versions?

:confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused:
Posted on 2004-05-14 04:35:17 by Ulterior
I am sending my current project options if it would help:


Release:

Compile RC: 4,O,$B\RC.EXE /v,1
Assemble: 3,OT,$B\ML.EXE /c /coff /Cp /nologo /I"$I",2
Link: 5,OT,$B\LINK.EXE /SUBSYSTEM:WINDOWS /RELEASE /VERSION:4.0 /LIBPATH:"$L" *.obj,4
Run: 0,0,,5
Run w/debug: 0,0,\OllyDbg\OllyDbg,5
Res to obj: rsrc.obj,O,$B\CVTRES.EXE,rsrc.res
Asm Module: *.obj,OT,$B\ML.EXE /c /coff /Cp /nologo /I"$I",*.asm

Debug:

Compile RC: 4,O,$B\RC.EXE /v,1
Assemble: 3,O,$B\ML.EXE /c /coff /Cp /nologo /I"$I",2
Link: 5,O,$B\LINK.EXE /SUBSYSTEM:WINDOWS /DEBUG /VERSION:4.0 /LIBPATH:"$L",3,4
Run: 0,0,,5
Run w/debug: 0,0,\OllyDbg\OllyDbg,5
Res to obj: rsrc.obj,O,$B\CVTRES.EXE,rsrc.res
Asm Module: *.obj,O,$B\ML.EXE /c /coff /Cp /nologo /I"$I",*.asm

Posted on 2004-05-14 04:56:05 by Ulterior
Seem like you forgot to assemble the modules.
Here is the one that works.

KetilO
Posted on 2004-05-14 05:07:01 by KetilO
Thanks Ketil,

Release version compiles ok, but debug version still doesn't link

Module.obj : error LNK2019: unresolved external symbol _Module1@4 referenced in function _DlgProc@16
Module.obj : error LNK2019: unresolved external symbol _Module2@4 referenced in function _DlgProc@16
Module.exe : fatal error LNK1120: 2 unresolved externals

I haven't touched any options, just opened your sent archive and pressed build. It seems debug version still lacks some option???
Posted on 2004-05-14 05:12:13 by Ulterior
I have just seen some interesting thing: Does radasm compiles files assigned as modules? I tried to corrupt module file, and link application. What's mostly interesting is that Build used your old object files and not even tries to rebuild modules! And What's most interesting is that when I deleted obj files project failed to link. There must be some problem with compiling into obj files ( missing switch? ).
Posted on 2004-05-14 05:29:42 by Ulterior
Hi Ulterior

The debug build has not been modified from default as needed.
To assemble modules you MUST select Assemble Modules from the make menu.
Really Rad takes care of checking file times and will not assemble unmodified modules.

KetilO
Posted on 2004-05-14 06:38:44 by KetilO
Assemble modules doesn't seem to be working at all. It seems that when I have mod file opened in a window and call compile, radasm compiles the base asm file, not the opened module :| I have trashed module file, so the compiler should find that garbage, but radasm doesn't compile mod files. Of course, Mod files are stored in /Mod directory, so as I think, there should be done some corrections to project options, so radasm could find them.
Posted on 2004-05-14 07:01:16 by Ulterior
And one more thing, Ketil,

after deleting obj files from your archive, project doesn't compile in release version to, not modifing anything, becouse obj files are not assembled any more.
Posted on 2004-05-14 07:04:19 by Ulterior
Hi Ketil,

Ulterior is right, I have had problems with modules in other folders as well, I could not get them to compile individually.
Posted on 2004-05-14 08:51:23 by donkey
Hi donkey

Does not fit the description of the problem. He probably does not open the project, just the main asm file.

KetilO
Posted on 2004-05-14 09:15:07 by KetilO
Hi Ketil,

He did say:

Of course, Mod files are stored in /Mod directory, so as I think, there should be done some corrections to project options, so radasm could find them.


So I thought it might be related to my problems with module folders.
Posted on 2004-05-14 09:38:19 by donkey
Ketil,

Radasm is a TOTAL MESS what is related to OPTIONS. I don't understand how other's don't complain about this. ??? Maybe others don't even bother changing them?? I wouldn;t either if Radasm would normally compile your called 'modules' ( of course it's simply part of the project files ). How would you explain, that as I have module.asm opened in radasm, ide compiles main.asm? Isn't it a bug? Ok, if it would compile module.asm, but it DOES NOT! And it doesn;t compile would it be in main directory nor in any others. As long time c/c++ programmer it isn;t normal that good ide doesn't support project which contains more than one .asm file. My recent postings describes clearly the situation, as I even posted you my current project options, from which you could perfectly tell, what is missing there to compile your project. Your archive contains compiled obj files, which radasm, not bothering re-compiling them, links in to executable. I don't know what your projects options are, and I believe they are right, and I simply whant a file or an instruction - how to configure my project options right In both release and debug versions.
Posted on 2004-05-15 12:31:37 by Ulterior
Ulterior,

Well, with flexability comes complexity.

This might be the problem: Microsoft (R) Incremental Linker Version 7.10.3077
What version of masm are you using?

Here is the modules project with debug options set correctly. It also contains latest (2.0.4.2) masm.ini

KetilO
Posted on 2004-05-15 15:51:46 by KetilO
Hi Ulterior,

I don't think it's a total mess, I have no problems compiling modules outside of the fact that they have to be in the project folder. Besides that small fact everything works smoothly with the default configuration. Be sure that you have a project open and have added the files as MODULES not as ASM files, you can check to make sure in your RAP file, modules begin at 1000=xxx.asm.

Why don't we complain ? because frankly there isn't much to complain about, RadASM works very well and does every thing it is designed to do smoothly and transparently, but as Ketil says, with flexibility comes complexity.

Although a couple of things Ketil,

1. Subfolders for module source
2. The ability to include this /OUT:5 to specify the output file, currently I have to enter it manually
Posted on 2004-05-15 16:00:11 by donkey
Hi donkey

1. Subfolders for module source

This issue have been taken care of a long time ago, am I wrong? It works well on Win98SE and WinXP.

2. The ability to include this /OUT:"" to specify the output file, currently I have to enter it manually

masm.ini have been updated. I will go through the templates and update build options.

KetilO

Edit:
From What's new

2.0.3.7
- Added tool to change RadASM menu caption and accelerators.
- Added accelerator resource.
- Improved segment collapsing in RAEdit.
Assembler.ini section must be changed to take adventage of this improvement.
- Fixed template bug where some resource files was not renamed.
- Fixed Export ID equ's bug where some resource files was not included.
- Fixed a bug in RAGrid that caused constant repaint on some systems.
- Fixed a bug where modules was not assembled if in a sub folder.
- Included e-help addin.
Posted on 2004-05-15 16:36:14 by KetilO
Hi Ketil,

Thanks for the OUT: tip, I should have got that one myself.

The modules in a subfolder will not compile properly unless you stop the check for an output file. For some reason I cannot make it verify that the file has been created...

0,O,$B\GoAsm.EXE /ms,*.asm

instead of

*.obj,O,$B\GoAsm.EXE /ms,*.asm

Sorry about that but I was not aware of the limitation.
Posted on 2004-05-15 18:25:41 by donkey
Hi donkey

Seem like GoAsm creates the obj file in the same directory as where it found the asm file.

I consider this a GoAsm bug. The obj file should have been created in current directory.

KetilO
Posted on 2004-05-15 19:57:58 by KetilO
Hi Ketil,

I will report it and it will probably be fixed.
Posted on 2004-05-15 20:05:54 by donkey
Hi, Ketil and Donkey,

I finally understood where is a problem. I found Radasm compiles modules separately from the whole project with menu option. I am sorry, but I oftenly used make and build buttons on toolbar and haven't noticed menu option 'assemble modules' :) Of course, my project didn't compile normaly with linker errors :) But with what reason it's done so? Aren't these files a part of a an application? Why would I, in my clear mind, would compile modules not compiling the whole project?

I would suggest these corrections:

1) Option in an options form - compile modules along with the whole project. I.e pressing build or make, main project and modules would be compiled and linked accordinally in a one operation.

2) Having project loaded and module file opened - compile not project main file, but opened module. This would greatly clearify everything.
Posted on 2004-05-17 02:59:58 by Ulterior
I noticed that when I switch through project options debug/relese and select assemble modules from menu, radasm doesn't delete old obj files but reports that obj is newer than the source:

Mod\Module2.obj is newer than source.


That's interesting, how this check is performed. But that;'s not my point. I have to delete old obj files manualy to recompile modules. Thats bad :) Why radasm wouldn;t simply rebuild modules deleteing old ones and assembling new?
Posted on 2004-05-17 03:10:01 by Ulterior