Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.
Hi, i actually posted this as aresponse to another thread, but it was old and i'm new to how these forums work...so i thought i'd post it anew as well. basically, i've tried to install sdcc and it isn't compiling even the simple program mentioned in the manual. i've checked the paths (i think) and tried a few different versions...any ideas? here's the relevant detail:
Microsoft Windows 98 second edition
SDCC :mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.4.4 #848 (Sep 24 2004) (MINGW32)
D:\woof>sdcc --print-search-dirs test.c
# 2 "test.c"
-:0: error 74: function 'main' undefined
i've busted my skull for several hours trying to get it working with different builds, etc.
It looks like the pipe between the preprocessor and the next stage of the compiler is being broken. Since the preprocessed text of your program (the output of the preprocessor) is being displayed on standard output, the next stage of the compiler is probably getting an empty stream, which leads to the "function 'main' undefined" message.
i haven't used sdcc before so i wasn't sure if printlning the whole code was correct...and this probably confirms your suspicions:
D:\woof>sdcc -c test.c
# 2 "test.c"
all the .rel and .asm files produced by this or by compiling larger c files are the same size, and empty, so it definately looks like it is the case of the piping. so the question is now, how do i fix it? Did i need to install anything else, or change the directory structure at all? my path is only set up for c:\sdcc\bin if this helps as well...
Searching the web I have found that older versions of Norton Antivirus sometimes conflict with the popen (pipe open) call, so you might try turning it off if you are running it. Otherwise I'm not sure what to do next since I am really not a Windows programming guru.
it worked. mate, serious amount of thanks for that one...i would never have thought of that!!
huge thanks again.