Problem getting IFFT to work
I solved this by using a different FFT implementation, one that is using a mixed radix algorithm under the hood ( the project is avalaible here https://github.com/itdaniher/kissfft ). The KissFFT supports both a complex as well as a real FFT so I'll post code for both. The real version is up to 45% faster than the complex one. Note that in order to get the original samples, the results of the IFFT have to be scaled by fft size (fft size doesn't have to be a power of 2 but for the real FFT it must be an even number). 

The complex FFT/IFFT

    #include "kiss_fft.h"
    #include "kiss_fftr.h"

        int main(int argc, char *argv[])
            {

                unsigned fs;

                QCoreApplication a(argc, argv);
                cout &lt;&lt; "opening ...";
                char *pData= OpenRawA("C:\\test\\250_350_c.raw",fs);

                const unsigned numSamples = 4096;//this doesn't have to be a power of 2
                float* Rx = (float*)pData;


                       kiss_fft_cpx *fIn = new kiss_fft_cpx[numSamples];
                       kiss_fft_cpx *fOut = new kiss_fft_cpx[numSamples] ;
                       kiss_fft_cpx *fIfft = new kiss_fft_cpx[numSamples];
                       //populate the (complex) input buffer
                        for(int i=0; i&lt;numSamples;i++){
                            fIn[i].r = Rx[i];
                            fIn[i].i = 0;
                        }


                        cout &lt;&lt; "original data { [20,30,40] } " &lt;&lt; fIn[20].r &lt;&lt; " " &lt;&lt; fIn[30].r &lt;&lt; " " &lt;&lt; fIn[40].r &lt;&lt;  fIn[50].r &lt;&lt; " " &lt;&lt; fIn[60].r &lt;&lt;endl;
                        kiss_fft_cfg cfg = kiss_fft_alloc( numSamples ,0 ,0,0 );//configure the FFT function to use a forward FFT

                        kiss_fft( cfg , fIn , fOut );//calculate FFT


                        cfg = kiss_fft_alloc( numSamples ,1 ,0,0 );//configure the FFT function to use an inverse FFT

                        kiss_fft( cfg , fOut , fIfft );//calculate inverse FFT

                       free(cfg);


                cout &lt;&lt; "IFFT data { [20,30,40] } " &lt;&lt; fIfft[20].r/numSamples &lt;&lt; " " &lt;&lt; fIfft[30].r/numSamples &lt;&lt; " " &lt;&lt; fIfft[40].r/numSamples &lt;&lt; " " &lt;&lt; fIfft[50].r/numSamples &lt;&lt; " " &lt;&lt; fIfft[60].r/numSamples;
//delete allocated resources
                return a.exec();
            }


The real FFT/IFFT

 int main(int argc, char *argv[])
    {

        unsigned fs;

        QCoreApplication a(argc, argv);
        cout &lt;&lt; "opening ...";
         char *pData= OpenRawA("C:\\test\\250_350_c.raw",fs);

        const unsigned numSamples = 4096;
        float* Rx = (float*)pData;

               kiss_fft_scalar *fIn = new kiss_fft_scalar[numSamples];
               kiss_fft_cpx *fOut = new kiss_fft_cpx[numSamples] ;
               kiss_fft_scalar *fIfft = new kiss_fft_scalar[numSamples];
               //populate the input buffer
                for(int i=0; i&lt;numSamples;i++){
                    fIn[i] = Rx[i];

                }
                cout &lt;&lt; "original data { [20,30,40] } " &lt;&lt; fIn[20] &lt;&lt; " " &lt;&lt; fIn[30] &lt;&lt; " " &lt;&lt; fIn[40] &lt;&lt;  fIn[50] &lt;&lt; " " &lt;&lt; fIn[60] &lt;&lt;endl;
                kiss_fftr_cfg cfg = kiss_fftr_alloc( numSamples ,0 ,0,0 );//configure the FFT function to use a forward FFT

                kiss_fftr( cfg , fIn , fOut );//calculate FFT

                cfg = kiss_fftr_alloc( numSamples ,1 ,0,0 );//configure the FFT function to use an inverse FFT

                kiss_fftri( cfg , fOut , fIfft );//calculate inverse FFT

               free(cfg);

        cout &lt;&lt; "IFFT data { [20,30,40] } " &lt;&lt; fIfft[20]/numSamples &lt;&lt; " " &lt;&lt; fIfft[30]/numSamples &lt;&lt; " " &lt;&lt; fIfft[40]/numSamples &lt;&lt; " " &lt;&lt; fIfft[50]/numSamples &lt;&lt; " " &lt;&lt; fIfft[60]/numSamples;
//delete allocated resources
        return a.exec();
    }