[Dev-C++] making a binary image using gcc or g++
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
From: Ben M. <ili...@at...> - 2008-07-18 02:03:24
|
I am trying to write a small OS kernel, and i need binary output for that. So, why don't you start your request by telling exactly what you need a your binary file for? Are you trying to write a BIOS for your computer? /pwm On Wed, 16 Jul 2008, Ben Melikant wrote: > > Hello everybody. I am trying to use MinGW to make a flat binary image, > > but am unsure how to do it. I tried to compile using the following > > commands: > > > > gcc -c program.c > > ld program.o -o program.bin --oformat=binary --Ttext=0x0 > > > > this told me that I could not perform PE operations on non-PE file > > program.bin. I also tried this: > > > > gcc -c program.c > > ld -o test.bin -Ttext 0x0 -e _main test.o > > > > This gave me the error: > > Undefined reference to _alloca > > Undefined reference to __main > > > > How do i specify the command line options to make the binary image? > > Also, if i cant use gcc, how can i use g++ to make the binary image? > > > > > > ------------------------------------------------------------------------- > > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > > Build the coolest Linux based applications with Moblin SDK & win great prizes > > Grand prize is a trip for two to an Open Source event anywhere in the world > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > _______________________________________________ > > Dev-cpp-users mailing list > > Dev...@li... > > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > |