Open lingdf opened 10 years ago
Hello lingdf,
To build the MIRACL library, please follow the steps from manual.doc:
1.Compile and run config.c on the target processor.
2.Rename the generated file mirdef.tst to mirdef.h
3.If so advised by the config program, extract a suitable mrmuldv.c file from mrmuldv.any (or copy the standard C version mrmuldv.ccc to mrmuldv.c and use this). If it is pure assembly language it may be appropriate to name it mrmuldv.s or mrmuldv.asm.
4.If the fast KCM or Comba methods for modular multiplication were selected (see below), compile and run the mex.c utility on any workstation. Use it to automatically generate either the module mrcomba.c or mrkcm.c. This will require a processor/compiler-specific xxx.mcs file. The compiler must support inline assembly.
5.Make sure that all the MIRACL header files are accessible to the compiler. Typically the flag –I. or /I. allows these headers to be accessed from the current directory.
6.Compile the MIRACL modules listed in the generated file miracl.lst and create a library file, typically miracl.a or miracl.lib. This might be achieved by editing miracl.lst into a suitable batch or make file. On UNIX it might be as simple as:-
gcc –I. –c –O2 mr.c ar rc miracl.a mr.o
7.If using the C++ MIRACL wrapper, compile the required modules, for example zzn.cpp and/or big.cpp etc.
8.Compile and link your application code to any C++ modules it requires and to the MIRACL library.
You can find the manual.doc file here:
I did the same steps but I still get some errors about _asm. Any idea why I am getting this error?? Mac OS X 10.10.
mrmuldv.c:12:9: error: use of undeclared identifier '_asm'
ASM mov eax,DWORD PTR a
^
mrmuldv.c:7:13: note: expanded from macro 'ASM'
^
mrmuldv.c:24:9: error: use of undeclared identifier '_asm'
ASM mov edx,DWORD PTR a
^
mrmuldv.c:7:13: note: expanded from macro 'ASM'
^
mrmuldv.c:34:9: error: use of undeclared identifier '_asm'
ASM mov eax,DWORD PTR a
^
mrmuldv.c:7:13: note: expanded from macro 'ASM'
^
mrmuldv.c:46:9: error: use of undeclared identifier '_asm'
ASM mov eax,DWORD PTR a
^
mrmuldv.c:7:13: note: expanded from macro 'ASM'
^
4 errors generated.
Hello Gungor,
Unfortunately I know nothing about Macs.
Have a look around line 1422 of miracl.h - it looks like this #define is active
which should only happen for the Microsoft compiler (??)
So I am assuming you are using the Microsoft C compiler.
If so, then maybe try changing this line to
If that fails try __asm, or check your compiler documentation to find out what keyword the compiler accepts.
On Windows boxes, _asm works fine.
Mike
On Sun, Oct 19, 2014 at 8:37 AM, Güngör notifications@github.com wrote:
I did the same steps but I still get some errors about _asm. Any idea why I am getting this error?? Mac OS X 10.10.
mrmuldv.c:12:9: error: use of undeclared identifier '_asm' ASM mov eax,DWORD PTR a
^ mrmuldv.c:7:13: note: expanded from macro 'ASM'
define ASM _asm
^ mrmuldv.c:24:9: error: use of undeclared identifier '_asm' ASM mov edx,DWORD PTR a
^ mrmuldv.c:7:13: note: expanded from macro 'ASM'
define ASM _asm
^ mrmuldv.c:34:9: error: use of undeclared identifier '_asm' ASM mov eax,DWORD PTR a
^ mrmuldv.c:7:13: note: expanded from macro 'ASM'
define ASM _asm
^ mrmuldv.c:46:9: error: use of undeclared identifier '_asm' ASM mov eax,DWORD PTR a
^ mrmuldv.c:7:13: note: expanded from macro 'ASM'
define ASM _asm
^ 4 errors generated.
— Reply to this email directly or view it on GitHub https://github.com/CertiVox/MIRACL/issues/4#issuecomment-59642104.
Michael Scott Chief Cryptographer CertiVox Ltd Tel (353) 86 3888746
Hello,
When I try to compile, it could not find the one header file in the source folder. Probably it was "miracle.h". Then I copied that file from the include folder. That might be the reason for my problem then. By the way, I am definitely not using microsoft compiler. I am using gcc.
I took the "linux64" compile script on Mac OSX 10.10 and ran it with "bash linux64". That was flawless and no problem, miracle.a was build.
But afterwards, when trying to use it, the gcc (or g++ or clang++, etc.) always complaining about "ld: symbol(s) not found for architecture x86_64"
More information required. What symbol is not found?
Mike
On Wed, Feb 11, 2015 at 9:28 PM, coliban notifications@github.com wrote:
I took the "linux64" compile script on Mac OSX 10.10 and ran it with "bash linux64". That was flawless and no problem, miracle.a was build.
But afterwards, when trying to use it, the gcc (or g++ or clang++, etc.) always complaining about "ld: symbol(s) not found for architecture x86_64"
— Reply to this email directly or view it on GitHub https://github.com/CertiVox/MIRACL/issues/4#issuecomment-73968545.
Michael Scott Chief Cryptographer CertiVox Ltd Tel (353) 86 3888746
Thank you, mcarrickscott,
on the mac (Yosemite, 10.10.2) , there has to be set an environment variable:
MACOSX_DEPLOYMENT_TARGET=10.9
and then it is compiling with no problem
Great!
Mike
On Thu, Feb 12, 2015 at 7:26 PM, coliban notifications@github.com wrote:
Thank you, mcarrickscott,
on the mac (Yosemite, 10.10.2) , there has to be set an environment variable:
MACOSX_DEPLOYMENT_TARGET=10.9
and then it is compiling with no problem
— Reply to this email directly or view it on GitHub https://github.com/CertiVox/MIRACL/issues/4#issuecomment-74135353.
Michael Scott Chief Cryptographer CertiVox Ltd Tel (353) 86 3888746
I followed the steps in https://github.com/CertiVox/MIRACL/issues/4#issuecomment-39952146 to compile on 64bit Mac OS X (10.9) but after I run
gcc -I../include -c -O2 mr*.c
I end up getting errors as shown in gist https://gist.github.com/sumproxy/81cce102c175b8ec1e10#file-output bash linux64 from CLI doesn't work either
Show me mirdef.h file that you are using
Mike
On Thursday, July 2, 2015, Sum Proxy notifications@github.com wrote:
I followed the steps in #4 (comment) https://github.com/CertiVox/MIRACL/issues/4#issuecomment-39952146 to compile on 64bit Mac OS X (10.9) but after I run
gcc -I../include -c -O2 mr*.c
I end up getting errors as shown in gist https://gist.github.com/sumproxy/81cce102c175b8ec1e10#file-output bash linux64 from CLI doesn't work either
— Reply to this email directly or view it on GitHub https://github.com/CertiVox/MIRACL/issues/4#issuecomment-117989990.
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."
That's the header for a 32 bit build. Also use long long instead of __int64
Mike
On Thu, Jul 2, 2015 at 11:22 AM, Sum Proxy notifications@github.com wrote:
sure: https://gist.github.com/sumproxy/bb8124eb723600e5bbbb#file-gistfile1-txt
— Reply to this email directly or view it on GitHub https://github.com/CertiVox/MIRACL/issues/4#issuecomment-117991989.
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."
Now I get a bunch of warnings https://gist.github.com/sumproxy/ce8826ce137cd3c36323#file-gistfile1-txt
btw thanks for all your help so far
Just downloaded miracl.zip to a clean directory on my mini-mac, executed "unzip -j -L -aa miracl.zip” and followed that with “bash linux64”. This worked fine and built a 64-bit version of the miracl library - miracl.a
mike https://cvx.slack.com/team/mike[6:54 PM] Is this what you wanted? It then runs into a problem with the C++ code - there is a well-known bug in the mac port of g++ - but even that could be worked around quite easily.
Mike
On 2 Jul 2015, at 14:57, Sum Proxy notifications@github.com wrote:
btw thanks for all your help so far
— Reply to this email directly or view it on GitHub https://github.com/CertiVox/MIRACL/issues/4#issuecomment-118041724.
In fact the C++ work-around is quite simple. Substitute the attached files for a clean "bash linux64" build
Mike
On 2 Jul 2015, at 18:57, Michael Scott mike.scott@certivox.com wrote:
Just downloaded miracl.zip to a clean directory on my mini-mac, executed "unzip -j -L -aa miracl.zip” and followed that with “bash linux64”. This worked fine and built a 64-bit version of the miracl library - miracl.a
mike https://cvx.slack.com/team/mike[6:54 PM] Is this what you wanted? It then runs into a problem with the C++ code - there is a well-known bug in the mac port of g++ - but even that could be worked around quite easily.
Mike
On 2 Jul 2015, at 14:57, Sum Proxy <notifications@github.com mailto:notifications@github.com> wrote:
btw thanks for all your help so far
— Reply to this email directly or view it on GitHub https://github.com/CertiVox/MIRACL/issues/4#issuecomment-118041724.
I followed the instructions in linux.txt but still got errors: https://gist.github.com/sumproxy/3e34e60395c3b87a124c#file-gistfile1-txt I used bash linux64 to build it
You didn't substitute the files big.h big.cpp zzn.h and zzn.cpp that I sent you(?) So I am not surprised you got errors.
These files have the work-around for the gcc issue on macs
Mike
On Fri, Jul 3, 2015 at 10:41 AM, Sum Proxy notifications@github.com wrote:
I followed the instructions in linux.txt but still got errors: https://gist.github.com/sumproxy/3e34e60395c3b87a124c#file-gistfile1-txt
— Reply to this email directly or view it on GitHub https://github.com/CertiVox/MIRACL/issues/4#issuecomment-118300046.
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."
It's funny but I don't get confirmation email from certivox.com, tried a number of times
I don't understand..
Mike
On Fri, Jul 3, 2015 at 11:09 AM, Sum Proxy notifications@github.com wrote:
It's funny but I don't get confirmation email from certivox.com, tried a number of times
— Reply to this email directly or view it on GitHub https://github.com/CertiVox/MIRACL/issues/4#issuecomment-118304937.
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."
You mean this https://cvx.slack.com/team/mike? can't access without registration, which doesn't send a confirmation letter
I was trying to register a certivox account, which probably not where the files you sent are. Can't figure out where I can find them. Sorry for the confusion. Can't find the files in github either
You tell me where to send them…
Mike
On 3 Jul 2015, at 11:36, Sum Proxy notifications@github.com wrote:
I was trying to register a certivox account, which probably not where the files you sent are. Can't figure out where I can find them
— Reply to this email directly or view it on GitHub https://github.com/CertiVox/MIRACL/issues/4#issuecomment-118311543.
sure: sumproxy(at)gmail(dot)com
hej,
on stage of running
gcc -I../include -c -O2 mr*.c
getting "same" errors: https://gist.github.com/lesyk/1f10497a7fe2cbe5db4b
my mirdef.h is: https://gist.github.com/lesyk/1365919137c55ff1d5e9
bash linux64
produces same errors, as @sumproxy wrote about
@mcarrickscott, is not quite clear about life saving files? May you please write something in README, clarify in discussion?
I think the attached files fixed the problem.
In gcc on a mac a member function in for example big.h like
friend int to_binary(const Big& b,int max,char *ptr,BOOL justify=FALSE)
{ return big_to_bytes(max,b.fn,ptr,justify);}
which has a default parameter ("justify=FALSE") must be be inlined like this
So do a clean download of MIRACL, and substitute these files, then do bash linux64
Mike
On Thu, Aug 6, 2015 at 2:11 PM, lesyk notifications@github.com wrote:
hej, mac
on stage of running gcc -I../include -c -O2 mr*.c getting "same" errors: https://gist.github.com/lesyk/1f10497a7fe2cbe5db4b my mirdef.h is: https://gist.github.com/lesyk/1365919137c55ff1d5e9 linux64
bash linux64 produces same errors, as @sumproxy https://github.com/sumproxy wrote about
@mcarrickscott https://github.com/mcarrickscott, is not quite clear about life saving files? May you please write something in README, clarify in discussion?
— Reply to this email directly or view it on GitHub https://github.com/CertiVox/MIRACL/issues/4#issuecomment-128358320.
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." (with apologies to Benjamin Franklin)
@mcarrickscott, @sumproxy thx!
@mcarrickscott I'm currently also having trouble building MIRACL on OSX. I tried going to https://cvx.slack.com/team/mike , but I cannot create an account to access these files on this site. Could you possibly make these available somewhere public? This is greatly appreciated, thank you in advance!
Can you give me more details of the problems you are having?
Installing MIRACL on OSX should just be a matter of
unzip -j -L -aa miracl.zip
followed by
bash linux64
There is also a known problem with the mac port of g++ involving friend declarations in big.h and zzn.h
If this is your problem, try substituting the attached files
Mike
On Sat, Jan 23, 2016 at 8:53 PM, RobTrifiletti notifications@github.com wrote:
@mcarrickscott https://github.com/mcarrickscott I'm currently also having trouble building MIRACL on OSX. I tried going to https://cvx.slack.com/team/mike , but I cannot create an account to access these files on this site. Could you possibly make these available somewhere public? This is greatly appreciated, thank you in advance!
— Reply to this email directly or view it on GitHub https://github.com/CertiVox/MIRACL/issues/4#issuecomment-174221797.
Dear Mike, Yes, my problem is the friend declarations. You say I should substitute the attached files. I might be foolish here, but I dont see any attached files in this thread. I thought you meant at https://cvx.slack.com/team/mike, but as I said before I cannot access this area. Thanks!
I did attach the files to my email, but it seems they didn't get through to you.
Give me an email address and I will send them directly to you. The changes are minimal. Rather than
friend void foo() {}
in big .h (which should work - in-lining functions like this is OK)
change to
friend void foo();
and insert
void foo() {}
into big.cpp
Mike
On Mon, Jan 25, 2016 at 3:02 PM, RobTrifiletti notifications@github.com wrote:
Dear Mike, Yes, my problem is the friend declarations. You say I should substitute the attached files. I might be foolish here, but I dont see any attached files in this thread. I thought you meant at https://cvx.slack.com/team/mike, but as I said before I cannot access this area. Thanks!
— Reply to this email directly or view it on GitHub https://github.com/CertiVox/MIRACL/issues/4#issuecomment-174534296.
I see. I would greatly appreciate if you could send me the modified files though. I sent an email already :)
Thank you for your help!
On 25 Jan 2016, at 16:08, Michael Scott notifications@github.com wrote:
I did attach the files to my email, but it seems they didn't get through to you.
Give me an email address and I will send them directly to you. The changes are minimal. Rather than
friend void foo() {}
in big .h (which should work - in-lining functions like this is OK)
change to
friend void foo();
and insert
void foo() {}
into big.cpp
Mike
On Mon, Jan 25, 2016 at 3:02 PM, RobTrifiletti notifications@github.com wrote:
Dear Mike, Yes, my problem is the friend declarations. You say I should substitute the attached files. I might be foolish here, but I dont see any attached files in this thread. I thought you meant at https://cvx.slack.com/team/mike, but as I said before I cannot access this area. Thanks!
— Reply to this email directly or view it on GitHub https://github.com/CertiVox/MIRACL/issues/4#issuecomment-174534296.
— Reply to this email directly or view it on GitHub https://github.com/CertiVox/MIRACL/issues/4#issuecomment-174536506.
@mcarrickscott
I tried to build Miracl on Mac 10.11.3 recently and also met the same friend declarations problems as RobTrifiletti
I will appreciate if you could send me those modified files by email.
My email is iosdev@eetrust.com
Long time. When I am home I will see what I will find and send it.
Mit freundlichen Grüßen
Am 21.06.2016 um 08:26 schrieb LarkNan notifications@github.com:
@mcarrickscott
I tried to build Miracl on Mac 10.11.3 recently and also met the same friend declarations problems as RobTrifiletti
I will appreciate if you could send me those modified files by email.
My email is iosdev@eetrust.com
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
Here they are..
Mike
On Tue, Jun 21, 2016 at 7:26 AM, LarkNan notifications@github.com wrote:
@mcarrickscott https://github.com/mcarrickscott
I tried to build Miracl on Mac 10.11.3 recently and also met the same friend declarations problems as RobTrifiletti
I will appreciate if you could send me those modified files by email.
My email is iosdev@eetrust.com
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/miracl/MIRACL/issues/4#issuecomment-227351429, or mute the thread https://github.com/notifications/unsubscribe/ACm8jvR6ZykmCzNh3XjXJtqe4f45xx57ks5qN4QhgaJpZM4Bw147 .
@mcarrickscott I couldn't find those modified files in this thread. Could you please send them to my mailbox? thanks a lot!
@mcarrickscott @coliban Ok, I received the mail,thank you.
Hi, I just created a patch file that solves the compilation issue:
https://gist.github.com/cygnusv/a1710ed5c1e74ac77ea0643266f0a15f
@mcarrickscott Would you please also send me the modified files since I am also trying to compile the Miracl library on Mac? Thanks a lot. My email is linhuangsame@gmail.com. Thank you in advance.
Hello,
Find attached
Mike
On Thu, Mar 9, 2017 at 7:20 AM, H_Lin notifications@github.com wrote:
@mcarrickscott https://github.com/mcarrickscott Would you please also send me the modified files since I am also trying to compile the Miracl library on Mac? Thanks a lot. My email is linhuangsame@gmail.com. Thank you in advance.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/miracl/MIRACL/issues/4#issuecomment-285274618, or mute the thread https://github.com/notifications/unsubscribe-auth/ACm8jmx0p5SPlG_l8xAEiH_HFpsXeQw3ks5rj6hBgaJpZM4Bw147 .
Hello Mike,
Thank you for your prompt response. But I don't find anything attached to your message. Did I miss something? Please let me know. Thanks a lot.
Best, Huang
On Thu, Mar 9, 2017 at 4:40 PM, Michael Scott notifications@github.com wrote:
Hello,
Find attached
Mike
On Thu, Mar 9, 2017 at 7:20 AM, H_Lin notifications@github.com wrote:
@mcarrickscott https://github.com/mcarrickscott Would you please also send me the modified files since I am also trying to compile the Miracl library on Mac? Thanks a lot. My email is linhuangsame@gmail.com. Thank you in advance.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/miracl/MIRACL/issues/4#issuecomment-285274618, or mute the thread https://github.com/notifications/unsubscribe- auth/ACm8jmx0p5SPlG_l8xAEiH_HFpsXeQw3ks5rj6hBgaJpZM4Bw147 .
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/miracl/MIRACL/issues/4#issuecomment-285288960, or mute the thread https://github.com/notifications/unsubscribe-auth/AIGdI8zdVYtam4uMSj6s9Nr1Vd9-xG-Sks5rj7r8gaJpZM4Bw147 .
@mcarrickscott Can you please send me files which I need to replace, to solve friend function error in OSX?
My mail id is joshinikunj008 at gmail dot com
Thanks.
I did attach the files to my email, but it seems they didn't get through to you.
Give me an email address and I will send them directly to you. The changes are minimal. Rather than
friend void foo() {}
in big .h (which should work - in-lining functions like this is OK)
change to
friend void foo();
and insert
void foo() {}
into big.cpp
Mike
On Mon, Jan 25, 2016 at 3:02 PM, RobTrifiletti notifications@github.com wrote:
Dear Mike, Yes, my problem is the friend declarations. You say I should substitute the attached files. I might be foolish here, but I dont see any attached files in this thread. I thought you meant at https://cvx.slack.com/team/mike, but as I said before I cannot access this area. Thanks! — Reply to this email directly or view it on GitHub #4 (comment).
Dear Michael Scott I have installed Miracl and I can linked it by gcc command ,but I can't use it in Xcode.Xcode always says "Conflicting types for 'instr'". It happens in miracl.h,"extern int instr(MIPT flash,char *);",this line.I don't know how to deal it.Would you please help me?
Sorry, just not enough information there to enable me to help. For example which parameter is causing the conflict? And what is the declaration in miracl.h conflicting with?
Mike
On Wed, Nov 14, 2018 at 10:45 AM Atbnsanw notifications@github.com wrote:
I did attach the files to my email, but it seems they didn't get through to you.
Give me an email address and I will send them directly to you. The changes are minimal. Rather than
friend void foo() {}
in big .h (which should work - in-lining functions like this is OK)
change to
friend void foo();
and insert
void foo() {}
into big.cpp
Mike
On Mon, Jan 25, 2016 at 3:02 PM, RobTrifiletti notifications@github.com wrote:
Dear Mike, Yes, my problem is the friend declarations. You say I should substitute the attached files. I might be foolish here, but I dont see any attached files in this thread. I thought you meant at https://cvx.slack.com/team/mike, but as I said before I cannot access this area. Thanks! — Reply to this email directly or view it on GitHub
4 (comment)
https://github.com/miracl/MIRACL/issues/4#issuecomment-174534296.
Dear Michael Scott I have installed Miracl and I can linked it by gcc command ,but I can't use it in Xcode.Xcode always says "Conflicting types for 'instr'". It happens in miracl.h,"extern int instr(MIPT flash,char *);",this line.I don't know how to deal it.Would you please help me?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/miracl/MIRACL/issues/4#issuecomment-438619154, or mute the thread https://github.com/notifications/unsubscribe-auth/ACm8jpopQ0XgmDuZgPslkQylR4mkKU3dks5uu_RUgaJpZM4Bw147 .
Sorry, just not enough information there to enable me to help. For example which parameter is causing the conflict? And what is the declaration in miracl.h conflicting with? Mike … On Wed, Nov 14, 2018 at 10:45 AM Atbnsanw @.> wrote: I did attach the files to my email, but it seems they didn't get through to you. Give me an email address and I will send them directly to you. The changes are minimal. Rather than friend void foo() {} in big .h (which should work - in-lining functions like this is OK) change to friend void foo(); and insert void foo() {} into big.cpp Mike On Mon, Jan 25, 2016 at 3:02 PM, RobTrifiletti @. wrote: Dear Mike, Yes, my problem is the friend declarations. You say I should substitute the attached files. I might be foolish here, but I dont see any attached files in this thread. I thought you meant at https://cvx.slack.com/team/mike, but as I said before I cannot access this area. Thanks! — Reply to this email directly or view it on GitHub #4 (comment) <#4 (comment)>. Dear Michael Scott I have installed Miracl and I can linked it by gcc command ,but I can't use it in Xcode.Xcode always says "Conflicting types for 'instr'". It happens in miracl.h,"extern int instr(MIPT flash,char *);",this line.I don't know how to deal it.Would you please help me? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#4 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/ACm8jpopQ0XgmDuZgPslkQylR4mkKU3dks5uu_RUgaJpZM4Bw147 .
This:
And all files in folder are:
And I can use command:"gcc -o main main.c -I.. libmiracl.a ",compilie successfully.
Sorry, just not enough information there to enable me to help. For example which parameter is causing the conflict? And what is the declaration in miracl.h conflicting with? Mike …
My miracl.h:https://github.com/Atbnsanw/error_miracl_headfile/blob/master/error_miracl_headfile. Thank you very much.
Since miracl.h already includes mirdef.h, try removing line 3 #include "mirdef.h" from main.c
It is not needed.
Mike
On Wed, Nov 14, 2018 at 12:29 PM Atbnsanw notifications@github.com wrote:
Sorry, just not enough information there to enable me to help. For example which parameter is causing the conflict? And what is the declaration in miracl.h conflicting with? Mike … <#m3052967364361243224> On Wed, Nov 14, 2018 at 10:45 AM Atbnsanw @.> wrote: I did attach the files to my email, but it seems they didn't get through to you. Give me an email address and I will send them directly to you. The changes are minimal. Rather than friend void foo() {} in big .h (which should work - in-lining functions like this is OK) change to friend void foo(); and insert void foo() {} into big.cpp Mike On Mon, Jan 25, 2016 at 3:02 PM, RobTrifiletti @. wrote: Dear Mike, Yes, my problem is the friend declarations. You say I should substitute the attached files. I might be foolish here, but I dont see any attached files in this thread. I thought you meant at https://cvx.slack.com/team/mike, but as I said before I cannot access this area. Thanks! — Reply to this email directly or view it on GitHub #4 https://github.com/miracl/MIRACL/issues/4 (comment) <#4 (comment) https://github.com/miracl/MIRACL/issues/4#issuecomment-174534296>. Dear Michael Scott I have installed Miracl and I can linked it by gcc command ,but I can't use it in Xcode.Xcode always says "Conflicting types for 'instr'". It happens in miracl.h,"extern int instr(MIPT flash,char *);",this line.I don't know how to deal it.Would you please help me? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#4 (comment) https://github.com/miracl/MIRACL/issues/4#issuecomment-438619154>, or mute the thread https://github.com/notifications/unsubscribe-auth/ACm8jpopQ0XgmDuZgPslkQylR4mkKU3dks5uu_RUgaJpZM4Bw147 .
This: [image: image] https://user-images.githubusercontent.com/37361106/48482124-c4b1a300-e84a-11e8-957b-852241e28b5b.png [image: image] https://user-images.githubusercontent.com/37361106/48482162-ea3eac80-e84a-11e8-9d41-4f6ec08da8b7.png And all files in folder are: [image: image] https://user-images.githubusercontent.com/37361106/48482354-6f29c600-e84b-11e8-867d-c1f81ef46017.png And I can use command:"gcc -o main main.c -I.. libmiracl.a ",compilie successfully.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/miracl/MIRACL/issues/4#issuecomment-438645517, or mute the thread https://github.com/notifications/unsubscribe-auth/ACm8jsUo5aB81n_laL6hZtBQVf9FKNLAks5uvAyQgaJpZM4Bw147 .
Since miracl.h already includes mirdef.h, try removing line 3 #include "mirdef.h" from main.c It is not needed. Mike …
I tried, and still failed.
This two place all announced "instr" function. Should I change one of them?
Ah, OK. That's always a potential problem with C - a function name clash with another library.
I suggest that you edit ALL of the miracl library files and replace instr(..) everywhere with (for example) mr_instr(..)
That should fix it.
Mike
On Wed, Nov 14, 2018 at 1:38 PM Atbnsanw notifications@github.com wrote:
Since miracl.h already includes mirdef.h, try removing line 3 #include "mirdef.h" from main.c It is not needed. Mike … <#m44160497638197421>
I tried, and still failed. [image: image] https://user-images.githubusercontent.com/37361106/48486009-460e3300-e855-11e8-80ef-e46124bb7e90.png [image: image] https://user-images.githubusercontent.com/37361106/48486036-545c4f00-e855-11e8-9c0d-be1b656f1ba2.png This two place all announced "instr" function. Should I change one of them?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/miracl/MIRACL/issues/4#issuecomment-438664473, or mute the thread https://github.com/notifications/unsubscribe-auth/ACm8jslZ6oSukkTI9vdD9m_M7NoMqeRwks5uvBzggaJpZM4Bw147 .
Ah, OK. That's always a potential problem with C - a function name clash with another library. I suggest that you edit ALL of the miracl library files and replace instr(..) everywhere with (for example) mr_instr(..) That should fix it. Mike …
Thanks for your help, now I have fixed it.This function appears only once in ‘miracl.h'.Now I can use Miracl properly.Thank you very much.
How can I compile in mac os .a library and Which is what I need the source files