Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

XPCE Prolog command causing error in VS2008 C++

XPCE Prolog command causing error in VS2008 C++

XPCE Prolog command causing error in VS2008 C++


Upon loading into a C++ program a Prolog program that contains the command 'send' (xpce graphics), I get error messages of type:

Syntax Error: Operator Expected.

Here is an example command that causes the errors:

send( Dialog, append, button(continue, message(@prolog, clear_my_blackboard)) ),

I used to get the same errors when I used the plld.exe utility for interfacing my C++ and Prolog programs. At the time, I thought the problem was that plld was for some reason incompatible with xpce graphics.

But now that I consult (load) my Prolog source files into my C++ files using:

PlCall( "consult(myPrologFile.pl)" );

I still get these error messages. I could comment out the lines that contain xpce-specific commands, but I'd rather know what the problem is and how I can circumnavigate it. So, I would appreciate any help.


RE: XPCE Prolog command causing error in VS2008 C++


@ is apparently unknown!

It is loaded by the 'rc' file in the SWI home dir and realizes the XPCE binding. I should load this by hand, using:

consult( swi( 'plwin.rc' ) )

All my pl and xpce source files were compiled successfully.

I am interfacing C++ and Prolog to connect a cognitive architecture written in Prolog to a robotic simulator written in C++. I am using SWI version 5.8.0 so I had to use the following line in my C++ program to achieve that:

PlCall( "consult( swi( 'plwin.rc' ) )" );

This command resulted in:

swi(plwin.rc) compiled into link_xpce

Thanks to Jan Wielemaker.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close