Re: Problems creating dll / preprocessor

new topic     » goto parent     » topic index » view thread      » older message » newer message

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 
 
 
-- This is the calling code 
 
include std/dll.e 
include std/console.e 
 
 
 
constant tinlib= open_dll("simpledll.dll") 
 
if tinlib then 
    puts(1,"DLL linked ..."&"\n") 
else 
    puts(1,"DLL linking failed ..."&"\n") 
    abort(1) 
end if 
 
atom preproc=define_c_func(tinlib,"_1add",{E_INTEGER,E_INTEGER},E_INTEGER) 
 
puts(1,sprintf("%d",preproc)&"\n") 
 
puts(1,"now calling\n") 
 
?c_func (preproc,{5,2}) 
 
puts(1,"done\n") 
 
wait_key() 
 
 

This code above is the most i could get working using gcc (it's the 64bit Version, for 32bit the functionname is _1add@8).

As soon as i add a sequence, object or atom the dll crashes. Using Eu4.1 32bit it will not even compile, if there is an include file in the dll.

So now I'am really not sure, but i really want to know...

a.) Is this only my problem (no one cares about dll's on Windows)
b.) It works for everybody else (I'am just to stupid to setup gcc)
c.) Creating dll's on Windows is broken with gcc but ... see a.)

btw. everything works fine with Eu4.0.x compiled with OpenWatcom, I can even use this dll's with Eu4.1 32bit.
The problem is, the OpenWatcom installer does not work on Win8.1.

On the otherhand using gcc breaks also the pre-processor in OpenEuphoria as preproc.e only looks for a function called 'preprocess' in the supported dll.
Not for something like '_1preprocess² or '_1preprocess'.

Maybe someone has an answer

Andreas

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu