News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Incremental Linker problem, LNK 2001

Started by patrascu92, August 11, 2014, 10:03:48 PM

Previous topic - Next topic

patrascu92

Hi! I am new to masm and I need to create a backgammon game so that I can sustain an exam. I've attached the project files. I just started and I already have a problem, a problem with the linker. It keeps getting me the LNK2001('unresolved external symbol') but I can't see nothing wrong with my code. I lost a lot of time searching on the internet but nothing solved it. Please help me!

dedndave

you are missing all the includes for building win32 programs
there are numerous ones, windows.inc, then an include and includelib for each dll you want to access

the easy way is to remove this stuff
.386
.model flat,stdcall
option casemap:none


and add this
        INCLUDE     \masm32\include\masm32rt.inc
then put your project include (bg.inc) after that

masm32rt.inc is a plain text file - you can open it with NotePad and see what's inside   :t


dedndave

ok - i see you put those includes in the project include
but, there are a few other issues.....

generally, i don't specify a path for the project include file, as it is in the "local" folder
and - we don't specify a drive letter for the include files
the masm32 library is set up to build projects on the same drive as masm32 is installed

another problem is the END statement - it goes at the end of the source file   :biggrin:
that fixed a couple of the errors

then - one error.....
        Paint_BMP PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD
PaintBMP proc BmpHandle:DWORD, PosX:DWORD, PosY:DWORD, BmpW:DWORD, BmpH:DWORD
oops - missing an underscore

have a look at the attached file...

patrascu92