Steves Yaroze Page. |
Using GCC Makefiles in Having completely given up trying to use the very apptly named 'Code Warrior' (I fought all this weekend with the bloody thing (and lost!) ), I decided to use my faithfull old development tool. Don't get too excited, this won't mean instant C++ code from probably the best development tool in the world. What it will mean is that you can use the superb editing and manoverability of Developer Studio and use the 'Make/GCC' tool for seamless compiling and linking. Read on and I'll show you how. This integration is based on the presumtion that you're using NT. It shouldn't be much different if you're using 95, but I couldn't be bothered booting to it and trying it out. (let me know the outcome when you try it, and I'll post it here). The first thing to do is to set the 'DJGPP' environment variable in 'control panel/system/environment'. Obviously, change the e:/psx/psx to wherever it is on your machine, bearing in mind that the 'forward slash' is mandatory. Now... You need to set the gnu 'bin' directory in Dev Studio. Click 'tools/options/directories/executable files'. Sorry to all those who tried and failed because I was stupid enough to leave this out. Once you've done this, the next step is to open the 'Makefile' in Developer Studio. This step is easy. Select 'Open Workspace', change the file type to 'All Files' and select the 'makefile' You're then greeted with After clicking Yes, select the Win32 platform. Remember, you're only using Developer Studio for editing and navigation, so the Win32 bit is irrelevant anyway. (Don't worry about the Win32 bit) Now you've got the makefile all nicely 'wrapped up', it's time to expose the bits you'll be using developer studio for, the files. Select 'Project/Add to project/Files' from the menu. Add as many files as you like. Now we come to configuring the build bit. Select 'project/settings from the menu', and type in what you see below. The build command line specifies that we wan't to use 'make' using the default 'makefile'. The Rebuild all options say we want to use 'make clean'. Now in Developer studio, we can clean our project using 'Project/Rebuild All', and then build it using 'project/build makefile.exe'. Note that the '.exe' is not built by Developer Studio. The output files created are exactly the same as if you typed 'make' on the command line. That's it. You can now whizz around Developer Studio, using it's lovely editor and workspace windows, change, and build you're code in next to no time. Adding files to the Developer Studio Project does not reflect any changes to the original 'makefile'. If you add files to the project using Developer Studio, it's a piece of cake to open up the '.dsp' file as text (select 'File/Open', 'Open As-Text') and copy bits of the 'Source' section back into your original makefile. For instance, I've added 'anotherfile.cpp' using Developer Studio. I then opened the project file (.dsp) as text and rummidged through looking for bits to cut and paste into the makefile. Here is the section from my .dsp file
|
Sign My Guestbook
View My
Guestbook |