1. Building EUPHORIA with LCC
I tried to compile Euphoria 3.1 with LCC. It found four syntax errors
which required a type cast from some kind of a pointer (4byte) to an
integer (4byte). After adding in typecasts to the source, I found that
there were link errors involving _12dir() and '_current_task'.
So, I added file.obj and be_task.obj. I guessed that the BE_FLAGS should
go with be_task and FE_FLAGS with file.c. The link errors disappeared.
I think LCC might have been abandoned by the time we got to 3.1. I was
using unmodified original source from the svn in the tag 3.1.
This slightly modified batch file, linked object list file, and two c source
files. Can be yours if you ask nicely for it. :)
I made exw.exe it works with the demos. I am happy with it. It then says
to build your exe file type 'emake'. I don't understand why I need that.
What's the exact difference between exw.exe and the resulting int.exe made
by emake?
I went on to do 'emake' and got an error:
'cannot open c:\archivos'
On my system Program Files is not the same but it has a space in it and
something
is not very smart about spaces. The source of the problem was in lcclnk stops
when it finds any white space when loading a filename. In other words, it
doesn't
like spaces in its path. There is a portable hack which will not hurt any
system but will allow users to keep lcc under the Program Files directory like
every other add on program: For LCC, the path for its library can be made into
a 'short' 8 character long name when an element has a whitespace in it. This
even works on NTFS! This is easy to do, you need to modify c_decl.e. Warning
I haven't tested this one, I have been using an unportable hack instead but
maybe you want to try it:
function pathnamesTo83( sequence s )
integer sl, -- slash location
osl -- old slash location
if platform() != WIN32 then
return s
end if
osl = find( ':', s )
if osl = 0 then
osl = find( '\\', s )
end if
sl = osl + find( '\\', s[osl+1..$] ) -- find_from
while sl != osl do
if find( ' ', s[osl..sl] ) then
s = s[1..osl] & s[osl+1..osl+6] & "~1" & s[sl..$]
sl = osl+8
end if
osl = sl
sl += find( '\\', s[sl+1..$] )
end while
return s
end function
The function is put in the creation of the object for lcc:
printf(link_file, "%s\\bin\\ecwl.lib\n", {pathnamesTo83(eudir)})
Shawn Pringle
2. Re: Building EUPHORIA with LCC
Shawn Pringle wrote:
>
> I tried to compile Euphoria 3.1 with LCC.
<snip>
> I made exw.exe it works with the demos. I am happy with it. It then says
> to build your exe file type 'emake'. I don't understand why I need that.
> What's the exact difference between exw.exe and the resulting int.exe made
> by emake?
The 'emake' message is part of the translator. The build process uses the
translator, but doesn't use the generated emake, since it uses the C
backend, rather than the translator run-time library.
Matt