Cygwin1.dll missing when executing * exe generated in NetBeans

1

I have a simple code in C ++ in the IDE of NetBeans 8.0.1 . I have already configured the entire Cygwin suite.

#include "stdio.h"
#include "iostream"
int main(){
    printf("hola como estas");
    return 0;
}

When compiling it within NetBeans , all very well, but when I go to the dist folder inside the project and execute the .exe , throw me this error:

1- Why is this problem given?

2- Are these exe portable or native?

I'm starting in C ++, I need to generate an exe that can run on different Windows operating systems.

    
asked by edwin Argueta 18.10.2016 в 23:24
source

1 answer

0

You already solve the error to the question that I asked previously this is the explanation:  cygwin needs a set of dll to function the .exe generated with it therefore you have to import

#import <cygwin/cygwin_dll.h> 

with it the .exe can now be executed directly from the dist folder since the necessary static libraries are packaged inside the exe. the code would be like this:

#include "stdio.h"
#include "iostream"
#import <cygwin/cygwin_dll.h>
int main(){
    printf("hola como estas");
    return 0;
}
    
answered by 20.10.2016 в 00:19