How to get Cygwin compiled app to run in windows.

This is a discussion on How to get Cygwin compiled app to run in windows. within the C Programming forums, part of the General Programming Boards category; Consider the following code: Code: #include <rap.h> int main() { CLIENT *clnt = NULL; clnt = clnt_create("192.168.1.2",300456,1,"tcp"); if(clnt==NULL) { clnt_pcreateerror("Client ...

  1. #1
    Registered User
    Join Date
    Jan 2012
    Posts
    59

    How to get Cygwin compiled app to run in windows.

    Consider the following code:

    Code:
    #include <rap.h>
    
    int main()
    {
        CLIENT *clnt = NULL;
        clnt = clnt_create("192.168.1.2",300456,1,"tcp");
        if(clnt==NULL)
        {
            clnt_pcreateerror("Client was not created!\n");
            return(1);
        }
        return(0);
    }
    This will run fine in a Cygwim terminal window but when I try to run it in the cmd.exe window (or simply double click the icon) it returns:

    : RPC: Unknown protocol

    edit: How can I read the results from the 'return' functions (1,0) in windows. Eventually I would like to use this as a library function in non Cygwin generated code.

    I apologize for asking this question a second time but I have a better understanding of the situation now.
    Last edited by evb@studioe.com; 02-15-2012 at 08:49 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can Cygwin and Windows access the same memory?
    By evb@studioe.com in forum C Programming
    Replies: 1
    Last Post: 02-15-2012, 11:18 PM
  2. Cygwin SDL windows.h
    By agent933 in forum C Programming
    Replies: 0
    Last Post: 02-09-2010, 02:04 PM
  3. Replies: 8
    Last Post: 08-01-2009, 12:07 PM
  4. Weird access to an exe compiled with windows.h
    By _izua_ in forum C++ Programming
    Replies: 8
    Last Post: 08-12-2007, 04:43 PM
  5. compiled under windows, work for mac os?
    By Shadow12345 in forum C++ Programming
    Replies: 1
    Last Post: 05-09-2002, 10:55 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21