Hi,
I'm learning asm still. I found this wonderfull util here. And an example which I had tested that working while manually linking. But now I couln't use this util any. The tasm linker gave a lot of unresolved external 'GetModuleHandleA'
......
......
so whats wrong. These were an .inc file which I already included. Btw, I coldn't understand, what are those |||| chars in linker options. Isn't it import import32.lib?
any idea?
I'm learning asm still. I found this wonderfull util here. And an example which I had tested that working while manually linking. But now I couln't use this util any. The tasm linker gave a lot of unresolved external 'GetModuleHandleA'
......
......
so whats wrong. These were an .inc file which I already included. Btw, I coldn't understand, what are those |||| chars in linker options. Isn't it import import32.lib?
any idea?
did you put (near the top of your source file, after your .x86... .model, etc):
include windows.inc
include kernel32.inc
includelib kernel32.lib
and setup your paths correctly?
you will need to import kernel32.lib to use GetModuleHandleA (code is above - or you could manually link it in the linker by changing the cli options)
include windows.inc
include kernel32.inc
includelib kernel32.lib
and setup your paths correctly?
you will need to import kernel32.lib to use GetModuleHandleA (code is above - or you could manually link it in the linker by changing the cli options)
Hi cakmak
The '||||' are a replacement for ',,,,'.
The replacement is necessary to 'fool' the RadASM parser and are replaced by ',,,,' in the final stage. Myself I use masm so I cant remember the assembler / linker commandline options for tasm.
If you replace the 'O' with 'OT' you will see the final assemble / link command line that RadASM produces. This might help you understand what is going on.
KetilO
The '||||' are a replacement for ',,,,'.
The replacement is necessary to 'fool' the RadASM parser and are replaced by ',,,,' in the final stage. Myself I use masm so I cant remember the assembler / linker commandline options for tasm.
If you replace the 'O' with 'OT' you will see the final assemble / link command line that RadASM produces. This might help you understand what is going on.
KetilO
OK. If I manually edit "Tasm.ini" it may do the job nearly. Nearly because I can modify it meaningful only as shown below;
.
.
3=5,OT,$B\tlink32.EXE /x /V4.0 /Tpe /aa /c ,3,||import32.lib||,4
.
.
this is insufficient, this line must be include a sentence(or signify number) for ".exe"
the result commandline must be like;
tlink32 -x /V4.0 /Tpe /aa /c file_name.obj,file_name.exe,,import32.lib,,file_name.res
Now, I can not replace "file_name.exe" sentence via tasm.ini.
because the second "file_name" is for file_name.exe and when I replace "5" as signify number, it only uses right "5", not file_name.exe! I used so because as I understand if 4 -> .res file; if 3 -> .obj file; if 5 -> .exe file... so anyone knows to using the .ini files? I dont want to wright everything for every project.
And one more, the ini files includes an option for library paths, but as linking it only look for in project directory. Why? Uhm! one minute! I resolved my second question. Hey!, I didn't delete this second part because maybe will useful for someone. I removed /L option and the compiler looked for "All Path" in my system until found. Btw, my first part of question waits for...
.
.
3=5,OT,$B\tlink32.EXE /x /V4.0 /Tpe /aa /c ,3,||import32.lib||,4
.
.
this is insufficient, this line must be include a sentence(or signify number) for ".exe"
the result commandline must be like;
tlink32 -x /V4.0 /Tpe /aa /c file_name.obj,file_name.exe,,import32.lib,,file_name.res
Now, I can not replace "file_name.exe" sentence via tasm.ini.
because the second "file_name" is for file_name.exe and when I replace "5" as signify number, it only uses right "5", not file_name.exe! I used so because as I understand if 4 -> .res file; if 3 -> .obj file; if 5 -> .exe file... so anyone knows to using the .ini files? I dont want to wright everything for every project.
And one more, the ini files includes an option for library paths, but as linking it only look for in project directory. Why? Uhm! one minute! I resolved my second question. Hey!, I didn't delete this second part because maybe will useful for someone. I removed /L option and the compiler looked for "All Path" in my system until found. Btw, my first part of question waits for...
Hi cakmak
I am sorry. My knowledge on tasm is limitted.
Maybe this test project can help.
It has a dialog and uses .inc and .lib files.
Be aware that changing tasm.ini does not affect old projects.
I think the link command should look like:
3=5,OT,$B\tlink32.EXE /x /V4.0 /Tpe /aa /c ,3,5,|import32.lib||,4
KetilO
I am sorry. My knowledge on tasm is limitted.
Maybe this test project can help.
It has a dialog and uses .inc and .lib files.
Be aware that changing tasm.ini does not affect old projects.
I think the link command should look like:
3=5,OT,$B\tlink32.EXE /x /V4.0 /Tpe /aa /c ,3,5,|import32.lib||,4
KetilO
Hi KetilO,
Before many thanks for your advices! And last I only need a colon(,) after .obj name.
I mean between .obj and .exe. Because for now commandline looks like;
..../Tpe /aa /c import32.lib hello.exe,.....
but I needed;
..../Tpe /aa /c import32.lib, hello.exe,.....
^
above
many thanks again. I want to use this!
Regards
Before many thanks for your advices! And last I only need a colon(,) after .obj name.
I mean between .obj and .exe. Because for now commandline looks like;
..../Tpe /aa /c import32.lib hello.exe,.....
but I needed;
..../Tpe /aa /c import32.lib, hello.exe,.....
^
above
many thanks again. I want to use this!
Regards
my sign(^) went wrong place. But colon is there. :)
Hu cakmak
Here is the line:
5,OT,$B\tlink32.EXE -x /V4.0 /Tpe /aa /c ,3,|,5,||C:\Tasm\Lib\import32.lib||,4
If you have the enviroment set up, then you dont need the path in C:\Tasm\Lib\import32.lib
KetilO
Here is the line:
5,OT,$B\tlink32.EXE -x /V4.0 /Tpe /aa /c ,3,|,5,||C:\Tasm\Lib\import32.lib||,4
If you have the enviroment set up, then you dont need the path in C:\Tasm\Lib\import32.lib
KetilO
Thank you very very much ASM guru!
This tool wonderful! Again thanks for your patience.
Best Regards:alright: :alright:
This tool wonderful! Again thanks for your patience.
Best Regards:alright: :alright: