Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
154 user(s) are online (139 user(s) are browsing Forums)

Members: 1
Guests: 153

sailor, more...

Support us!

Headlines

 
  Register To Post  

Visual Studio 2005 and cross compiling to OS4
Just popping in
Just popping in


See User information
I've asked this before a while ago and while it was confirmed that someone had done it, it was never explained how.

I know somehow you can switch out which compilier Visual Studio 2005 uses to compile. I'd like to continue using the IDE interface for what I'm use to to make OS4 programs. If someone actually tells me how to do this, I will do a step-by-step write up for others to do the same. I would think the easier it was to compile OS4 programs the more would be inclined to do so.

Any help would be appreciated! Thanks!

Arthur

P.S. Please don't turn this thread into a "You shouldn't be using Visual Studio as your IDE and should be using X" thread. I'm asking a serious question.

Go to top
Re: Visual Studio 2005 and cross compiling to OS4
Just popping in
Just popping in


See User information
@LordArt

*BUMP*

I know SG2 has been able to do what I ask, but I don't know if he is still around. I PMed him, but I haven't gotten a response. Anyone know?

Thanks!

Go to top
Re: Visual Studio 2005 and cross compiling to OS4
Home away from home
Home away from home


See User information
@LordArt

I've never tried it, but in theory there are two steps. First, install an OS4 cross-compiler (see here). Next, setup your visual studio project to call gcc's make command (a quick google brought up this & this.

Go to top
Re: Visual Studio 2005 and cross compiling to OS4
Just popping in
Just popping in


See User information
@Hans

Excellent! It's a place to start at least. I figuired it was too esoteric for people to do outside the Amiga community to be googled. Silly me. :)

If/When I get it running, I'll try to post something up about it on Utility base and here (if people are interested in such things).

Thanks!

Arthur

Go to top
Re: Visual Studio 2005 and cross compiling to OS4
Not too shy to talk
Not too shy to talk


See User information
@LordArt

That would be great since my OS4_SDK doesn't work anymore...

Jerry



Defender of my A1XE-G4 / AOS4 Final Update !
Looking for a new toy ? Then try a GP2X...
Go to top
Re: Visual Studio 2005 and cross compiling to OS4
Just popping in
Just popping in


See User information
As silly as this might seem, I actually got this running finally last night. Personal time is at a premium as I'm sure it is for many of you.

Stay tuned for an official write up of how to do it...

From what I understand, one can get the remote GDB going through VS, but that's a different monster and far nastier to try...But one that may have to be tackled....

P.S. Should I do the write up on this thread or somehow submit it somewhere?

Go to top
Re: Visual Studio 2005 and cross compiling to OS4
Home away from home
Home away from home


See User information
@LordArt

Posting the writeup here would be a good start, but I'd suggest submitting it as an article on utilitybase as well. That's a site devoted to Amiga developers.

Hans

Go to top
Re: Visual Studio 2005 and cross compiling to OS4
Just popping in
Just popping in


See User information
If you ever wanted to use the Visual Studio IDE to write Amiga programs, that is what this document is about. This document uses Visual Studio 2005 as it's baseline since it has a very nice IDE, especially with plug-ins like Visual Assist (I think you can use the same directions for VS 2008 but since I don't have that I can't guarantee it).

Getting started:

-Download/acquire Visual Studio 2005. You may already have this, or you can get Visual Studio 2005 Express which is free. Install it.
-Download cygwin from http://www.cygwin.com . It will just give you a setup.exe file. Install it, and make sure you select "make" to be installed for the setup (it's under the development heading). (I'm sure gcc experts out there will have a bunch of other recommendations, but I'm use to VS not gcc, so I'm unfamiliar with all the gcc tools).
-Download the Cross compiler(s) you want from http://cross.zerohero.se . I've tried both the OS4 and OS3.x and they both work, and they can co-exist side by side. (If you are like me and like to compile on the go on your laptop, testing things out under OS3 via WinUAE can be useful!) Grab all the i686-cygwin for the compiler you want (or both) and any supporting files (including the SDK if OS4). The documentation on the particular webpage describes what you want to do with them. Install the ones you want to use, using the paths created by Cygwin that look like Unix. (ie. most of the stuff wants to be uncompressed to /usr/local which in my case is D:/cygwin/usr/local)

Configuring:
-You'll need to put the bin for the compilers in the Windows path. To do that you go to Start->Settings->Control Panel->System.
Click on the Advanced Tab and clock on Environment Variables. Find the path variable. Tack on where you installed your compiler and cygwin's bin path. (Ie. for me it is D:\cygwin\bin;D:\cygwin\usr\local\amiga\bin ) This will allow VS to call your gcc compiler.
-Open up VS, make a new project. Use Visual C++->General->Makefile Project. It will bring up a "wizard" to set certain configurations. Click "next" to go to the debug configuration. Under "Build Command line" put "make -f makefile.mak 2>&1 | sed -e 's/\(\w\+\):\([0-9]\+\):/\1(\2):/'" (Remove the double quotes, but leave the single quotes). Put the same for the rebuild. Under Clean, put "make -f makefile.mak clean". (Keep in mind that it's specifying the makefile as makefile.mak, so change that if you want it a different name)

And you are all done! You can start importing your C/C++ files into the project (and your makefile!). If you don't have a make file yet, you'll have to make one, but there is plenty on the net about that (although, honestly, I wouldn't mind a tutorial about that myself). A sample REALLY basic one would be:


CC=ppc-amigaos-gcc {This can either be m68k-amigaos-gcc or ppc-amigaos-gcc depending if you are trying for OS3.X or OS4 respectively)

CFLAGS= {compiler flags go here such as -ggdb}

CPPFLAGS = {preprocessor stuff goes here such as -D __USE_INLINE__}

objects = {your final object files, such as main.o. It assumes that if there is a main.o there is a main.c that compiles into it. This objects variable is here to make things easier}

{EXE name}: ${objects}

clean:
{tab which won't show up on a webpage}rm -f ${objects}

Here is a REAL example...take this as literal:

CC=ppc-amigaos-gcc

CFLAGS= -ggdb

CPPFLAGS = -D GOWSP

objects= GLTest.o

GLTest: ${objects}

clean:
rm -f ${objects}


A couple things to keep in mind, the debugger won't work with your new program. You'll have to use an Amiga debugger such a gdb under OS4. I heard that it is possible to setup remote GDB to work with VS, but I haven't even attempted that yet. Another thing is that while VS keeps around preprocessor information, it ends up being only for itself, and won't change your compile at all. Everything that you change MUST be in your make file. I wish VS would export the preprocessor directives in an environment variable like it does everything else, but I couldn't find it. Otherwise, it could pass it to the make file! (Perhaps someone wiser than me knows the answer).

Have fun coding!

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project