Re: Problems creating dll / preprocessor
- Posted by mattlewis (admin) Sep 03, 2014
- 2001 views
Hi
I worked a little on my problem, but still got no solution.
i still can't produce working dll's on Windows using gcc (i tried WIn8.1 64bit and WinXP 32bit)
Okay, it's not completly correct i can produce very simple dll's using Eu4.0.x and Eu 4.1 64bit.
-- This is the dll code global function add(integer a, integer b) return a+b end function
One problem here is that you're trying to export a function with the same name as a backend function. I'm not sure how we can solve this sort of conflict. If you tried this under Linux, you'd get a linker error similar to:
/usr/local/lib/euso.a(be_runtime.o): In function `add': be_runtime.c:(.text+0x137): multiple definition of `add'
The translator code doesn't attempt to alias function names on Windows, however (we used a different way of naming exports under Watcom). That needs to be fixed. I could import the function using "_1add@8" under Windows, but was still getting machine errors. I suspect this is happening in the C calling code, but I haven't gotten that far yet.
Matt