Search found 12 matches

by Rangarajan
11 Jun 2021 1:31
Forum: Visual Prolog
Topic: Need example of C function calling VIP DLL
Replies: 2
Views: 533

Re: Need example of C function calling VIP DLL

Thank you!

Regards,
Rangarajan
by Rangarajan
10 Jun 2021 9:02
Forum: Visual Prolog
Topic: Need example of C function calling VIP DLL
Replies: 2
Views: 533

Need example of C function calling VIP DLL

Hi,
In the distributed examples, the "MyDll" example exports a function of type (string) -> (string), but that is consumed by another VIP program. How do I call this from a C/C++ program?

Thanks,
Rangarajan
by Rangarajan
2 Jun 2021 3:42
Forum: Visual Prolog
Topic: Unable to use Lib file in C/C++ Project
Replies: 0
Views: 454

Unable to use Lib file in C/C++ Project

Hi, I created a 64 bit DLL and Lib of the "MyDll" project that is distributed with Examples. I then created a Visual Studio 2019 solution (command line program - x64 mode) to call the DLL function "touch". I added the MyDll.lib file as input to the Linker, giving its correct path...
by Rangarajan
30 May 2021 5:30
Forum: Visual Prolog
Topic: Parameter Passing between Prolog DLL and C Function
Replies: 1
Views: 572

Parameter Passing between Prolog DLL and C Function

Hi, I would like to understand how to pass non-primitive data types between Prolog DLL and an external C program. For example, how to pass a list of symbols, or compound structures from the DLL to an external C function (and vice versa)? Is there a way to directly make use of Prolog Foundation Class...
by Rangarajan
28 May 2021 11:43
Forum: Visual Prolog
Topic: Calling convention in C/C++ DLL
Replies: 3
Views: 565

Re: Calling convention in C/C++ DLL

Thanks a lot.

I will be careful next time about asking a single question in a post!

Regards,
Rangarajan
by Rangarajan
28 May 2021 9:21
Forum: Visual Prolog
Topic: Calling convention in C/C++ DLL
Replies: 3
Views: 565

Re: Calling convention in C/C++ DLL

My apologies! I noticed that in VIP 10, the LIB file is also generated and saved in a different directory. I missed this.

I would like your suggestion for my second question.

Regards,
Rangarajan
by Rangarajan
28 May 2021 9:17
Forum: Visual Prolog
Topic: Calling convention in C/C++ DLL
Replies: 3
Views: 565

Calling convention in C/C++ DLL

Hi, I have upgraded to VIP 10 recently. When I create a default DLL project and Build it, it generates a DLL as expected. How do I configure the project to generate the corresponding LIB file? I noticed that in the distributed example "..\dll\myDll", the LIB and DLL files are both generate...
by Rangarajan
24 May 2021 3:48
Forum: Visual Prolog
Topic: Need more video tutorials
Replies: 0
Views: 524

Need more video tutorials

Hi, I recently upgraded to VIP 10. Although I have had earlier versions of VIP, every time I start learning the software, I feel intimidated by the features, especially the type declarations, packages, etc. I feel a software like this would greatly benefit from plenty of video tutorials, and it will...
by Rangarajan
28 Jul 2019 13:45
Forum: Visual Prolog
Topic: Compiled clauses
Replies: 10
Views: 6752

Re: Compiled clauses

Hi,
I meant no offence in my post. What I asked first was a genuine question. There was no need to disguise my intentions! The follow up was just another use case for binary representation.

Regards,
Rangarajan
by Rangarajan
25 Jul 2019 11:30
Forum: Visual Prolog
Topic: Compiled clauses
Replies: 10
Views: 6752

Re: Compiled clauses

Thanks to all who have responded. I get the idea. One reason why one might want to store the facts/clauses in a binary format is to protect IP. Suppose these facts have sensitive information (e.g. business logic related data) that I don't want the end user to know, I would not want to keep it in a t...
by Rangarajan
20 Jul 2019 10:06
Forum: Visual Prolog
Topic: Compiled clauses
Replies: 10
Views: 6752

Re: Compiled clauses

Thanks Martin! Assuming I have a text file that contains just "facts" (something like your "myFact"), I would like to load them all into the program, save them in a binary format, and then when needed, load them all in one go. In your example, I see that you are saving and readin...
by Rangarajan
19 Jul 2019 12:31
Forum: Visual Prolog
Topic: Compiled clauses
Replies: 10
Views: 6752

Compiled clauses

Hi, I am new to Visual Prolog. It is going to take me a while to get used to the strong typing, etc. I have a quick question: If I have many "Clauses" files, each containing hundreds of clauses (the standard Prolog clauses), is there way to load them all and save the combined set as "...