Problem with Miracl Library (Shamus Softwares)

Started by KKR_WE_RULE, January 19, 2011, 07:17:47 AM

Previous topic - Next topic

Stefan Pendl

Did you follow the advice of the users manual, which is a separate download?

QuoteTo 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


Stefan Pendl

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

TimoVJL

Those functions exist in ntdll.dll

ntdll-1.def
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

#19
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

TimoVJL

#20
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:

May the source be with you

KKR_WE_RULE

But this means, my exe wont run without that .dll file .
Thats annoying.
Any work around to it ?

br
KKR

TimoVJL

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

I've added that polib thing, but I am not quite sure, what to do next :(
To be frank, I am bit confused :(

TimoVJL

- 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


MHX

Hello!
In this library there are two types ECn and Big. As can be established between them to convert?
I have tried:
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.

AlexN

Quote from: MHX on February 27, 2011, 04:54:53 AM
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

#28
Quote from: AlexN on February 27, 2011, 01:20:44 PM
Quote from: MHX on February 27, 2011, 04:54:53 AM
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

Stefan Pendl

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