NASM - The Netwide Assembler

NASM Forum => Using NASM => Topic started by: nobody on November 23, 2005, 10:56:00 PM

Title: Problem with IMPORT directive.
Post by: nobody on November 23, 2005, 10:56:00 PM
I get the following problem when trying to import LoadLibrary from kernel32.dll.

import.asm:8: error: parser: instruction expected

8 is the line with the directive. Removing the directive fixes the error.

Code:

extern LoadLibrary
import LoadLibrary kernel32.dll
Title: Re: Problem with IMPORT directive.
Post by: Frank Kotler on November 24, 2005, 03:02:42 AM
"Import" is only good in "-f obj" - are you using "-f obj" or "-f win32"?

Best,
Frank
Title: Re: Problem with IMPORT directive.
Post by: nobody on November 24, 2005, 01:26:03 PM
I see. I was using "-f win32".

Thanks for solving that for me. But another question: Would I use obj if I were to create libraries to link with my nasm files? Ie. Could I import a few functions into an obj file, and then use that while linking?