Author Topic: Convert VC++ library to masm?  (Read 22301 times)

qWord

  • Member
  • *****
  • Posts: 1476
  • The base type of a type is the type itself
    • SmplMath macros
Re: Convert VC++ library to masm?
« Reply #30 on: May 23, 2013, 06:42:24 AM »
i guess i should open winasm studio>project>properties>release>command line?
yes, you must add that option. Because the path contains spaces, it should be enclosed in double quotes:
/LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib"

I hope you also had add the function to your library build. For that purpose I have add a new module (named C_interface.cpp) to the library:
Code: [Select]
#include "pch.h"
#include "md5.h"

extern "C" void CalculateDigest(byte* hash_value, const byte* data, size_t length) {
    CryptoPP::MD5 hash;
    hash.CalculateDigest( hash_value, data, length);
}
MREAL macros - when you need floating point arithmetic while assembling!

Redlabel

  • Guest
Re: Convert VC++ library to masm?
« Reply #31 on: May 23, 2013, 06:57:29 AM »
....
« Last Edit: May 25, 2013, 07:23:51 PM by Redlabel »

qWord

  • Member
  • *****
  • Posts: 1476
  • The base type of a type is the type itself
    • SmplMath macros
Re: Convert VC++ library to masm?
« Reply #32 on: May 23, 2013, 07:03:27 AM »
Redlabel,
The shown c++ file must be add to the project that is used to build the cryptlib (In other word: you must extend the crypto library by the adding the function CalculateDigest()).
MREAL macros - when you need floating point arithmetic while assembling!

Redlabel

  • Guest
Re: Convert VC++ library to masm?
« Reply #33 on: May 23, 2013, 07:23:18 AM »
...
« Last Edit: May 25, 2013, 07:23:38 PM by Redlabel »

qWord

  • Member
  • *****
  • Posts: 1476
  • The base type of a type is the type itself
    • SmplMath macros
Re: Convert VC++ library to masm?
« Reply #34 on: May 23, 2013, 07:42:35 AM »
You just need to add the file to the project (I'm talking about the c++-library!): for Visual Studio this could be: Project->Add Item->new c++ source.

BTW: It seems like that the whole topic is beyond your limits.
MREAL macros - when you need floating point arithmetic while assembling!

Redlabel

  • Guest
Re: Convert VC++ library to masm?
« Reply #35 on: May 23, 2013, 04:18:51 PM »
....
« Last Edit: May 25, 2013, 07:23:27 PM by Redlabel »

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 7800
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Convert VC++ library to masm?
« Reply #36 on: June 09, 2013, 05:04:18 PM »
Redlabel,

Make a point of NOT deleting post contents, other members have responded and your deletions render their posts unintelligible.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

jj2007

  • Member
  • *****
  • Posts: 10857
  • Assembler is fun ;-)
    • MasmBasic
Re: Convert VC++ library to masm?
« Reply #37 on: June 09, 2013, 07:51:43 PM »
Make a point of NOT deleting post contents, other members have responded and your deletions render their posts unintelligible.

This habit is indeed extremely anti-social. I wonder whether one can block post edits for members below a certain post count; allowing as usual, one hour to correct typos etc.

Dubby

  • Member
  • **
  • Posts: 60
Re: Convert VC++ library to masm?
« Reply #38 on: June 09, 2013, 09:16:36 PM »
just a question "Why?"..

never fell embarrassed of making mistakes in learning process.. my first source code was full of garbage, if I made mistake I don't delete them just comment them out and put a notice "this is mistakes.." and after the source finished I retype the right source in the new document, side by side with the old and possibly optimize it ... that way I can learn from my mistakes... and try to stay away from it..

Hutch, if I remember correctly in the old forum you have a notice about not deleting post, right? what about making it as a rule or a notice..?

Gunther

  • Member
  • *****
  • Posts: 3585
  • Forgive your enemies, but never forget their names
Re: Convert VC++ library to masm?
« Reply #39 on: June 09, 2013, 10:01:33 PM »

This habit is indeed extremely anti-social. I wonder whether one can block post edits for members below a certain post count; allowing as usual, one hour to correct typos etc.

Yes, indeed and very unfair.

Hutch, if I remember correctly in the old forum you have a notice about not deleting post, right? what about making it as a rule or a notice..?

That's a good proposal. We should think about it.

Gunther
Get your facts first, and then you can distort them.