I must admit that I am not a C expert
The compiler keeps saying no include path in which to search for ... followed by files like stdio.h and math.h
What am I doing wrong?
1: did you install at the default location namely C:\MinGW ?
2: did you run the batch file MKALLMGW.BAT ?
right-click on My Computer/properties
click on Advanced then click Environment Variables
on the system variables pane click New
on the variable name put: LIBRARY_PATH
on the variable value put: C:\MinGW\lib
also on same pane edit the variable Path and add
;C:\MinGW\bin
after you finish log off then log back in
try compiling again
I am glad you were able to make it work, when you try something new it's a bit disconcerting, in answer to your question, yes it handles big numbers,
though for some operations like divide you must specify to how many places you want the resulting operation.
jack wrote:Arctic Fox, the PB debugger does not work under this circumstances, at least it did not last I checked.
OK, thanks for the information. I am just curious to know what's wrong, as it crashes every time I run it. And when commenting out that line, it does not
if you turn off the debugger it works OK, I think ( only guessing ) the reason that PB crashes when debugger is on is because the memory was not allocated using native PB Commands.
It still crashes here, regardless whether the debugger is on or off
And by the way m_apm_free_all_mem() raises a POLINK error when compiling (if used outside the ImportC).
Perhaps my library compilation doesn't work as it should
Would you mind comparing your lib file with mine (by file size)? My lib is 111.430 bytes.
Arctic Fox, you must include the import section, if your code is to use the mapm functions, it tell PB and Polink what functions to link into your program.
are you sure the debugger is off? is the spider/bug icon highlighted or not? if highlighted then debug is on.
btw the size of my lib is 110,592 bytes
Arctic Fox, sorry I misled you, if you compile with Mingw32 there's no need to add anything M_APM.h.
if you are using Mingw32, all you need to do is run MKALLMGW.BAT and rename libmapm.a to libmapm.lib or mapm.lib and copy that to the PureBasic\PureLibraries\Windows\Libraries folder making sure you use the same name in the import section.
jack wrote:Arctic Fox, sorry I misled you, if you compile with Mingw32 there's no need to add anything M_APM.h.
That's okay mate, if it wasn't for you I hadn't got so far in this, thanks again
I recompiled the library without those two lines in M_APM.h, resulting in a library as big as yours. But your example still crashes at FreeMemory() with and without the debugger on
I don't think you can use FreeMemory on anything that isn't a memory block you previously allocated with PureBasic. Do the library docs say that you need to free the memory?