Problem with SGDK via command line
Moderator: Stef
Problem with SGDK via command line
Hello. Im new to mega drive dev.
Im sure its something simple but im getting errors when following these steps in the SGDK command line tutorial
http://code.google.com/p/sgdk/wiki/HowToUseSGDK
Heres a screenshot of the command window to make things easier, 'compile the library command' and 'compile project command' are outlined in red for readability.
http://i50.tinypic.com/23mv6dw.png
Im thinking its to do with the warning in the wiki:
"Be careful, if you have another GCC installation you can have some conflicts when cc1 command will be called... " I did have codeblocks and codelite installed before trying (wanted to use command line though), i uninstalled to see if that made a difference but it didnt. Environment variables are set up correctly.
Any advice would help. Thank you.
EDIT: Problem is the same on my laptop. Both PC's run Windows 7 64bit...
Im sure its something simple but im getting errors when following these steps in the SGDK command line tutorial
http://code.google.com/p/sgdk/wiki/HowToUseSGDK
Heres a screenshot of the command window to make things easier, 'compile the library command' and 'compile project command' are outlined in red for readability.
http://i50.tinypic.com/23mv6dw.png
Im thinking its to do with the warning in the wiki:
"Be careful, if you have another GCC installation you can have some conflicts when cc1 command will be called... " I did have codeblocks and codelite installed before trying (wanted to use command line though), i uninstalled to see if that made a difference but it didnt. Environment variables are set up correctly.
Any advice would help. Thank you.
EDIT: Problem is the same on my laptop. Both PC's run Windows 7 64bit...
-
- Very interested
- Posts: 158
- Joined: Sat May 12, 2012 7:37 pm
- Location: Ukraine
-
- Very interested
- Posts: 158
- Joined: Sat May 12, 2012 7:37 pm
- Location: Ukraine
-
- Very interested
- Posts: 158
- Joined: Sat May 12, 2012 7:37 pm
- Location: Ukraine
-
- Very interested
- Posts: 158
- Joined: Sat May 12, 2012 7:37 pm
- Location: Ukraine
-
- Very interested
- Posts: 158
- Joined: Sat May 12, 2012 7:37 pm
- Location: Ukraine
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
Thanks guys its all working now.
So the problem was in fact the placement of the directory in the path variable at the end. So placing at the front solved the conflict. A note in the tutorial about this may help others. Also if putting it at the front causes problems with other programs now, it might be a good idea to suggest in the tutorial alternatively temporarily setting the path variable for the opened cmd window.
Thanks.
So the problem was in fact the placement of the directory in the path variable at the end. So placing at the front solved the conflict. A note in the tutorial about this may help others. Also if putting it at the front causes problems with other programs now, it might be a good idea to suggest in the tutorial alternatively temporarily setting the path variable for the opened cmd window.
Thanks.
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
I have enough cross-compilers on my system that I now never put the compiler bin path in the path envvar. Instead, I write the makefiles to use the proper path to the appropriate cross-compiler. It's less hassle that way. A makefile would typically start like this (for the 32X)
That allows me to have an envvar with a path, or to use a set path. In either case, I don't use the system PATH envvar.
Code: Select all
ifdef $(GENDEV)
ROOTDIR = $(GENDEV)
else
ROOTDIR = /opt/toolchains/sega
endif
LDSCRIPTSDIR = $(ROOTDIR)/ldscripts
LIBPATH = -L$(ROOTDIR)/sh-elf/lib -L$(ROOTDIR)/sh-elf/lib/gcc/sh-elf/4.6.2 -L$(ROOTDIR)/sh-elf/sh-elf/lib
INCPATH = -I. -I$(ROOTDIR)/sh-elf/include -I$(ROOTDIR)/sh-elf/sh-elf/include