English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

 
 
Thread Tools
Old 30 September 2017, 20:38   #41
grelbfarlk
Registered User
 
Join Date: Dec 2015
Location: USA
Posts: 2,902
A lot of what I was thinking, why this would be so simple, is that a lot of old SDL programs are compiled with GCC 2.95.3, including what hopefully might come out of this the version of ScummVM 0.11.1 for OS4, but compiled for WarpOS. Maybe just maybe if we get a working shared lib for SDL someone takes up the Dosbox challenge too, or a few other interesting apps for WarpOS.

And uh the SDL TV commercials say just use SDL, simple adjustments to makefiles and the programs work, 100% money back guarantee.
grelbfarlk is offline  
Old 30 September 2017, 21:27   #42
Hedeon
Semi-Retired
 
Join Date: Mar 2012
Location: Leiden / The Netherlands
Posts: 1,993
-warpup invokes warpcollect and elf2exe2 i think.
Hedeon is offline  
Old 30 September 2017, 21:38   #43
Hedeon
Semi-Retired
 
Join Date: Mar 2012
Location: Leiden / The Netherlands
Posts: 1,993
A very simple program like:

main();
SetExcMMU();
return();

Returns with unknown symbol SetExcMMU. I guess we are missing some include or lib
Hedeon is offline  
Old 30 September 2017, 21:39   #44
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
Originally Posted by Hedeon View Post
-warpup invokes warpcollect and elf2exe2 i think.
*argh* and I was so proud of my nice workarround above
Quote:
Originally Posted by Hedeon View Post
Returns with unknown symbol SetExcMMU. I guess we are missing some include or lib
if I dont mix it again "unknown symbol" refers to missing lib or object file with function.
"unreferenced ...." is missing include or declaration.

#1) or the other way around.

Last edited by emufan; 30 September 2017 at 22:39.
emufan is offline  
Old 30 September 2017, 22:06   #45
Hedeon
Semi-Retired
 
Join Date: Mar 2012
Location: Leiden / The Netherlands
Posts: 1,993
compiling that SetExcMMU program with GCC from StormC4 with amiga603.lib works.
Hedeon is offline  
Old 30 September 2017, 22:33   #46
Hedeon
Semi-Retired
 
Join Date: Mar 2012
Location: Leiden / The Netherlands
Posts: 1,993
Was missing powerpc/powerpc_protos.h and powerpc/warpup_macros.h

Now that small program compiles correctly with GCC 2.95.3....
Hedeon is offline  
Old 01 October 2017, 00:52   #47
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
I did a 'grep -ir amiga603 *' in the stormc4 source code, and found it
only as a dependency in the project files.

so they are cheating with the gcc license, not providing everything?

even if we can build the gcc/g++ from that source, I think we need those link libs too, right?
emufan is offline  
Old 01 October 2017, 01:45   #48
grelbfarlk
Registered User
 
Join Date: Dec 2015
Location: USA
Posts: 2,902
Quote:
Originally Posted by emufan View Post
I did a 'grep -ir amiga603 *' in the stormc4 source code, and found it
only as a dependency in the project files.

so they are cheating with the gcc license, not providing everything?

even if we can build the gcc/g++ from that source, I think we need those link libs too, right?
I really should try this test file with stormc and the stormc PPC version of sdl.
Damnit-*booting up a4000*
grelbfarlk is offline  
Old 01 October 2017, 01:48   #49
Hedeon
Semi-Retired
 
Join Date: Mar 2012
Location: Leiden / The Netherlands
Posts: 1,993
I got the libSDL_wos compiled like Gerbilfark. When I link the SDL test files to it with the
-lSDL_wos parameter after the -o <targetfile> it finds the SDL functions.

However, within those SDL functions are AmigaOS calls. These functions are not compiled correctly and result in undefined symbols like AllocMem.

So I did a small program again with OpenLibrary() and compiled it with ppc-amigaos-gcc but no matter what include I add (clib/inlines/proto) I cannot do an AmigaOS call from a WarpOS program build with gcc (or g++). What am I missing?
Hedeon is offline  
Old 01 October 2017, 02:09   #50
Hedeon
Semi-Retired
 
Join Date: Mar 2012
Location: Leiden / The Netherlands
Posts: 1,993
Say what do I need to include to get something like:

int main()
{
Enable();
return(0);
}

Going for WarpOS on gcc.
Hedeon is offline  
Old 01 October 2017, 02:13   #51
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
@Hedeon: build it and look for the linker messages/errors.

@grelbfarlk: yep, give it a try, maybe it isn't that bad.
emufan is offline  
Old 01 October 2017, 02:17   #52
Hedeon
Semi-Retired
 
Join Date: Mar 2012
Location: Leiden / The Netherlands
Posts: 1,993
Quote:
Originally Posted by emufan View Post
@Hedeon: build it and look for the linker messages/errors.
The error message is 'undefined symbol: Enable' in the above example.

Somewhere needs to be defined how the PPC can context-switch to AmigaOS 68K functions...but I don't know where.

vbcc has a .lib for AmigaOS calls by the PPC, for example. StormC too.

So what does gcc need is the question...
Hedeon is offline  
Old 01 October 2017, 02:25   #53
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
Originally Posted by Hedeon View Post
The error message is 'undefined symbol: Enable' in the above example.

Somewhere needs to be defined how the PPC can context-switch to AmigaOS 68K functions...but I don't know where.

vbcc has a .lib for AmigaOS calls by the PPC, for example. StormC too.

So what does gcc need is the question...
you are the only one with that compiler, so who should know

but look what's provided in the link lib folder(s). there was a start.o and end.o in grelbfarlk toolchain.
which got added as 1st and last object in the object link chain.
maybe something like that you have there too.

and do a 'grep Enable lib/*' to find the lib which hold that function.
maybe better results with nm, ar and objdump on those link libs.

try those options with gcc/g++:
Code:
  -dumpspecs               Display all of the built in spec strings
  -dumpversion             Display the version of the compiler
  -dumpmachine             Display the compiler's target processor

Last edited by emufan; 01 October 2017 at 02:31.
emufan is offline  
Old 01 October 2017, 02:45   #54
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
while looking at the stormc4 src code (again), searching for noixemul, I found
Code:
#define SYSTEM_INCLUDE_DIR  "/gg/os-include"
#define STANDARD_INCLUDE_DIR    "/gg/include"

#define STANDARD_EXEC_PREFIX_1 "/gg/lib/gcc/"
#define STANDARD_STARTFILE_PREFIX_1 "/gg/lib/"
#define STANDARD_STARTFILE_PREFIX_2 "/gg/lib/"
in: gcc/config/m68k/xm-amigaos.h: ixemul.library which provides for this unix'ism, and for the usual

did they use gg == geekgadget's stuff? if so, we can try to build that gcc/g++ and use the
things provided with the already available link libs from grelbfarlk's toolchain.

#1) gcc/NEWS lists 2.8.1 as highest version number. not entirely sure, but is it that version of stormc4 ?

@Hedeon: what says: gcc -dumpversion ?

Last edited by emufan; 01 October 2017 at 02:54.
emufan is offline  
Old 01 October 2017, 03:51   #55
grelbfarlk
Registered User
 
Join Date: Dec 2015
Location: USA
Posts: 2,902
So what happened is that somewhere along the way I botched my ppc-amigaos-gcc install. I had compiled a few WarpOS Q2 mods about a year ago which I can't compile any more, just get those undefined symbols. Not sure what I broke and when. Comparing to my backup a year ago... that's in an even worse state.
grelbfarlk is offline  
Old 01 October 2017, 03:56   #56
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
oh, yes, I know that.
you want build something usefull, but instead you have to fight with the tools.
that's sort of frustrating ...
emufan is offline  
Old 01 October 2017, 04:05   #57
grelbfarlk
Registered User
 
Join Date: Dec 2015
Location: USA
Posts: 2,902
Quote:
Originally Posted by emufan View Post
oh, yes, I know that.
you want build something usefull, but instead you have to fight with the tools.
that's sort of frustrating ...
Yeah, actually I feel terrible about it since I recruited some smart people who I tempted into working on WarpOS project with a working build environment.... I can only imagine what an effing idiot they think I am (justifiably).
grelbfarlk is offline  
Old 01 October 2017, 04:20   #58
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
tell them , they are now in amigaland, where things are slow and offten weird
emufan is offline  
Old 01 October 2017, 06:31   #59
Hedeon
Semi-Retired
 
Join Date: Mar 2012
Location: Leiden / The Netherlands
Posts: 1,993
It finally compiled correctly. Also the sdl examples compiled. Not sure if they are good examples as they are missing some resources.

Both open a screen and in example 2 a 640x480 window is opened and closed again after a delay.

In the end, the gcc/g++ install was botched. Also had to add some stuff here and there.

Victory at last :-D
Hedeon is offline  
Old 01 October 2017, 15:03   #60
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
Originally Posted by Hedeon View Post
It finally compiled correctly.
good news. it was done with the stormc4 gcc ?
Quote:
Originally Posted by emufan View Post
@Hedeon: what says: gcc -dumpversion ?
emufan is offline  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sdl-1.2.15 Marlon_ Coders. C/C++ 40 13 March 2018 14:43
UAE for WarpOS 0.8.12 grelbfarlk request.Apps 0 23 November 2016 01:14
WarpOS Programming Help? esc support.Other 8 21 October 2015 10:37
WinUAE w/SDL mangamuscle request.UAE Wishlist 8 31 January 2007 11:41
What do you know about Amiga SDL? Tolismlf Amiga scene 6 15 November 2004 18:54

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:57.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.17468 seconds with 14 queries