Code::Blocks - DC Dev R1 *refixed*

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
User avatar
emptythought
DC Developer
DC Developer
Posts: 2015
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Wed Jan 30, 2002 9:14 am
Location: UNITED STATES NRN
Has thanked: 0
Been thanked: 0
Contact:

Re: Code::Blocks - DC Dev R1 *fixed*

Post by emptythought »

User avatar
Neoblast
DC Developer
DC Developer
Posts: 314
Joined: Sat Dec 01, 2007 8:51 am
Has thanked: 3 times
Been thanked: 1 time

Re: Code::Blocks - DC Dev R1 *fixed*

Post by Neoblast »

Thanks.
Now I'm trying to compile some DC SDL project and I get all of these errors ( I'm using KOS as it is on ISO R3 ( windows )configured to compile with codeblocks (manconf.zip))

Code: Select all

-------------- Build: default in lol ---------------

Compiling: ..\DcDev\Tuto\supertux_src\intro.c
Compiling: ..\DcDev\Tuto\supertux_src\screen.c
Compiling: ..\DcDev\Tuto\supertux_src\setup.c
Compiling: ..\DcDev\Tuto\supertux_src\sound.c
Compiling: ..\DcDev\Tuto\supertux_src\supertux.c
Compiling: ..\DcDev\Tuto\supertux_src\title.c
Compiling: ..\DcDev\Tuto\supertux_src\gameloop.c
Linking console executable: lol.elf
.objs\DcDev\Tuto\supertux_src\intro.o(.text+0x244): In function `intro':
C:\DcDev\Tuto\supertux_src/intro.c:179: undefined reference to `_SDL_PollEvent'
.objs\DcDev\Tuto\supertux_src\intro.o(.text+0x264):C:\DcDev\Tuto\supertux_src/intro.c:179: undefined reference to `_SDL_UpdateRect'
.objs\DcDev\Tuto\supertux_src\intro.o(.text+0x458):C:\DcDev\Tuto\supertux_src/intro.c:268: undefined reference to
 `_SDL_UpdateRect'
.objs\DcDev\Tuto\
supertux_src\intro.o(.text
+0x46c):C:\DcDev\Tuto\supertux_src/intro.c:268: undefined reference to `_SDL_UpperBlit'
.objs\DcDev\Tuto\supertux_src\intro.o(.text+0x5bc):C:\DcDev\Tuto\supertux_src/intro.c:332: undefined reference to `_SDL_UpdateRect'
.objs\DcDev\Tuto\supertux_src\intro.o(.text+0x5c0):C:\DcDev\Tuto\supertux_src/intro.c:332: undefined reference to `_SDL_Delay'
.objs\DcDev\Tuto\supertux_src\intro.o(.text+0x5c4):C:\DcDev\Tuto\supertux_src/intro.c:332: undefined reference to `_SDL_FreeSurface'
.objs\DcDev\Tuto\supertux_src\screen.o(.text+0x34): In function `clearscreen':
C:\DcDev\Tuto\supertux_src/screen.c:54: undefined reference to `_SDL_MapRGB'
.objs\DcDev\Tuto\supertux_src\screen.o(.text+0x38):C:\DcDev\Tuto\supertux_src/screen.c:54: undefined reference to `_SDL_FillRect'
.objs\DcDev\Tuto\supertux_src\screen.o(.text+0x68): In function `updatescreen':
C:\DcDev\Tuto\supertux_src/screen.c:62: undefined reference to `_SDL_UpdateRect'
.objs\DcDev\Tuto\supertux_src\screen.o(.text+0xb8): In function `load_image':
C:\DcDev\Tuto\supertux_src/screen.c:88: undefined reference to `_IMG_Load'
.objs\DcDev\Tuto\supertux_src\screen.o(.text+0xc8):C:\DcDev\Tuto\supertux_src/screen.c:88: undefined reference to `_SDL_SetAlpha'
.objs\DcDev\Tuto\supertux_src\screen.o(.text+0x100): In function `load_and_display_image':
C:\DcDev\Tuto\supertux_src/screen.c:46: undefined reference to `_SDL_UpperBlit'
.objs\DcDev\Tuto\supertux_src\screen.o(.text+0x108):C:\DcDev\Tuto\supertux_src/screen.c:46: undefined reference to `_SDL_FreeSurface'
.objs\DcDev\Tuto\supertux_src\screen.o(.text+0x178): In function `drawimage':
C:\DcDev\Tuto\supertux_src/screen.c:106: undefined reference to `_SDL_UpperBlit'
.objs\DcDev\Tuto\supertux_src\screen.o(.text+0x180):C:\DcDev\Tuto\supertux_src/screen.c:106: undefined reference to `_SDL_UpdateRect'
.objs\DcDev\Tuto\supertux_src\screen.o(.text+0x200): In function `drawpart':
C:\DcDev\Tuto\supertux_src/screen.c:129: undefined reference to `_SDL_UpperBlit'
.objs\DcDev\Tuto\supertux_src\screen.o(.text+0x208):C:\DcDev\Tuto\supertux_src/screen.c:129: undefined reference to `_SDL_UpdateRect'
.objs\DcDev\Tuto\supertux_src\screen.o(.text+0x370): In function `drawtext':
C:\DcDev\Tuto\supertux_src/screen.c:227: undefined reference to `_SDL_UpperBlit'
.objs\DcDev\Tuto\supertux_src\screen.o(.text+0x380):C:\DcDev\Tuto\supertux_src/screen.c:227: undefined reference to `_SDL_UpdateRect'
.objs\DcDev\Tuto\supertux_src\screen.o(.text+0x454): In function `erasetext':
C:\DcDev\Tuto\supertux_src/screen.c:257: undefined reference to `_SDL_UpperBlit'
.objs\DcDev\Tuto\supertux_src\screen.o(.text+0x45c):C:\DcDev\Tuto\supertux_src/screen.c:257: undefined reference to `_SDL_UpdateRect'
.objs\DcDev\Tuto\supertux_src\setup.o(.text+0x14): In function `st_shutdown':
C:\DcDev\Tuto\supertux_src/setup.c:222: undefined reference to `_SDL_Quit'
.objs\DcDev\Tuto\supertux_src\setup.o(.text+0xbc): In function `seticon':
C:\DcDev\Tuto\supertux_src/setup.c:273: undefined reference to `_IMG_Load'
.objs\DcDev\Tuto\supertux_src\setup.o(.text+0xc8):C:\DcDev\Tuto\supertux_src/setup.c:273: undefined reference to `_SDL_GetError'
.objs\DcDev\Tuto\supertux_src\setup.o(.text+0xe4):C:\DcDev\Tuto\supertux_src/setup.c:273: undefined reference to `_SDL_FreeSurface'
.objs\DcDev\Tuto\supertux_src\setup.o(.text+0x228): In function `st_setup':
C:\DcDev\Tuto\supertux_src/setup.c:214: undefined reference to `_SDL_GetTicks'
.objs\DcDev\Tuto\supertux_src\setup.o(.text+0x22c):C:\DcDev\Tuto\supertux_src/setup.c:214: undefined reference to `_SDL_Init'
.objs\DcDev\Tuto\supertux_src\setup.o(.text+0x238):C:\DcDev\Tuto\supertux_src/setup.c:214: undefined reference to `_SDL_GetError'
.objs\DcDev\Tuto\supertux_src\setup.o(.text+0x24c):C:\DcDev\Tuto\supertux_src/setup.c:214: undefined reference to `_Mix_OpenAudio'
.objs\DcDev\Tuto\supertux_src\setup.o(.text+0x25c):C:\DcDev\Tuto\supertux_src/setup.c:214: undefined reference to `_SDL_SetVideoMode'
.objs\DcDev\Tuto\supertux_src\setup.o(.text+0x2a0):C:\DcDev\Tuto\supertux_src/setup.c:214: undefined reference to `_SDL_WM_SetCaption'
.objs\DcDev\Tuto\supertux_src\sound.o(.text+0x48): In function `load_sound':
C:\DcDev\Tuto\supertux_src/sound.c:55: undefined reference to `_SDL_RWFromFile'
.objs\DcDev\Tuto\supertux_src\sound.o(.text+0x50):C:\DcDev\Tuto\supertux_src/sound.c:55: undefined reference to `_Mix_LoadWAV_RW'
.objs\DcDev\Tuto\supertux_src\sound.o(.text+0x78): In function `playsound':
C:\DcDev\Tuto\supertux_src/sound.c:63: undefined reference to `_Mix_PlayChannelTimed'
.objs\DcDev\Tuto\supertux_src\sound.o(.text+0xb8): In function `load_song':
C:\DcDev\Tuto\supertux_src/sound.c:83: undefined reference to `_Mix_LoadMUS'
.objs\DcDev\Tuto\supertux_src\supertux.o(.data+0x0): In function `vmu_lcd_update':
C:\DcDev\Tuto\supertux_src
/supertux.c:47: 
undefined reference to 
`_romdisk'
.objs\DcDev\Tuto\supertux_src\title.o(.text+0x148): In function `title':
C:\DcDev\Tuto\supertux_src/title.c:149: undefined 
reference
 to `_SDL_PollEvent'
.objs\DcDev\Tuto\supertux_src\title.o(.text+0x158):C:\DcDev\Tuto\supertux_src/title.c:149: undefined reference to `_SDL_Delay'
.objs\DcDev\Tuto\supertux_src\title.o(.text+0x15c):C:\DcDev\Tuto\supertux_src/title.c:149: undefined reference to `_SDL_FreeSurface'
.objs\DcDev\Tuto\supertux_src\gameloop.o(.text+0xb60): In function `loadlevel':
C:\DcDev\Tuto\supertux_src/gameloop.c:2278: undefined reference to `_SDL_Flip'
.objs\DcDev\Tuto\supertux_src\gameloop.o(.text+0xb68):C:\DcDev\Tuto\supertux_src/gameloop.c:2278: undefined reference to `_SDL_Delay'
.objs\DcDev\Tuto\supertux_src\gameloop.o(.text+0xcb8): In function `unloadlevelgfx':
C:\DcDev\Tuto\supertux_src/gameloop.c:2345: undefined reference to `_SDL_FreeSurface'
.objs\DcDev\Tuto\supertux_src\gameloop.o(.text+0xcec): In function `unloadlevelsong':
C:\DcDev\Tuto\supertux_src/gameloop.c:2358: undefined reference to `_Mix_FreeMusic'
.objs\DcDev\Tuto\supertux_src\gameloop.o(.text+0x139c): In function `unloadshared':
C:\DcDev\Tuto\supertux_src/gameloop.c:2760: undefined reference to `_SDL_FreeSurface'
.objs\DcDev\Tuto\supertux_src\gameloop.o(.text+0x1438):C:\DcDev\Tuto\supertux_src/gameloop.c:2760: undefined reference to `_Mix_FreeChunk'
.objs\DcDev\Tuto\supertux_src\gameloop.o(.text+0x1a7c): In function `gameloop':
C:\DcDev\Tuto\supertux_src/gameloop.c:440: undefined reference to `_SDL_GetTicks'
.objs\DcDev\Tuto\supertux_src\gameloop.o(.text+0x1a9c):C:\DcDev\Tuto\supertux_src/gameloop.c:440: undefined reference to `_SDL_PollEvent'
.objs\DcDev\Tuto\supertux_src\gameloop.o(.text+0x1e0c):C:\DcDev\Tuto\supertux_src/gameloop.c:594: undefined reference to `_Mix_PlayingMusic'
.objs\DcDev\Tuto\supertux_src\gameloop.o(.text+0x1e10):C:\DcDev\Tuto\supertux_src/gameloop.c:594: undefined reference to `_Mix_HaltMusic'
Process terminated with status 1 (0 minutes, 10 seconds)
50 errors, 0 warnings
 
Any idea on how to solve that? I placed the chui precompiled SDL on the addons folder becuase before i got a not found error with sdl mixer and sdl image headers
User avatar
emptythought
DC Developer
DC Developer
Posts: 2015
Joined: Wed Jan 30, 2002 9:14 am
Location: UNITED STATES NRN
Has thanked: 0
Been thanked: 0
Contact:

Re: Code::Blocks - DC Dev R1 *fixed*

Post by emptythought »

Any idea on how to solve that?
I can't remember exactly. I had to move the headers around and fix the font library. The CodeBlocks installer has them fixed so you can copy KOS from there.
User avatar
Neoblast
DC Developer
DC Developer
Posts: 314
Joined: Sat Dec 01, 2007 8:51 am
Has thanked: 3 times
Been thanked: 1 time

Re: Code::Blocks - DC Dev R1 *fixed*

Post by Neoblast »

I used the one in codeblocks R1 this time and the same error appears, seems to be not fixed completely, and by adding the precompiled libraries on the chui's site I get less errors but still a few ( 27 undefined reference errors ).
Darn it's a bit complicated to get the compiler and libs working... the only ones I need are the ones with KOS and SDL...
Would you mind taking a look at it, please?
Thanks in advance ( I'll give you credit on my project's credits LOL )
User avatar
emptythought
DC Developer
DC Developer
Posts: 2015
Joined: Wed Jan 30, 2002 9:14 am
Location: UNITED STATES NRN
Has thanked: 0
Been thanked: 0
Contact:

Re: Code::Blocks - DC Dev R1 *fixed*

Post by emptythought »

Attach the source you're trying to compile and I'll see what I can do. No promises though.
User avatar
Neoblast
DC Developer
DC Developer
Posts: 314
Joined: Sat Dec 01, 2007 8:51 am
Has thanked: 3 times
Been thanked: 1 time

Re: Code::Blocks - DC Dev R1 *fixed*

Post by Neoblast »

Okey thanks.
User avatar
emptythought
DC Developer
DC Developer
Posts: 2015
Joined: Wed Jan 30, 2002 9:14 am
Location: UNITED STATES NRN
Has thanked: 0
Been thanked: 0
Contact:

Re: Code::Blocks - DC Dev R1 *fixed*

Post by emptythought »

Sorry, I'm pretty busy with other things right now. Hopefully someone else can help you out. :|
User avatar
Neoblast
DC Developer
DC Developer
Posts: 314
Joined: Sat Dec 01, 2007 8:51 am
Has thanked: 3 times
Been thanked: 1 time

Re: Code::Blocks - DC Dev R1 *fixed*

Post by Neoblast »

Dude what SO are you using?
My friend tried to install this too and he got the same error as me...
Maybe you should check that out seriously.
We're using WinXP SP2 by the way.
And the error is the "default.conf" not found, even when opening and closing codeblocks...
User avatar
emptythought
DC Developer
DC Developer
Posts: 2015
Joined: Wed Jan 30, 2002 9:14 am
Location: UNITED STATES NRN
Has thanked: 0
Been thanked: 0
Contact:

Re: Code::Blocks - DC Dev R1 *fixed*

Post by emptythought »

OK, give this a try. It only works for the installer. It it fixes the problem I'll update the dep one.
User avatar
Neoblast
DC Developer
DC Developer
Posts: 314
Joined: Sat Dec 01, 2007 8:51 am
Has thanked: 3 times
Been thanked: 1 time

Re: Code::Blocks - DC Dev R1 *fixed*

Post by Neoblast »

default.conf not found please open... bla bla bla.
Still the same bug, tell the configure to look for it in the documents and settings/user/program data/codeblocks

in our case as we're using spanish winXp it would be "documents and settings/user/datos de programa/codeblocks"

or even better, make it in a way every user has to search the default.conf manually so no language issues

EDIT: I appreciate everything you're doing for the scene and dc community thanks, as soon as I get it right with the installer (I did it manually but there are some weird issues in doing it that way ) I'll give feedback.
User avatar
emptythought
DC Developer
DC Developer
Posts: 2015
Joined: Wed Jan 30, 2002 9:14 am
Location: UNITED STATES NRN
Has thanked: 0
Been thanked: 0
Contact:

Re: Code::Blocks - DC Dev R1 *fixed*

Post by emptythought »

OK, that's the problem. I'll let you select it too. Thanks for the bug report!

EDIT: Here's the fix. Let me know if it works for you.
User avatar
emptythought
DC Developer
DC Developer
Posts: 2015
Joined: Wed Jan 30, 2002 9:14 am
Location: UNITED STATES NRN
Has thanked: 0
Been thanked: 0
Contact:

Re: Code::Blocks - DC Dev R1 *fixed*

Post by emptythought »

I did it manually but there are some weird issues in doing it that way
Anything that I can adjust?
User avatar
emptythought
DC Developer
DC Developer
Posts: 2015
Joined: Wed Jan 30, 2002 9:14 am
Location: UNITED STATES NRN
Has thanked: 0
Been thanked: 0
Contact:

Re: Code::Blocks - DC Dev R1 *refixed*

Post by emptythought »

Updated the installer and cbdc_dep.zip with the bugfixed configurator.
User avatar
Neoblast
DC Developer
DC Developer
Posts: 314
Joined: Sat Dec 01, 2007 8:51 am
Has thanked: 3 times
Been thanked: 1 time

Re: Code::Blocks - DC Dev R1 *refixed*

Post by Neoblast »

have you updated both the installer and manual configure?
Great, I'll test it as soon as I get back home, thanks

EDIT: Well there appears to be some odd problems when trying to compile things if they have SDL(most of them "undefined reference" even if they are on their place and compiled, even when using chui's precompiled pack maybe adding some linker/compiler commands or anything?
Strapping Scherzo
DC Developer
DC Developer
Posts: 2285
Joined: Fri Feb 21, 2003 7:37 am
Location: Chicago, IL
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Code::Blocks - DC Dev R1 *refixed*

Post by Strapping Scherzo »

So I can use this CB setup without installing the DC Dev ISO? Is there any benefit for me to first install the ISO then integrating this on top on of it?

EDIT: So I decided to try it with just CB. I'm getting the following link errors for the skeleton "Hello World" app:

Crap, the "Copy Contents to Clipboard" feature of the build output tab isn't working at all. Basically, it can't find:

entry symbol to start
references to _arch_real_exit, _arch_old_stack and other similar symbols.

ANOTHER EDIT :) : Nevermind, I'm installing the latest DC Dev ISO right now. I'll figure it out.

Thanks for putting this together fackue. Sure beats doing everything from scratch.

YET ANOTHER EDIT: OK, so I use the (dependent) compiler in code blocks and I'm still getting the missing startup objects.
Image
User avatar
emptythought
DC Developer
DC Developer
Posts: 2015
Joined: Wed Jan 30, 2002 9:14 am
Location: UNITED STATES NRN
Has thanked: 0
Been thanked: 0
Contact:

Re: Code::Blocks - DC Dev R1 *refixed*

Post by emptythought »

Strapping Scherzo wrote:So I can use this CB setup without installing the DC Dev ISO?
Yes!
Is there any benefit for me to first install the ISO then integrating this on top on of it?
OK, the latest ISO doesn't have some SDL libs compiled so that could cause a problem.

Also if you need to convert a .bin file to .o, the independent installer will only work with romdisks (more precisely doesn't work with for example: the PNG example with wfont.bin). It won't really work with the dependent config either as wfont.bin will still need to be converted to a .o. It will compile if you compile the PNG example in the ISO then in CodeBlocks because wfont.bin is converted.

Offtopic: Maybe someone can fix that? The program used to convert .bin to .o has something "hardcoded" for romdisks only. I took a look at it (.o) and one from Cygwin and they didn't have the same symbol format. Source is here (Bin2ODC) if interested.

EDIT: Easier than I thought. I created a wrapper to do this. See attached post.

Usage:
In: wfont.bin
Out: wfont.o
Symbol: wfont

The CB installer doesn't have the arm compiler. I haven't figured out if you can compile assembly in CB yet.
EDIT: So I decided to try it with just CB. I'm getting the following link errors for the skeleton "Hello World" app:

Crap, the "Copy Contents to Clipboard" feature of the build output tab isn't working at all. Basically, it can't find:

entry symbol to start
references to _arch_real_exit, _arch_old_stack and other similar symbols.
OK, it's been so long since I've touched C. Are you using the project file? I supplied a project file for all the examples that compiled in the independent installer. Make sure the DC compiler is used in the compiler options. It could be something simple like unreferenced startup.o, or missing main{}. Like I said, it's been awhile.
Thanks for putting this together fackue. Sure beats doing everything from scratch.
I agree. I did this more for myself if anything.
Attachments
bin2o.7z
(556.94 KiB) Downloaded 121 times
Last edited by emptythought on Sun Feb 10, 2008 3:44 am, edited 1 time in total.
User avatar
UndeadDC
Insane DCEmu
Insane DCEmu
Posts: 110
Joined: Thu Aug 11, 2005 9:26 pm
Has thanked: 4 times
Been thanked: 0

Re: Code::Blocks - DC Dev R1 *refixed*

Post by UndeadDC »

I'm having trouble getting the parallax examples to compile. I get errors like "undefined reference to '_arch_real_exit'" for most things and some things wont even compile. In the raster_melt demo the linker can't find the romdisk.o file. Would you care to take a look? I'm guessing some of the project configurations are off for the parallax libs, but I'm not sure how to fix it. I always have trouble with the parallax examples for some reason. Thanks for everything.
User avatar
emptythought
DC Developer
DC Developer
Posts: 2015
Joined: Wed Jan 30, 2002 9:14 am
Location: UNITED STATES NRN
Has thanked: 0
Been thanked: 0
Contact:

Re: Code::Blocks - DC Dev R1 *refixed*

Post by emptythought »

I'm working on a new version and hopefully the new version will have Dreamcast debugging working and the new MinGW toolchain.

Anyway, the main reason why I'm posting is because the later subversions of CodeBlocks changed something and broke my configurator a little. If anybody gets "ld.exe: warning cannot find entry symbol start; defaulting to 000000008c010000" then add "C:\Program Files\CodeBlocks\dc\kos\kos\kernel\arch\dreamcast\kernel\startup.o" (with quotes) to "Link object files to console executable" in the "Advanced compiler options." Should look this this:

Code: Select all

$linker $libdirs -o $exe_output "C:\Program Files\CodeBlocks\dc\kos\kos\kernel\arch\dreamcast\kernel\startup.o" $link_objects $link_resobjects $link_options $libs
8-)
User avatar
emptythought
DC Developer
DC Developer
Posts: 2015
Joined: Wed Jan 30, 2002 9:14 am
Location: UNITED STATES NRN
Has thanked: 0
Been thanked: 0
Contact:

Re: Code::Blocks - DC Dev R1 *refixed*

Post by emptythought »

EDIT: Wrong thread
User avatar
emptythought
DC Developer
DC Developer
Posts: 2015
Joined: Wed Jan 30, 2002 9:14 am
Location: UNITED STATES NRN
Has thanked: 0
Been thanked: 0
Contact:

Re: Code::Blocks - DC Dev R1 *refixed*

Post by emptythought »

The official release of Code::Blocks has finally been released.

It looks like they're changing the version scheme and resorting to Ubuntu's versioning scheme (y.mm).

http://www.codeblocks.org/
Post Reply