| 
     
      
      
      From: Gökhan S. <so...@it...> - 2016-03-16 13:55:38
      
     
   | 
Thank you for the answer. Using MSYS2 I was able to build yap 6.3.0 from
source, with some additional changes to source code.
Changes I did were:
In Regs.h, line 590,
    #define H          Yap_REGS.H_    /* top of heap (global)
stack           */
was causing compile error:
   error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘=’ token
So I refactored *#define H* with *#define HEAD*. And I changed every
occurrence of *H *with *HEAD* in all *.c and *.h files under yap-source.
(Using Notepad++ replaced every ([^\d\w'])H([^\d\w']) with \1HEAD\2).
In blob.c, compile error was caused:
    stderr undeclared (first use in this function)
So I added #include <stdio.h>
Now I am able to run it from yap.exe, it seems to work properly so far.
Regards,
Gökhan Solak
2016-03-15 3:39 GMT+02:00 Vitor Santos Costa <vs...@gm...>:
> Hi Gokhan
>
> Sorry for the delay. Thanks for your interest!
>
>  I think the problem is that 6.4.0 is very old and cygwin has changed a
> lot. Quite a lot.
>
> Right now I still have some problems with the github YAP version on
> Windows. If you want to give it a try, probably wan to install first msys2:
>
> https://msys2.github.io/
>
> That seems to have the best development environment. Thanks to cmake I was
> also able to compile YAP under VC and VisualStudio plus clang, but I
> haven't had the time to debug it so far.
>
> I have had problems with my version, but I am not sure where the problem
> comes from: YAP or WIndows 10.
>
> On Fri, Mar 11, 2016 at 1:31 PM, Gökhan Solak <so...@it...> wrote:
>
>> Hello,
>>
>> I want to define external predicates using C interface. I consulted to
>> online documentation and it seems I need to include
>> *"YAP/YAPInterface.h"* library in the C code (link
>> <http://www.dcc.fc.up.pt/~vsc/Yap/yap.html#C_002dInterface>). In online
>> documentation I found a part stating that I should create the YAP library (
>> link <http://www.dcc.fc.up.pt/~vsc/Yap/yap.html#YAPLibrary>) using
>>
>>
>>> make library
>>
>> make install_library
>>>
>>
>> So I downloaded YAP 6.3.0 source from here
>> <https://sourceforge.net/p/yap/yap-6.3/ci/6.3.0/tree/>. I tried to
>> execute the above commands using cygwin under windows 7. I have gmp and
>> readline packages installed. Gcc and all basic packages are up-to-date.
>>
>> First I executed
>>
>> ./configure
>>>
>>
>> and then
>>
>> make
>>>
>>
>> but it was failing with error:
>>
>> gcc: error: unrecognized command line option '-mno-cygwin'
>>
>>
>> same error occured on execution of
>>
>> make install_library
>>
>>
>> After some search according to an answer
>> <http://stackoverflow.com/questions/6034390/compiling-with-cython-and-mingw-produces-gcc-error-unrecognized-command-line-o/6035864#6035864>,
>> I removed 'mno-cygwin' from cygwinccompiler.py file under cygwin.
>>
>> I also removed '-mno-cygwin' argument from lines 61,62 in *Makefile *under
>> YAP folder.
>>
>> Now it tries to compile but this time it fails producing this message
>> (for both 'make' and 'make install_library' commands):
>>
>> Makefile:665: recipe for target 'agc.o' failed
>>> make: *** [agc.o] Error 1
>>>
>>
>> It produces many warnings and some errors. As I inspected some errors
>> occur due to the type definitions in *agc.c* such as *Int *and *UInt*
>> (starting with capital letters). Last portion of whole output is here
>> <http://pastebin.com/DzZwCQqA>. Whole text of Makefile is here
>> <http://pastebin.com/HhYgKEmA>.
>>
>> I tried replacing *Int* and *UInt* with *long int* and *long uint. *But
>> it caused more errors.
>>
>> Can you help me in building necessary files for yap - c interface?
>>
>> Thanks in advance,
>> Gökhan Solak
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Transform Data into Opportunity.
>> Accelerate data analysis in your applications with
>> Intel Data Analytics Acceleration Library.
>> Click to learn more.
>> http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
>> _______________________________________________
>> Yap-users mailing list
>> Yap...@li...
>> https://lists.sourceforge.net/lists/listinfo/yap-users
>>
>>
>
 |