Hello Randy,

I am learn the AoA of Randy's just at volume2. When I build the example program"testGetxy" in chaper 02 of volume2 , the hla told me something wrong(every example programs in this chpter have the same problem):



testGetxy.obj : error LNK2001: unresolved external symbol __imp__ExitProcess@4
testGetxy.obj : error LNK2001: unresolved external symbol stdio_newln
testGetxy.obj : error LNK2001: unresolved external symbol stdio_puts
testGetxy.obj : error LNK2001: unresolved external symbol DefaultExceptionHandler__hla_
testGetxy.obj : error LNK2001: unresolved external symbol HardwareException__hla_
testGetxy.obj : error LNK2001: unresolved external symbol BuildExcepts__hla_
testGetxy.obj : error LNK2001: unresolved external symbol win32cons_gotoXY
testGetxy.obj : error LNK2001: unresolved external symbol stdio_ReadLn
testGetxy.obj : error LNK2001: unresolved external symbol win32cons_cls
testGetxy.obj : error LNK2001: unresolved external symbol win32cons_getY
testGetxy.obj : error LNK2001: unresolved external symbol win32cons_getX
LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
testGetxy.exe : fatal error LNK1120: 12 unresolved externals


I think it is wrong at the win32cons.hhf, but I don't know how to deal with it . Anybody can help me? Thanks
Posted on 2003-06-23 00:33:25 by zen_essential
Dear zen_essential,

Randy will correct me if I am wrong. You are getting linker errors. Your source file should have a line like this: #include ("stdlib.hhf") and this: #include("win32cons.hhf"). You will also need to tell HLA how to add the wincons.lib file to the linker response file that HLA writes. To do this you will need to add three lines to your source where the #include lines are located. Add #asm <cr> then includelib wincons.lib <cr> and follow it with #endasm<cr>. This works for me.

Charles
Posted on 2003-06-23 10:56:46 by cdquarles
Dear cdquarles,

Thanks for you remainder. I findout the problem is that hla can't locate the win32con.lib.
So I use the command line : hla -V -M source.hla win32cons.lib to resolve this problem.
The more I want to know is how to set the compile parameter and the lib and include location in
RadASM.

Thanks for you help
Best rgds
Posted on 2003-06-23 20:20:24 by zen_essential
I test your way, it is useful. Does I can include any lib use the syntax:
#asm
includelib thelibname
#endasm;

I think the lib's path must in the environment parameter "lib". Right?

Thanks again
Posted on 2003-06-23 20:29:26 by zen_essential
Hello, zen_essential,

Yes, you should be able to refer to any additional libraries with the #asm, includelib thelib.lib, #endasm statements. While I have not tested it, I believe that you can add as many includelib liba.lib, includelib libb.lib, etc. lines to the #asm, #endasm directive as needed. As donkey mentioned, the environment variables are set by RadAsm in the hla.ini file. You can edit this file with notepad or another similar editor and you can edit it directly in RadAsm.

Sincerely,

Charles
Posted on 2003-06-24 10:31:13 by cdquarles
Note that:
#asm
includelib xxxxx.lib
#endasm

assumes that your "lib=xxxxxx" environment variable is set up to point at some directory containing the library files (e.g., "lib=c:\masm32\lib").

You can also specify the library file on the HLA command line, e.g.,

hla source.hla xxxxx.lib

This scheme *also* assumes that you have set the "lib=xxxx" environment variable up properly, though you could also specify the full path from the HLA command line, e.g.,

hla source.hla c:\masm32\lib\xxxxx.lib

Note that it's actually MS-LINK that uses the lib environment variable, not HLA. When I get around to doing the HLA v1.52 release, I'll include a little utility I've written to update the environment variables. Someday when I get some more time, I'll even extend the program to automatically seek out the pertinent files and dynamically set the environment variables.


Cheers,
Randy Hyde
Posted on 2003-06-25 12:26:48 by rhyde