4 Replies - 1883 Views - Last Post: 27 August 2012 - 03:05 PM

#1 goodsir  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 21
  • Joined: 25-July 12

DumpRegs unresolved

Posted 27 August 2012 - 10:45 AM

I'm testing out some things I've learned with visual studio as my IDE. I've linked my project to Irvine32, and worked fine, until I called DumpRegs, which throws this error message:

Quote

1>------ Build started: Project: asm_test, Configuration: Debug Win32 ------
1> Assembling [Inputs]...
1> LINK : C:\Users\secret\Desktop\Documents\Visual Studio 2010\Projects\asm_test\Debug\asm_test.exe not found or not built by the last incremental link; performing full link
1>main.obj : error LNK2019: unresolved external symbol _DumpRegs@0 referenced in function _main@0
1>C:\Users\secret\Desktop\Documents\Visual Studio 2010\Projects\asm_test\Debug\asm_test.exe : fatal error LNK1120: 1 unresolved externals
When I open Irvine32, I see DumpRegs Proto within there, so why is it unresolved?

Is This A Good Question/Topic? 0
  • +

Replies To: DumpRegs unresolved

#2 GunnerInc  Icon User is offline

  • "Hurry up and wait"
  • member icon




Reputation: 858
  • View blog
  • Posts: 2,279
  • Joined: 28-March 11

Re: DumpRegs unresolved

Posted 27 August 2012 - 02:24 PM

Not sure, need to see your code.
Was This Post Helpful? 0
  • +
  • -

#3 goodsir  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 21
  • Joined: 25-July 12

Re: DumpRegs unresolved

Posted 27 August 2012 - 02:52 PM

Whoops, forgot to post that:
include Irvine32.inc

.code
	main PROC
		mov eax,1000
		mov ebx, 5
		imul ebx

		call DumpRegs

		exit
	main ENDP
END main

Was This Post Helpful? 0
  • +
  • -

#4 GunnerInc  Icon User is offline

  • "Hurry up and wait"
  • member icon




Reputation: 858
  • View blog
  • Posts: 2,279
  • Joined: 28-March 11

Re: DumpRegs unresolved

Posted 27 August 2012 - 02:56 PM

Where is Irvine32.inc located? Is the directory it is in, added to your PATH environment variable? If not, you will need to add the full path to it in your source file. Is your Irvine32 directory in part of your PATH variable? if not, add it to make life easier.

You also need to
includelib irvine32.lib


His book is old and contains a lot of errors.
Was This Post Helpful? 0
  • +
  • -

#5 GunnerInc  Icon User is offline

  • "Hurry up and wait"
  • member icon




Reputation: 858
  • View blog
  • Posts: 2,279
  • Joined: 28-March 11

Re: DumpRegs unresolved

Posted 27 August 2012 - 03:05 PM

Let me explain a bit more. You don't need an include file, you could just add the protos, equates, constants etc to your asm file. We seperate these things to make it easier to manage.

A proto just tells MASM what type of parameters and how many to expect. In irvines case, the code for DumpRegs is in a static library, so you need to includelib CORRECTLIB.LIB so the code for DumpRegs can be linked into your exe.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1