SEAL Forum Index SEAL
The SEAL Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problems Trying to Compile/Run a Seal Program, Help Needed

 
Post new topic   Reply to topic    SEAL Forum Index -> Technical Issues
View previous topic :: View next topic  
Author Message
seawolf



Joined: 19 Jul 2002
Posts: 4

PostPosted: Tue Jul 23, 2002 11:09 am    Post subject: Problems Trying to Compile/Run a Seal Program, Help Needed Reply with quote

I'm attempting to compile and run the simple hello world seal test program that was given in the seal 1 programming guide link from the seal page.

I'm not having much luck. I finally got gcc to compile the -o (after fixing a type conflict for va_list...was declared void* one place and char* another), but the linking is not working. I finally found and compiled dlxgen then did the 'dlxgen hello.exe hello.o' discovered it wanted the dlx.ld file which I found in one of the zip files, redid it with that and well, dlxgen runs with no errors, but I don't get any useable output.

dlxgen outputs a line saying file size is 0kb. The resulting size of the hello.exe is 675 bytes which is smaller than the .o file. I didn't think the exe would run, but I tried it anyway and I was right...it just hangs the computer and doesn't do a thing either from freedos prompt or from seal.

I'm using seal 2.0.11 and I think it's 3.1 something for the compiler version.

What am I doing wrong and/or missing? Do I need to change something in the dlx.ld file? (I have made no mods to the one from the seal src zip)
Back to top
View user's profile Send private message
Finkelsmak Kvasthuvud



Joined: 21 Apr 2002
Posts: 85
Location: Sweden

PostPosted: Tue Jul 23, 2002 1:52 pm    Post subject: Reply with quote

i don't think you're doing anything wrong actually. a simple hello world program will not be more that 600-700 bytes.

your problem is probably that in SEAL2 the extension .S2A is used for seal application, rather than .EXE. So try doing this instead:

Code:
dlxgen hello.s2a hello.o


If it doesn't work, tell me and I'll post a working Hello Word-program with exact instructions on how to compile.

Good luck.
Back to top
View user's profile Send private message Visit poster's website
ganesh



Joined: 11 Jul 2002
Posts: 133
Location: Vancouver, BC, CA

PostPosted: Tue Jul 23, 2002 2:27 pm    Post subject: Reply with quote

Gcc is version specific. It generated different code for different version numbers of the
same compiler.

And I think 3.1 does not work very well with Seal 2.x ? How did you get it. You _must_ be using DJGPP for compiling.

The least you can do is to recompile all of SEAL, so that it is customized to your computer.
_________________
Ganesh lives @
www.iamganesh.com
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
dr_linux



Joined: 10 Jun 2002
Posts: 45
Location: Germany

PostPosted: Wed Jul 24, 2002 2:29 am    Post subject: Reply with quote

why don't we recompile then seal with the new djgpp?
Back to top
View user's profile Send private message Visit poster's website
orudge
Administrator


Joined: 07 Oct 2001
Posts: 1332
Location: United Kingdom

PostPosted: Wed Jul 24, 2002 4:15 am    Post subject: Reply with quote

It sounds to me like you were trying to run the EXE file from the DOS command line. Some versions of DLXGEN put an EXE header at the start of the output file which said "This program requries SEAL" or something like that, but recent versions don't, as programs are meant to be called .S2A as others have said. Generate an S2A file and run it from SEAL and it should work fine, although you may have gcc version problems as others have mentioned.
_________________
Owen Rudge
http://www.owenrudge.net/

Currently Playing (last time I was online, anyway):
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
seawolf



Joined: 19 Jul 2002
Posts: 4

PostPosted: Wed Jul 24, 2002 4:31 am    Post subject: Got it to work, though not sure what the difference is Reply with quote

For reference, I had the binary install of 2.00.11 then just loaded all the header files and libraries from the seal source and just compiled the dlxgen and dlxmake utilities with djgpp.

With the original program, I tried it with a s2a and exe extention and it made no difference (also had tried it from dos prompt and also from seal).

I tried using the vdev program to generate a shell instead of typing stuff in from the seal 1.0 guide, and the vdev generated shell worked. I haven't looked to see the differences are and to figure out what's wrong with the programming guide version.

Incidently, the vdev program (at least the one distributed with the binary version of seal) has a bug with the text labels. It reverses the order of the 2nd and 3rd arguments in the text init call which of course the compiler doesn't like. I haven't looked at source to fix it there yet.
Back to top
View user's profile Send private message
ganesh



Joined: 11 Jul 2002
Posts: 133
Location: Vancouver, BC, CA

PostPosted: Wed Jul 24, 2002 5:43 am    Post subject: Reply with quote

I think you havent understood.

You _MUST_ be using the same compiler that was used to compile the binary version. So the best way is to compile Seal yourself.

Another problem I have found is that GCC mangles the class names, so I cannot dynamically load widgets. I must be using the same compiler to generate the same mangled name.
_________________
Ganesh lives @
www.iamganesh.com
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
seawolf



Joined: 19 Jul 2002
Posts: 4

PostPosted: Wed Jul 24, 2002 6:37 am    Post subject: Reply with quote

Okay, so what version of gcc was used to compile the 2.00.11 binary distribution, 2.95.3? I really don't want to mess with recompiling seal and I'd rather change compiler versions as that's easier and faster for me as I don't want to spend the time to figure out of the seal compile works right under gcc 3.1 (incidently, gcc 3.0.x also at least used to screw up linux kernels as well).
Back to top
View user's profile Send private message
Finkelsmak Kvasthuvud



Joined: 21 Apr 2002
Posts: 85
Location: Sweden

PostPosted: Wed Jul 24, 2002 6:46 am    Post subject: Reply with quote

i use 2.95.2, but i suppose that all 2.95 releases work, right?
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    SEAL Forum Index -> Technical Issues All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group