Hello, I'm having problems with ALink, whatever assembler i use to output the .obj file whenever i use this syntax:
alink -oPE -entry main X86.obj msvcrt.dll
ALink returns:
Loading file X86.obj
Loading file msvcrt.dll
Unsupported CPU type for module
What does this mean and how may I fix it?I need to link using ALink so GoLink or any other linker not supporting OMF files is out of the question. (By the way this happens with COFF too, not just OMF)
Any help is appreciated, thanks.
alink -oPE -entry main X86.obj msvcrt.dll
ALink returns:
Loading file X86.obj
Loading file msvcrt.dll
Unsupported CPU type for module
What does this mean and how may I fix it?I need to link using ALink so GoLink or any other linker not supporting OMF files is out of the question. (By the way this happens with COFF too, not just OMF)
Any help is appreciated, thanks.
Are you sure you want to link with msvcrt.dll and not msvcrt.lib? I think this would be my first time I heard a succesful linking with a dll.
// CyberHeg
// CyberHeg
Hm, ive linked with DLL's in this past with no problem. Learn something every day.:)
Where can I get msvcrt.lib?
Where can I get msvcrt.lib?
IIRC, msvcrt.dll is a c library. Maybe if vc is installed, it should be there
Does anyone have it that can attach it?(I hope this isn't against board rules)
Also, how would I get the function names from .lib files?Like if printf happened to be called __printf in a lib file or something and I needed to know its new name.
Also, how would I get the function names from .lib files?Like if printf happened to be called __printf in a lib file or something and I needed to know its new name.
Does anyone have it that can attach it?(I hope this isn't against board rules)
Also, how would I get the function names from .lib files?Like if printf happened to be called __printf in a lib file or something and I needed to know its new name.
ftp://ftp.microsoft.com/Softlib/MSLFILES/msvcrt.exe
Still "Unsupported CPU type for module" message from ALink
Any ideas?:(
Like where I could get a good omf2coff program so I could just use golink instead of ALink?(If it wants to be so stubborn when linking with things)
Like where I could get a good omf2coff program so I could just use golink instead of ALink?(If it wants to be so stubborn when linking with things)
Kairon:
If you use ALINK you have two options to link omf files in a PE file.
Both options are valid if tou use NASM.
1. Use ALIB to create your .LIB file from your .DLL:
ALIB msvcrt.dll
You will get a msvcrt.lib file that you can use so:
alink -oPE -entry main X86.obj msvcrt.lib
You can call any win32 api using a macro as:
%MACRO wcall 1
extern __imp_%1
call [__imp_%1]
%ENDMACRO
2. Use EliCZ iIMP.exe to create a .IMP file from your DLL:
iIMP msvcrt.dll msvcrt
You will have to include your .IMP file in your .ASM NASM source code:
%INCLUDE "msvcrt.imp"
Then you call any win32 api using the same wcall macro.
I recommend you download the EliASM pack from:
http://www.anticracking.sk/EliCZ/infos.htm
greetings
If you use ALINK you have two options to link omf files in a PE file.
Both options are valid if tou use NASM.
1. Use ALIB to create your .LIB file from your .DLL:
ALIB msvcrt.dll
You will get a msvcrt.lib file that you can use so:
alink -oPE -entry main X86.obj msvcrt.lib
You can call any win32 api using a macro as:
%MACRO wcall 1
extern __imp_%1
call [__imp_%1]
%ENDMACRO
2. Use EliCZ iIMP.exe to create a .IMP file from your DLL:
iIMP msvcrt.dll msvcrt
You will have to include your .IMP file in your .ASM NASM source code:
%INCLUDE "msvcrt.imp"
Then you call any win32 api using the same wcall macro.
I recommend you download the EliASM pack from:
http://www.anticracking.sk/EliCZ/infos.htm
greetings
ImpLib32 - ImpLib for Win32. ImpLib32 is a small utility which creates
an import library for Visual C++ 2.x/4.x/5.x from an existing DLL. ...
Back in the good old days of Windows 3.x, Microsoft supplied a tool called
IMPLIB. This tool was able to create a import library for a given DLL.
After creating this library, you linked it to your program in order to
call functions contained in the DLL.
Freeware:
This program is freeware. You can copy and distribute this program as long as
it is left in an unmodified form and no fee is charged. Please distribute
IMPLxxx.ZIP as a whole instead of the single files.
http://www.geocities.com/SiliconValley/5806/implib32.htm
an import library for Visual C++ 2.x/4.x/5.x from an existing DLL. ...
Back in the good old days of Windows 3.x, Microsoft supplied a tool called
IMPLIB. This tool was able to create a import library for a given DLL.
After creating this library, you linked it to your program in order to
call functions contained in the DLL.
Freeware:
This program is freeware. You can copy and distribute this program as long as
it is left in an unmodified form and no fee is charged. Please distribute
IMPLxxx.ZIP as a whole instead of the single files.
http://www.geocities.com/SiliconValley/5806/implib32.htm