NO

Author Topic: Problem with Miracl Library (Shamus Softwares)  (Read 17898 times)

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
Re: Problem with Miracl Library (Shamus Softwares)
« Reply #15 on: January 20, 2011, 10:27:17 AM »
Did you follow the advice of the users manual, which is a separate download?

Quote
To assist with the configuration process, a file config.c is provided. When compiled
and run on the target processor it automatically generates a mirdef.h file and gives
general advice on configuration. It also generates a miracl.lst file with a list of MIRACL
modules to be included in the associated library build. Experimentation with this
program is strongly encouraged. When compiling this program DO NOT use any
compiler optimization.
---
Stefan

Proud member of the UltraDefrag Development Team

KKR_WE_RULE

  • Guest
Re: Problem with Miracl Library (Shamus Softwares)
« Reply #16 on: January 20, 2011, 10:40:43 AM »
I tried to compile it, but it never compiles :(

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
Re: Problem with Miracl Library (Shamus Softwares)
« Reply #17 on: January 20, 2011, 12:05:12 PM »
Create an empty "Win32 Console Application (EXE)" project.
Copy config.c into the project folder.
Select "Project => Add files to project" and select config.c
Select "Project => Project options"
Select the Compiler tab
Set Optimizations to None
Hit OK
Build the project and ignore the warning about unused variables
Run the created EXE file and follow the instructions

Now you have build a custom mirdef.tst file, which would be your mirdef.h file.
The miracl.lst file would be used to compile your custom miracl.lib.
---
Stefan

Proud member of the UltraDefrag Development Team

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: Problem with Miracl Library (Shamus Softwares)
« Reply #18 on: January 20, 2011, 12:22:55 PM »
Those functions exist in ntdll.dll

ntdll-1.def
Code: [Select]
LIBRARY NTDLL.DLL
EXPORTS
_alldiv
_allmul
_allrem
_allshl
_atoi64
_aulldiv
_aulldvrm

polib.exe /DEF:ntdll-1.def /OUT:ntdll-1.lib /MACHINE :X86

try that library with it.

May the source be with you

KKR_WE_RULE

  • Guest
Re: Problem with Miracl Library (Shamus Softwares)
« Reply #19 on: January 20, 2011, 12:28:59 PM »
Did exactly as directed in the above post.
I replaced by old mirdef.h file with the newly created one.
I also placed the copied the miracl.lst to the same folder .

But I still get same errors.

Now ?

*edit*

@timovjl : How do I import a dll functions in C ?

I can do it in Delphi, but dunno how to do it in C :(

br
KKR
« Last Edit: January 20, 2011, 12:33:02 PM by KKR_WE_RULE »

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: Problem with Miracl Library (Shamus Softwares)
« Reply #20 on: January 20, 2011, 01:03:18 PM »
In this case make that library first to project folder.
Then add that import library to project.

http://forum.pellesc.de/index.php?topic=3272.msg12340#msg12340

From menu Project -> Project options ... -> Linker tab
add to Library and object files:

« Last Edit: January 20, 2011, 01:38:47 PM by timovjl »
May the source be with you

KKR_WE_RULE

  • Guest
Re: Problem with Miracl Library (Shamus Softwares)
« Reply #21 on: January 20, 2011, 01:11:56 PM »
But this means, my exe wont run without that .dll file .
Thats annoying.
Any work around to it ?

br
KKR

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: Problem with Miracl Library (Shamus Softwares)
« Reply #22 on: January 20, 2011, 01:25:04 PM »
Don't copy that ntdll.dll.
That import library ntdll-1.lib is needed only when linking that program.
May the source be with you

KKR_WE_RULE

  • Guest
Re: Problem with Miracl Library (Shamus Softwares)
« Reply #23 on: January 20, 2011, 03:17:09 PM »
I've added that polib thing, but I am not quite sure, what to do next :(
 To be frank, I am bit confused :(

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: Problem with Miracl Library (Shamus Softwares)
« Reply #24 on: January 20, 2011, 05:05:26 PM »
- copy ntdll-1.lib to project folder
- add ntdll-1.lib to project linker options
  From menu Project -> Project options... -> Linker tab add to Library and object files:
May the source be with you

KKR_WE_RULE

  • Guest
Re: Problem with Miracl Library (Shamus Softwares)
« Reply #25 on: January 21, 2011, 07:35:31 AM »
Alright.. All fixed :)

MHX

  • Guest
Re: Problem with Miracl Library (Shamus Softwares)
« Reply #26 on: February 27, 2011, 04:54:53 AM »
Hello!
In this library there are two types ECn and Big. As can be established between them to convert?
I have tried:
Code: [Select]
ECn x;
Big y;
y = (Big) x;
x = (ECn) y;
Is NOT running :(

In the archive  big.cpp, big.h, ecn.cpp, ecn.h and  manual.doc.

Offline AlexN

  • Global Moderator
  • Member
  • *****
  • Posts: 394
    • Alex's Link Sammlung
Re: Problem with Miracl Library (Shamus Softwares)
« Reply #27 on: February 27, 2011, 01:20:44 PM »
In the archive  big.cpp, big.h, ecn.cpp, ecn.h and  manual.doc.

The attached file are C++ source code - Pelles C is "only" a C compiler.
best regards
 Alex ;)

MHX

  • Guest
Re: Problem with Miracl Library (Shamus Softwares)
« Reply #28 on: February 27, 2011, 02:37:53 PM »
In the archive  big.cpp, big.h, ecn.cpp, ecn.h and  manual.doc.

The attached file are C++ source code - Pelles C is "only" a C compiler.
Sorry, I did not quite understand in English. What do you mean "Pelles C "? Complete library is "MIRACL" from the site http://www.shamus.ie/index.php?page=Downloads
« Last Edit: February 27, 2011, 02:47:14 PM by MHX »

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
Re: Problem with Miracl Library (Shamus Softwares)
« Reply #29 on: February 27, 2011, 03:44:53 PM »
Files ending in .CPP are C++ source files, which are not compatible with ANSI C.

In rare cases, they are ANSI C file and can be used by Pelles C.

There is a big difference between C and C++.
---
Stefan

Proud member of the UltraDefrag Development Team