News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Unresolved external symbo

Started by Grincheux, November 28, 2015, 04:29:57 PM

Previous topic - Next topic

Grincheux


gorc /v "Dialog.rc"

GoRC.Exe   Version 1.0.1.0 - Copyright Jeremy Gordon 1998-2013 - JG@JGnet.co.uk

Warning .......................

Line 8 of Resource Script (Dialog.RC):-
A class name was not recognised but assumed to be a user-class:-
"DLGCLASS"

Output file: Dialog.res
Output file: Dialog.obj format: win32

jwasm /c /coff /Cp "Dialog.asm"
JWasm v2.13, May 22 2015, Masm-compatible assembler.
Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.

Dialog.asm: 81 lines, 2 passes, 359 ms, 0 warnings, 0 errors

PoLink /SUBSYSTEM:WINDOWS /RELEASE /VERSION:4.0 /LIBPATH:C:\JWAsm\Lib64 /OUT:"Dialog.exe" "Dialog.obj"  "Dialog.res"
POLINK: error: Unresolved external symbol '__imp__GetModuleHandleA@4'.
POLINK: error: Unresolved external symbol '__imp__GetCommandLineA@0'.
POLINK: error: Unresolved external symbol '__imp__InitCommonControls@0'.
POLINK: error: Unresolved external symbol '__imp__ExitProcess@4'.
POLINK: error: Unresolved external symbol '__imp__LoadIconA@8'.
POLINK: error: Unresolved external symbol '__imp__LoadCursorA@8'.
POLINK: error: Unresolved external symbol '__imp__RegisterClassExA@4'.
POLINK: error: Unresolved external symbol '__imp__CreateDialogParamA@20'.
POLINK: error: Unresolved external symbol '__imp__ShowWindow@8'.
POLINK: error: Unresolved external symbol '__imp__UpdateWindow@4'.
POLINK: error: Unresolved external symbol '__imp__GetMessageA@16'.
POLINK: error: Unresolved external symbol '__imp__TranslateMessage@4'.
POLINK: error: Unresolved external symbol '__imp__DispatchMessageA@4'.
POLINK: error: Unresolved external symbol '__imp__SendMessageA@16'.
POLINK: error: Unresolved external symbol '__imp__ShellAboutA@16'.
POLINK: error: Unresolved external symbol '__imp__DestroyWindow@4'.
POLINK: error: Unresolved external symbol '__imp__PostQuitMessage@4'.
POLINK: error: Unresolved external symbol '__imp__DefWindowProcA@16'.
POLINK: fatal error: 18 unresolved external(s).

Error(s) occured.


into the source file I have :

includelib user32.lib
includelib Kernel32.lib
includelib shell32.lib
includelib comctl32.lib
includelib comdlg32.lib


I don't know why I have these errors. I need your help.

TWell

Is that source compiked for x64?
You are linking with x64 libs and __imp__GetModuleHandleA@4 is for x86 lib?

dedndave

includelib user32.lib
includelib Kernel32.lib
includelib shell32.lib
includelib comctl32.lib
includelib comdlg32.lib


for each LIB, there is also an INC

    .586
    .MODEL  Flat,StdCall
    OPTION  CaseMap:None

    INCLUDE     \masm32\include\windows.inc
    INCLUDE     \masm32\include\kernel32.inc
    INCLUDELIB  \masm32\lib\kernel32.lib


and so on - notice that i placed windows.inc first

you can avoid that whole mess by using

    INCLUDE     \masm32\include\masm32rt.inc

open that file with a text editor to see what it does

Grincheux

Thanks for your help
This proble is closed now