Author Topic: Unresolved external symbo  (Read 2005 times)

Grincheux

  • Member
  • ***
  • Posts: 328
  • Never be pleased, Always improve
    • Asm for fun
Unresolved external symbo
« on: November 28, 2015, 04:29:57 PM »
Code: [Select]
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 :

Code: [Select]
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.
Kenavo (Bye)
----------------------
Asm for Fun
My Links
"La garde meurt mais ne rend pas"
Cambronne à Waterloo

TWell

  • Member
  • ****
  • Posts: 748
Re: Unresolved external symbo
« Reply #1 on: November 28, 2015, 07:22:45 PM »
Is that source compiked for x64?
You are linking with x64 libs and __imp__GetModuleHandleA@4 is for x86 lib?

dedndave

  • Member
  • *****
  • Posts: 8749
  • Still using Abacus 2.0
    • DednDave
Re: Unresolved external symbo
« Reply #2 on: November 28, 2015, 08:08:44 PM »
Code: [Select]
includelib user32.lib
includelib Kernel32.lib
includelib shell32.lib
includelib comctl32.lib
includelib comdlg32.lib

for each LIB, there is also an INC

Code: [Select]
    .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

Code: [Select]
    INCLUDE     \masm32\include\masm32rt.inc
open that file with a text editor to see what it does

Grincheux

  • Member
  • ***
  • Posts: 328
  • Never be pleased, Always improve
    • Asm for fun
Re: Unresolved external symbo
« Reply #3 on: November 29, 2015, 01:43:27 AM »
Thanks for your help
This proble is closed now
Kenavo (Bye)
----------------------
Asm for Fun
My Links
"La garde meurt mais ne rend pas"
Cambronne à Waterloo