The JWlink commandline options are vast and the syntax, which is inherited from Wlink, is a bit strange. As a start, here are some examples for the most common cases:
- Win32/Win64 console application, one object module (sample.obj): |
jwlink format windows pe file sample.obj |
- Win32/Win64 GUI application, one object module (sample.obj): |
jwlink format windows pe runtime windows file sample.obj |
- Win32/Win64 dynamic link library, one object module (sample.obj): |
jwlink format windows pe dll file sample.obj |
- Win32/Win64 console application with multiple object modules, file1.obj and file2.obj, name of the resulting binary will be sample.exe: |
jwlink format windows pe dll file file1.obj, file2.obj name sample.exe |
- Win32/Win64 console application with one object module, emit symbolic debugging info and create a map file: |
jwlink debug c format windows pe file sample.obj op cvp, map |
| - Win32/Win64 console application without base relocations: |
jwlink format windows pe file sample.obj op noreloc |
| - Win32/Win64 dll and set the preferred base address: |
jwlink format windows pe dll file sample.obj op offset=0x20000000 |
| - Win32/Win64 dll and write an import library: |
jwlink format windows pe dll file sample.obj op implib=sample.lib |
| - Win32 console application compiled with MS VC++: |
jwlink format windows pe file sample.obj op eliminate, start=_mainCRTStartup, noreloc |
| - 32- or 64-bit ELF application: |
jwlink format elf file sample.obj op noreloc |
|