getting the value of a c function in shell script

Let say there is a module fileselection module written in c language which returns the file name. Is it possible to get the file name from the file selection module directly, I mean can we call a c function directly in shell script without doing executable. If possible then how it can be implemented. If there is any other way to implement the same thing then please let me know. Let me make more clear. consider a shell script fileimport and c function fileselection module. This file selection module returns a file name. i want this file name in my script. how is it possible?

Without a main() in C you cannot have an entry point and an executable. Of course if you wrap your module inside a main it will do the trick :stuck_out_tongue:

Btw in Windows we do have DLLs where we can call modules directly as required from other applications...how it goes in Unix...any thoughts on this?

rishi