Hi, I'm new to JWasm/JWlink/WinInc and assembly in general. My platform is x86-64 Windows 7. I've installed the latest versions each of the 3 packages by simply extracting them in the C:\ directory, each in their respective directories, and adding entries to the PATH environment variable to make the binaries accessible in cmd.exe. What I've then done is downloaded and installed a recent Windows 7 Platform SDK and copied the folder named "Lib" (for me it was located in C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0a\Lib), which I believe contains the import libraries (.lib) for WinAPI, into the WinInc202 folder, as the README.TXT in the WinInc package convinced me it was appropriate.
Then I tried to compile and link the sample program included with JWasm entitled "Win64_1.asm". I opened cmd.exe and changed the current directory to the one with the sample program. As the comments in the source suggested, I ran "JWasm -win64 Win64_1.asm" with apparently no problems. But when I go to link it with JWlink with this command "jwlink format win pe ru win file Win64_1.obj op start=main" I get this error output:
JWlink Version 1.9
Portions Copyright (c) 1985-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
loading object files
searching libraries
Error! E2028: MessageBoxA is an undefined reference
Error! E2028: ExitProcess is an undefined reference
creating a 64-bit PE executable
file Win64_1.obj(Win64_1.asm): undefined symbol MessageBoxA
file Win64_1.obj(Win64_1.asm): undefined symbol ExitProcess
I tried changing the two includelib lines in the source code to include the full path of the import libraries I copied into the WinInc directory, with no success. I also tried various command-line options to no avail.
I would greatly appreciate if someone could inform me as to what I am doing wrong. Thanks for any help.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You most likely are using 32-bit import libraries to link a 64-bit binary ( the directory name C:\Program Files (x86)\Micr… backups this assumption ) . This "doesn't work", because the calling convention has changed. You'll have to find and use the 64-bit libs.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks japheth, I downloaded and installed another (more recent?) Windows 7 Platform SDK with the "Libs" directory now containing a directory "x64" for x64 import libraries, and linking to these import libraries worked fine.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I'm new to JWasm/JWlink/WinInc and assembly in general. My platform is x86-64 Windows 7. I've installed the latest versions each of the 3 packages by simply extracting them in the C:\ directory, each in their respective directories, and adding entries to the PATH environment variable to make the binaries accessible in cmd.exe. What I've then done is downloaded and installed a recent Windows 7 Platform SDK and copied the folder named "Lib" (for me it was located in C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0a\Lib), which I believe contains the import libraries (.lib) for WinAPI, into the WinInc202 folder, as the README.TXT in the WinInc package convinced me it was appropriate.
Then I tried to compile and link the sample program included with JWasm entitled "Win64_1.asm". I opened cmd.exe and changed the current directory to the one with the sample program. As the comments in the source suggested, I ran "JWasm -win64 Win64_1.asm" with apparently no problems. But when I go to link it with JWlink with this command "jwlink format win pe ru win file Win64_1.obj op start=main" I get this error output:
I tried changing the two includelib lines in the source code to include the full path of the import libraries I copied into the WinInc directory, with no success. I also tried various command-line options to no avail.
I would greatly appreciate if someone could inform me as to what I am doing wrong. Thanks for any help.
You most likely are using 32-bit import libraries to link a 64-bit binary ( the directory name C:\Program Files (x86)\Micr… backups this assumption ) . This "doesn't work", because the calling convention has changed. You'll have to find and use the 64-bit libs.
Thanks japheth, I downloaded and installed another (more recent?) Windows 7 Platform SDK with the "Libs" directory now containing a directory "x64" for x64 import libraries, and linking to these import libraries worked fine.