Hello. I was wondering if someone here could tell me what is needed to call a win32 function from NASM. I thought I could declare MessageBox for example with EXTERN and then use LINK to link my object module with user32.lib (from visual studio) but I get "unresolved symbol MessageBox" error when linking. Any ideas what I'm missing or what I'm doing wrong here?
kindnumbernine 0 Newbie Poster
Recommended Answers
Jump to PostHere's a link to a forum with someone with a similar problem.
http://www.nabble.com/How-to-call-MessageBoxA-from-Nasm-program--td23420607.htmlFor this kind of problem, posting code would be more beneficial!
Jump to PostAn alternative is to use the Alink downloads:
http://alink.sourceforge.net/download.html
; To assemble: nasm -f obj hw.asm ; To link: alink -oPE hw .obj win32.lib extern MessageBoxA extern ExitProcess segment …
All 5 Replies
wildgoose 420 Practically a Posting Shark
kindnumbernine 0 Newbie Poster
wildgoose 420 Practically a Posting Shark
Evenbit 52 Junior Poster
kindnumbernine 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.