Arduino and AVR

Hi,
I'm writing a menu code for my oled screen (i used u8glib library) and i've uploaded my code to arduino promini(5V-16Mhz) succesfully, then i found the .cpp.hex file and i tried upload this file to a virgin atmega328p-au with atmel studio using mkii programmer but my screen is not working or freezing. i'm sure that microcontroller is ok because i uploaded the .cpp.hex file of blink succesfully. Also i know my menu code is working inside the microcontroller because my leds are giving response when i push the buttons (i mean when i push start button the led turns on and always stays open). if somebody has any idea about this please help me.

The configuration fuse settings for Arduino (set when the bootloader is burned) are different from the factory settings. I'm surprised your Blink sketch didn't run at 1/16th speed. Use the ISP to burn an Arduino bootloader onto the chip before uploading the sketch.

johnwasser:
The configuration fuse settings for Arduino (set when the bootloader is burned) are different from the factory settings. I'm surprised your Blink sketch didn't run at 1/16th speed. Use the ISP to burn an Arduino bootloader onto the chip before uploading the sketch.

The most interesting thig is that i can't upload bootloader sketch onto my arduino, i've tried optiboot or the other bootloaders and i changed fuses as 0x05, 0xDA, 0xFF but my atmega is not respondig when i try upload a sketch with arduino ide (i tried capacitor and pushin reset buttun while uploading sketch).