Hi,
I can't compile Iczelion's Win32asm Tutorial 18: Common Controls, or any of his tutorials that use common controls.

Here are the command line parameters I entered: hla -v -w tut18


Here's the error message I get:

tut18.obj : error LNK2001: unresolved external symbol __imp__InitCommonControls@0
tut18.obj : error LNK2001: unresolved external symbol __imp__CreateStatusWindowA@16
tut18.exe : fatal error LNK1120: 2 unresolved externals


I'm using HLA 1.50 build 8157. I also copied comdlg32.lib to "c:\hla\hlalib". All of my Win32 test projects and RADASM projects compile without any problem. Also, I can compile his MASM32 version of tutorial 18 without any problems.

I'm using Windows 95 OSR2 (B).

Any ideas? I copied the comdlg Let me know if you need anything else.
Posted on 2003-06-21 15:05:51 by Starion
my guess you need comctl32.hhf. Take a look at this link

http://www.asmcommunity.net/board/index.php?topic=12998

Regards GJ
Posted on 2003-06-21 20:05:00 by Green Joe
Ok, thanks. I downloaded the .zip file and copied the .hhf files to HLA's include directory. I'll need to "include" the comctl32.hhf. :)
Posted on 2003-06-22 13:42:44 by Starion
Thanks for the info Green Joe.

I still get the same error after I copied and included comctl32.hhf. I wonder if I need to set some enviromental variables to point to MASM32? I don't remember reading about setting the lib or include variables to \masm32 though.



Here part of the header / globals section of my tut18.hla file:

//Iczelion's tutorial #18: Common Controls
program aComControls;

#include("w.hhf")
#include("comctl32.hhf")

const ...


I hope I'm not missing any #include files or a semicolon?

Here's the error message I get after I type "HLA -V -W tut18.hla":

-out:tut18.exe
c:\hla\hlalib\hlalib.lib
tut18.obj
tut18.obj : error LNK2001: unresolved external symbol __imp__InitCommonControls@0
tut18.obj : error LNK2001: unresolved external symbol __imp__CreateStatusWindowA@16
tut18.exe : fatal error LNK1120: 2 unresolved externals



I have comctl32.lib in the hla\hlalib folder and comctl32.hhf in hla\include
I also have comctl32.inc in my MASM32\include folder and comctl32.lib in the MASM32\lib folder.


I'll keep trying.
Posted on 2003-06-22 16:41:04 by Starion
linker has to know where __imp__InitCommonControls@0 and __imp__CreateStatusWindowA@16 symbols are


"HLA -V -W tut18.hla,comctl32.lib"
Posted on 2003-06-22 17:47:06 by Green Joe
Dear Starion,

You can add to your source the following directives: #asm, includelib comctrl32.lib, #endasm; at the top of the file where the #include directives are located. This will add the library reference to the linker response file so that you do not have to add it to the command line manually.

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

There is a typo in my post. Use comctl32.lib instead.

Thanks,

Charles
Posted on 2003-06-23 10:49:06 by cdquarles
I found out that if you using new HLA 1.5 version you don't need to include comctl32.hhf to your source. It appears to be merged into new w.hhf.
Posted on 2003-06-23 15:54:51 by Green Joe

linker has to know where __imp__InitCommonControls@0 and __imp__CreateStatusWindowA@16 symbols are


"HLA -V -W tut18.hla,comctl32.lib"



The now compile correctly! Thanks everyone. HLA -V -W tut18.hla comctl32.lib did the trick.


73,
Sim
Posted on 2003-06-24 00:10:58 by Starion

Hi,
I can't compile Iczelion's Win32asm Tutorial 18: Common Controls, or any of his tutorials that use common controls.

Here are the command line parameters I entered: hla -v -w tut18



Use this command line:

hla -w tut18 comctl32.lib

HLA automatically includes kernel32.lib, user32.lib, and gdi32.lib, but it's up to you to specify any other library modules that you need.
Cheers,
Randy Hyde
Posted on 2003-06-24 11:23:27 by rhyde
Thanks for the reminder Randy. I'm starting to get the hang of HLA programming. Programming in Win32 assembly is fun!
Posted on 2003-06-24 12:05:48 by Starion
Now where should I get comctl32.lib and comctl32.hhf from anyway?

Thanks

Edit: Well, my problem (with tut23, and others) was unresolved external symbol __imp__Shell_NotifyIcon@8

Which was solved with

#asm
includelib shell32.lib
#endasm

Now shouldn't shell32.hhf load shell32.lib?
Posted on 2003-10-07 21:35:34 by V Coder

Now where should I get comctl32.lib and comctl32.hhf from anyway?

Thanks

Edit: Well, my problem (with tut23, and others) was unresolved external symbol __imp__Shell_NotifyIcon@8

Which was solved with

#asm
includelib shell32.lib
#endasm

Now shouldn't shell32.hhf load shell32.lib?

Well, that is a matter of opinion. Some of us prefer to put this stuff in
makefiles, some of us prefer to put it in the .hhf file (via #asm...#endasm).

Cheers,
Randy Hyde
Posted on 2003-10-08 00:36:30 by rhyde