Exetools

Exetools (https://forum.exetools.com/index.php)
-   General Discussion (https://forum.exetools.com/forumdisplay.php?f=2)
-   -   How to fix these three RadASM compile errors? (https://forum.exetools.com/showthread.php?t=14920)

bilbo 04-04-2013 02:03

1 Attachment(s)
it's strange that you cannot go to the provided link: it is up...
anyway here is the program, from vortex.masmcode.com

and thanks for the /Zm tip I was unaware of...
bilbo

bridgeic 04-04-2013 03:31

Quote:

bridgeic, you do not have permission to access this page. This could be due to one of several reasons:

Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
Sorry, why I can't download? I search the web and get this v22 version, but seems always crash both under winxp and win7, really strange.

bilbo 04-04-2013 20:21

@ Av0id, ragdog
I think our importing problems are related to the calling convention adopted, which is supposedly != stdcall

@ bridgeic
it sounds like you are a very unluck man... I tried the program on all masm32 libs without problems...

Best regards, bilbo

bridgeic 04-04-2013 21:25

Quote:

Originally Posted by bilbo (Post 83854)
@ bridgeic
it sounds like you are a very unluck man... I tried the program on all masm32 libs without problems...

Best regards, bilbo

Hi bilbo,

I don't know why I can't download your attachement in exetools forum.

Not sure whether the file lib2inc I used is same with yours, I download it from

http://www.winasm.net/library-to-include.html

Anyway, based on your guide below, I wrote a perl script to solve it as workround.
@4 means the total number of bytes required by function arguments

Thanks,
bridgeic

bilbo 04-05-2013 01:36

Quote:

I don't know why I can't download your attachement in exetools forum.
it is a matter of forum rules... look for an old post http://forum.exetools.com/showthread.php?t=6206

ragdog 04-05-2013 04:12

.686
.model flat, stdcall ;32 bit memory model
option casemap :none ;case sensitive

include windows.inc
include kernel32.inc
includelib kernel32.lib

bridgeic 04-06-2013 08:46

Quote:

Originally Posted by ragdog (Post 83871)
.686
.model flat, stdcall ;32 bit memory model
option casemap :none ;case sensitive

include windows.inc
include kernel32.inc
includelib kernel32.lib

Hi ragdog,

When I set it as your suggestion, RadASM give error below when compile, would you help check why?

D:\RadASM_2.2.1.9\Masm32\Include\windows.inc(11326) : error A2005: symbol redefinition : Red
D:\RadASM_2.2.1.9\Masm32\Include\windows.inc(11327) : error A2005: symbol redefinition : Green
D:\RadASM_2.2.1.9\Masm32\Include\windows.inc(11328) : error A2005: symbol redefinition : Blue
D:\RadASM_2.2.1.9\Masm32\Include\windows.inc(12224) : error A2005: symbol redefinition : fReserved
D:\RadASM_2.2.1.9\Masm32\Include\windows.inc(18572) : error A2005: symbol redefinition : Type1
D:\RadASM_2.2.1.9\Masm32\Include\windows.inc(18617) : error A2005: symbol redefinition : Type1
D:\RadASM_2.2.1.9\Masm32\Include\windows.inc(18621) : error A2005: symbol redefinition : Type1
D:\RadASM_2.2.1.9\Masm32\Include\windows.inc(18624) : fatal error A1010: unmatched block nesting

Thanks,
bridgeic

bridgeic 04-06-2013 09:06

Quote:

Originally Posted by ragdog (Post 83871)
.686
.model flat, stdcall ;32 bit memory model
option casemap :none ;case sensitive

include windows.inc
include kernel32.inc
includelib kernel32.lib

Hi ragdog,

question1: When I set it as your suggestion, RadASM give error below when compile, would you help check why?

D:\RadASM_2.2.1.9\Masm32\Include\windows.inc(11326) : error A2005: symbol redefinition : Red
D:\RadASM_2.2.1.9\Masm32\Include\windows.inc(11327) : error A2005: symbol redefinition : Green
D:\RadASM_2.2.1.9\Masm32\Include\windows.inc(11328) : error A2005: symbol redefinition : Blue
D:\RadASM_2.2.1.9\Masm32\Include\windows.inc(12224) : error A2005: symbol redefinition : fReserved
D:\RadASM_2.2.1.9\Masm32\Include\windows.inc(18572) : error A2005: symbol redefinition : Type1
D:\RadASM_2.2.1.9\Masm32\Include\windows.inc(18617) : error A2005: symbol redefinition : Type1
D:\RadASM_2.2.1.9\Masm32\Include\windows.inc(18621) : error A2005: symbol redefinition : Type1
D:\RadASM_2.2.1.9\Masm32\Include\windows.inc(18624) : fatal error A1010: unmatched block nesting

question 2: after remove "include windows.inc", it can be compiled succesfully, but when do LINK in VC, it still reports errors below, how to solve this issue?
error LNK2019: Unresolved external symbol _GetModuleHandleA

Thanks,
bridgeic

ragdog 04-06-2013 15:20

Send me you Project
I look into

bridgeic 04-07-2013 00:09

Quote:

Originally Posted by ragdog (Post 83916)
Send me you Project
I look into

Hi ragdog,

Would you help me have a look on question 1 first?

I'll try to upload the test case for question 2 tomorrow, it's a little big. In fact, it's FlexLM SDK 11.4, if you have it already, I need only share two files then.

Thanks,
bridgeic

ragdog 04-07-2013 00:59

I cannot answer your questions without see your source ;-)

But i think your have trouble with the includes

bridgeic 04-07-2013 01:29

1 Attachment(s)
Quote:

Originally Posted by ragdog (Post 83934)
I cannot answer your questions without see your source ;-)

But i think your have trouble with the includes

Hi ragdog,

For question 1, please get the asm source code as attached, thank you.

bridgeic 04-07-2013 01:32

Hi ragdog,

Another help please, can you run the program lib2inc22.exe that bilbo shared succesfully?

Thanks,
bridgeic

bridgeic 04-07-2013 18:03

Hi ragdog,

Question 1. seems the errors caused by /Zm option

Question 2. Sorry, the test case upload always failed for the slow network speed.

Thanks,
bridgeic

ragdog 04-07-2013 19:38

To convert it to compile it with masm is to many works
What make _tolower convert it uppercase letter to lower?

Example ABCD to abcd?

Or what make this source?


/Zm option
Enables M510 option for maximum compatibility with MASM 5.1.


All times are GMT +8. The time now is 17:27.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX