Thread: How to get Cygwin compiled app to run in windows.

  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 [email protected]; 02-15-2012 at 08:49 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 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, 11:07 AM
  4. Weird access to an exe compiled with windows.h
    By _izua_ in forum C++ Programming
    Replies: 8
    Last Post: 08-12-2007, 03:43 PM
  5. compiled under windows, work for mac os?
    By Shadow12345 in forum C++ Programming
    Replies: 1
    Last Post: 05-09-2002, 09:55 AM