Login
Username:

Password:

Remember me



Lost Password?

Register now!
Main Menu
Who is Online
13 user(s) are online (12 user(s) are browsing Forum)

Members: 0
Guests: 13

more...


Browsing this Thread:   1 Anonymous Users




« 1 (2) 3 4 »


Anonymous
Re: Wouild this be of any use:?
#25
well, im not good on this too....
but:

cc = c compiler
cflag = compiler flags
ldflag = link flags
xtraobjs = are not used
objects = are the object .o files
links = are the source .c files

the strange is that i cant see the $links variable be calling anywhere...

ok, a blind guiding another one...but it still funny! ;o)
i would try put bec.c in the object or xtraobjs variable!

*** edited ****

the other is make / shell command that i dont know either.
the issue is, you want to make bec from bec.c linking against ansi.o , so it something like $cc bec.c -o bec $objects $ldflags...[i386-aros-gcc bec.c -o bec ansi.o -lm] but im not sure, i dont have anything to test what i am saing, i do know this template makefile works cause i use it before (it was cycloid who post it for me), i do play with the variable to reach what i want....i hope i explained enough, so you can find where to play with!

 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: Wouild this be of any use:?
#24
Not too shy to talk
Not too shy to talk


See User information
I'm not sure if the bec.c is being made properly or not.... I'm trying to work out what each bit of the makefile does, but not doing so well x.x (I know nothing about make files!).

On the line that says :
$(TARGET): $(OBJECTS) $(XTRAOBJ)

I can see "target" is set to "Bec" (the name of the output file?), and that "objects" is set to "ansi.o" (the first file). But I'm not sure about "xtraobj" - it dosen't seem to be defined.

The next line that says:
$(CC) $(OBJECTS) $(XTRAOBJ) $(LDFLAGS) -o $(TARGET)

CC I can see is the gcc compiler (the command that compiles everything?), Objects (ansi.o) but then the "xtraobj" that's empty. I'm guessing "ldflags" has something to do with command line options to gcc (no idea what they do though!).

The last lines:
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@

Again I see CC is the gcc compiler and "cflags" look like more gcc options. But what is "%.o: %.c, and -c $< -o $@"?
:(

I'm not sure where bec.c gets compiled either :( I think the biggest problem is my lack of understanding of makefiles and the C language.

thanks
ljones

Posted on: 2004/11/1 18:58
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Anonymous
Re: Wouild this be of any use:?
#23
Quote:

aaaaa@localhost bec]$ make
i386-aros-gcc -s -Wall -O2 -c ansi.c -o ansi.o
ansi.c: In function `STRING_Handler':
ansi.c:520: warning: `num2' might be used uninitialized in this function
i386-aros-gcc ansi.o -lm -o Bec


where is the bec.c file!?!?!? (im without a linux box to say exactly how it was supposed to look, but i would guess your makefile is NOT as it should...

it is supposed to make ansi.o (the first gcc call) and than link bec.c against ansi.o and the -l(ibs) (the second gcc call)

 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: Wouild this be of any use:?
#22
Not too shy to talk
Not too shy to talk


See User information
I tried changing the -larosm to -lm and looking at SYS:toosl/debug/sashimi, but they don't give any clues either. Sashimi displayed nothing x.x (unless I'm not using it right? I run the program in 1 window, and then the other (bec) in another?)

I think it's linking ok though (not sure);

aaaaa@localhost bec]$ make
i386-aros-gcc -s -Wall -O2 -c ansi.c -o ansi.o
ansi.c: In function `STRING_Handler':
ansi.c:520: warning: `num2' might be used uninitialized in this function
i386-aros-gcc ansi.o -lm -o Bec

[aaaaa@localhost bec]$ ls -lah
total 725K
drwxr-xr-x 2 aaaaa aaaaa 424 Nov 19 14:49 ./
drwxr-xr-x 5 aaaaa aaaaa 192 Nov 19 14:29 ../
-rw------- 1 aaaaa aaaaa 63K Oct 22 19:08 ansi.c
-rw-r--r-- 1 aaaaa aaaaa 35K Nov 19 14:49 ansi.o
-rwxrw-rw- 1 aaaaa aaaaa 383K Nov 19 14:49 Bec*
-rw------- 1 aaaaa aaaaa 122K Oct 22 19:08 bec.c
-rw-r--r-- 1 aaaaa aaaaa 64K Nov 19 14:21 bec.zip
-rw------- 1 aaaaa aaaaa 3.2K Oct 22 19:08 buglist.txt
-rw------- 1 aaaaa aaaaa 13K Oct 22 19:08 help.txt
-rw------- 1 aaaaa aaaaa 4.3K Oct 22 19:08 keywords.h
-rw------- 1 aaaaa aaaaa 200 Oct 22 19:08 m
-rw-r--r-- 1 root root 290 Nov 19 14:36 makefile
-rw-r--r-- 1 root root 294 Nov 19 14:31 makefile~
-rw------- 1 aaaaa aaaaa 699 Oct 22 19:08 readme.txt
-rw-r--r-- 1 aaaaa aaaaa 25 Oct 22 20:13 var.lst
-rw------- 1 aaaaa aaaaa 1.2K Oct 22 19:08 whatsnew.txt

BTW if anyone wants I can post up the source somewhere, I think the program is ok and is free 'n' stuff. Its just I'm not a developer

thanks :)
ljones

Posted on: 2004/11/1 13:06
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Anonymous
Re: Wouild this be of any use:?
#21
hum, now i am not the right person for the job, as i am nb myself...but i would try -lm instead of -larosm and would look the console output (or tools/debug/sashimi)...to try to find a hint on what is going on!

but as i say, i dont have the knowledge to help further! sorry! =o\

***edited***

make sure bec.c is linked with ansi.o....in your output looks like it just build ansi.o as bec, instead of bec.c plus ansi.o as bec!

 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: Wouild this be of any use:?
#20
Not too shy to talk
Not too shy to talk


See User information
I tried putting the tabs into the makefile - *ah* :) they *both* needed a tab (I thought only one of those lines needed one!) -- ooop!. You know, that's the first time I've even really ever modified a makefile!

:) some good news - Well it almost works. It compiled, and I got this as it compiled:

[aaaaa@desktop2 src]$ make
i386-aros-gcc -s -Wall -O2 -c ansi.c -o ansi.o
ansi.c: In function `STRING_Handler':
ansi.c:520: warning: `num2' might be used uninitialized in this function
i386-aros-gcc ansi.o -larosm -o Bec
[aaaaa@desktop2 src]$

But it *did* give me a compiled file which I tried to run in aros. It didn't give me an error this time - in fact it didn't say anything(!).

After running Bec like this;

5. Ram Disk> Bec

Nothing happened! (no text printed) It just returned straight back to the command prompt!, i.e. it just did this:

5. Ram Disk>

It's nearly working :) only it produces no output!

Normally from a linux command line I get some output;

BASIC Emulation Compiler v0.20 (c)1998-99 William Yu
Usage: BEC infile.ext [outfile]

But under the AROS compiled version I don't see this message! (It displays nothing!).

thanks
ljones

Posted on: 2004/10/31 21:17
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Anonymous
Re: Wouild this be of any use:?
#19
hey man...if wall is not ok, try Wall...be creative! =o)

btw:...why you change the makefile that much, the older just needed a tab space, afaik (and Wall instead of wall...)

 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: Wouild this be of any use:?
#18
Not too shy to talk
Not too shy to talk


See User information
Ok, I tried this;

# Template for a simple generic Makefile
#
CC = i386-aros-gcc
CFLAGS = -s -wall -O2
LDFLAGS = -larosm
TARGET = Bec
OBJECTS = ansi.o
LINKS = ansi.c bec.c

all: $(TARGET)

$(TARGET): $(OBJECTS) $(XTRAOBJ) $(CC) $(OBJECTS) $(XTRAOBJ) $(LDFLAGS) -o $(TARGET)

%.o: %.c $(CC) $(CFLAGS) -c $< -o $@

But this time I get this;

[aaaaa@desktop2 src]$ make
i386-aros-gcc -s -wall -O2 -c -o ansi.o ansi.c
gcc: unrecognized option `-wall'
make: *** No rule to make target `i386-aros-gcc', needed by `Bec'. Stop.
[aaaaa@desktop2 src]$

What's a "rule"? x.x

:) thanks

ljones

Posted on: 2004/10/31 12:50
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: Wouild this be of any use:?
#17
Home away from home
Home away from home


See User information
The "$(CC)" lines must have a tabulator space at the beginning of the line. That's what causes missing separator erros.


Posted on: 2004/10/30 20:02
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: Wouild this be of any use:?
#16
Not too shy to talk
Not too shy to talk


See User information
I think it's this line;

$(CC) $(OBJECTS) $(XTRAOBJ) $(LDFLAGS) -o $(TARGET)

thanks
:)

ljones

Posted on: 2004/10/30 12:03
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 




« 1 (2) 3 4 »



You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[Advanced Search]


Search
Top Posters
1 paolone
paolone
4462
2 nikolaos
nikolaos
4206
3 magorium
magorium
4095
4 phoenixkonsole
phoenixkonsole
3942
5 deadwood
deadwood
2917
6 ncafferkey
ncafferkey
2810
7 mazze
mazze
2222
8 Kalamatee
Kalamatee
2212
9 clusteruk
clusteruk
2114
Powered by XOOPS © 2001-2025 The XOOPS Project