miracl / MIRACL

MIRACL Cryptographic SDK: Multiprecision Integer and Rational Arithmetic Cryptographic Library is a C software library that is widely regarded by developers as the gold standard open source SDK for elliptic curve cryptography (ECC).
https://miracl.com
655 stars 242 forks source link

mrstrong in line 167 #10

Open alaneuler opened 9 years ago

alaneuler commented 9 years ago

Hello, I am trying to create MIRACL library using Visual Studio, but when I build the project I get the error MIRACL-master\source\mrstrong.c(167): error C2065: “dres” not defined. I don't know where I did wrong. Can you help me?

Also my MIRACL-master does not contain file "mrkcm.c"

I find the definition in miracl.h, "#define MR_DIV(a,b) (modf((a)/(b),&dres),dres)" is the code right?

"dres" is never ever defined!

Thanks in advance.

mcarrickscott commented 9 years ago

Hmmm. You must have MR_FP defined in mirdef.h

This is not recommended. You should use a standard mirdef.h header.

However you can make this particular error go away by inserting

ifdef MR_FP

mr_small dres;

endif

at the start of strong_bigrand()

Mike

On Fri, Jul 10, 2015 at 4:35 PM, Irvine notifications@github.com wrote:

Hello, I am trying to create MIRACL library using Visual Studio, but when I build the project I get the error MIRACL-master\source\mrstrong.c(167): error C2065: “dres” not defined. I don't know where I did wrong. Can you help me?

Thanks in advance.

— Reply to this email directly or view it on GitHub https://github.com/CertiVox/MIRACL/issues/10.

Michael Scott Chief Cryptographer CertiVox Ltd Tel (353) 86 3888746

"Those who give up essential security to purchase a slightly better user experience, deserve to get hacked."

ayesha99 commented 6 years ago

Hi, I am also trying to create MIRACL library using Visual Studio, while building the project I get the error in mrstrong.c(169): "modf" not defined.

how can i resolve this?

mcarrickscott commented 6 years ago

Hello

The modf() function is included in the standard C libraries.

https://msdn.microsoft.com/en-us/library/bk4c380c.aspx

However depending on exactly what you are doing, you may need to #include

or #include so that the compiler can find its definition (see the link above). Mike On Fri, May 4, 2018 at 7:15 PM, ayesha99 wrote: > Hi, I am also trying to create MIRACL library using Visual Studio, while > building the project I get the error in mrstrong.c(169): "modf" not defined. > > how can i resolve this? > > — > You are receiving this because you commented. > Reply to this email directly, view it on GitHub > , or mute > the thread > > . >