I m working on a problem since last 3 years. But, not yet able to get out of it.
Compilation with GCC, and then linking it with the Nasm output file, using the linker ld is a mind storming problem for me. I am using using Windows7 (x86). Please suggest, which version of GCC should I use, and how to do all the compilation steps using the GCC and NASM and then how to link them. Please also suggest the code along with all the files, so that my problem get solved...
1. Which version of GCC should I use on Windows7
2. How to compile with GCC
3. How to assemble with NASM
4. How to link them using ld
I searched a lot of websites, but still......
So, Please help me in solving my Problem
Compiling with GCC on Windows7
- harmanjeet
- Posts: 10
- Joined: Sun Feb 06, 2011 7:03 am
- Location: India
- Contact:
Re: Compiling with GCC on Windows7
Hi,
I think all of your questions are answered in GCC Cross-Compiler (and use the version of NASM which you can select when installing Cygwin). Just also use the ELF output format with NASM and you can use ld to link. Works for me.
Cheers,
Adam
I think all of your questions are answered in GCC Cross-Compiler (and use the version of NASM which you can select when installing Cygwin). Just also use the ELF output format with NASM and you can use ld to link. Works for me.
Cheers,
Adam
- harmanjeet
- Posts: 10
- Joined: Sun Feb 06, 2011 7:03 am
- Location: India
- Contact:
Re: Compiling with GCC on Windows7
Can u send me whole code, along with the compilation instructions...
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Compiling with GCC on Windows7
The link was already posted.
- harmanjeet
- Posts: 10
- Joined: Sun Feb 06, 2011 7:03 am
- Location: India
- Contact:
Re: Compiling with GCC on Windows7
But, that does not tell the compilation code and abt the linker and the linker script
For a beginner, its a great problem. Hope u understand.
Actually, i want to have the [ gcc code for PMode + nasm code + linker script ] and Compilation code for windows7
So that I would be able to load my C++ kernel afterwards..
For a beginner, its a great problem. Hope u understand.
Actually, i want to have the [ gcc code for PMode + nasm code + linker script ] and Compilation code for windows7
So that I would be able to load my C++ kernel afterwards..
-
- Member
- Posts: 255
- Joined: Tue Jun 15, 2010 9:27 am
- Location: Flyover State, United States
- Contact:
Re: Compiling with GCC on Windows7
C++ Bare Bones
Please learn to search the Wiki. If you're a beginner it's doubly so important as it will keep you from asking questions that have already been answered multiple times.
Please learn to search the Wiki. If you're a beginner it's doubly so important as it will keep you from asking questions that have already been answered multiple times.
Re: Compiling with GCC on Windows7
Hello,
I have been successful in using GCC on Windows 7 x64 via Cygwin on both my development computer and my autobuild server.
It is quite simple to set up. If you have cygwin installed I can send you the built binaries assuming you have an email inbox large enough, but it is an old version GCC 3.2?? NASM latest.
In fact, if you give me a week, i'll have the redistributable toolchain on my server so people can just download and run.
Give us some time and goto http://www.love2code.org
Basically gcc and any cygwin app is able directly be called within Windows as long as the command line knows the path (which can be set under control panel) and the cygwin dll is present (as far as I know). I'll run some tests and get back to you.
BobbyJo
I have been successful in using GCC on Windows 7 x64 via Cygwin on both my development computer and my autobuild server.
It is quite simple to set up. If you have cygwin installed I can send you the built binaries assuming you have an email inbox large enough, but it is an old version GCC 3.2?? NASM latest.
In fact, if you give me a week, i'll have the redistributable toolchain on my server so people can just download and run.
Give us some time and goto http://www.love2code.org
Basically gcc and any cygwin app is able directly be called within Windows as long as the command line knows the path (which can be set under control panel) and the cygwin dll is present (as far as I know). I'll run some tests and get back to you.
BobbyJo
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Compiling with GCC on Windows7
Cygwin binaries have a tendency to be host-specific - they may not work on other systems (read: dll hell and dependencies on specific cygwin versions). Besides, running the crosscompiler tutorial is a good check if OS development is within that person's power.
- harmanjeet
- Posts: 10
- Joined: Sun Feb 06, 2011 7:03 am
- Location: India
- Contact:
Re: Compiling with GCC on Windows7
Thanx to all of you, for your efforts and help. I will try to implement what you said or guided. I will re-read the documentation again so as to correct my errors...!!