Jump to content


Click the link below to see the new game I'm developing!


Photo
- - - - -

Calling C from PROIV


5 replies to this topic

#1 si_ddharths1

si_ddharths1

    Newbie

  • Members
  • Pip
  • 9 posts
  • Gender:Male

Posted 04 October 2004 - 04:25 PM

Could anyone help me on Calling a C programme from PROIV.

Thanx.
Siddharth

#2 Richard Bassett

Richard Bassett

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 707 posts
  • Gender:Not Telling
  • Location:Rural France

Posted 04 October 2004 - 05:05 PM

For clarification: Is it a self-contained C program you want to call (ie. a separate executable) or do you want to call C functions (ie. individual subroutines, for example in a library). There's a big difference B)
Nothing's as simple as you think

#3 Joseph Bove

Joseph Bove

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 756 posts
  • Gender:Male
  • Location:Ramsey, United States

Posted 04 October 2004 - 05:08 PM

Siddharth,

There are a couple of commands that you can use:

In 4.6
#stat = SYSTEM('c program')

In 5.5
CLIENT.EXECUTE('program to run c program', 'c program')

hth,

Joseph

#4 si_ddharths1

si_ddharths1

    Newbie

  • Members
  • Pip
  • 9 posts
  • Gender:Male

Posted 05 October 2004 - 05:03 AM

-----------------------------------------------------------------------------------------------
For clarification: Is it a self-contained C program you want to call (ie. a separate executable) or do you want to call C functions (ie. individual subroutines, for example in a library). There's a big difference
------------------------------------------------------------------------------------------------

Hi Richard,
I want input on both i.e. separate executable C program as well as individual subrutines.

#5 Richard Bassett

Richard Bassett

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 707 posts
  • Gender:Not Telling
  • Location:Rural France

Posted 05 October 2004 - 11:15 AM

Siddharth,

Joseph has covered how to call a separate program.
To call C functions you need to use the LINK() statement in logic and to have linked your C code into the ProIV kernel.
See the sections entitled "Procedural Language Interface" in the ProIV Environment Guide.
There is quite a steep learning curve involved with calling C functions from ProIV if you are not already a reasonably experienced C programmer.
Nothing's as simple as you think

#6 Guest_Guest_*

Guest_Guest_*
  • Guests

Posted 05 October 2004 - 12:54 PM

Thanx i will try out the options suggested.



Reply to this topic



  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users

Click the link below to see the new game I'm developing!