Compiling a ndll, nMagick

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Compiling a ndll, nMagick

NekoHaxe

Hello list, 

I dunno who can help me with this, if Lee or Nicolas.

I added a few extra functions to nMagick, and when

trying to recompile the ndll I get a bunch of linking

errors, there are a lot of them, but all refer to

"undefined reference to '__imp_val_false' "

or

"undefined reference to '__imp_val_true' "

I don't get any other error.

all errors refer to file nMagick.c, but I think it's more

related to neko. I don't know with what version of 

neko was nMagick compiled the first time. I'm

using neko 1.80 for windows. Compiling with 

cygwin's gcc, (I have already compiled windows'

ndll's with gcc)

Carlos




¡Todo sobre Amor y Sexo!
La guía completa para tu vida en Mujer de Hoy:
http://mx.mujer.yahoo.com/

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Compiling a ndll, nMagick

Lee Sylvester
Hi Carlos,

I've never compiled with gcc before, so I'm not sure about how to track
this error. Theres definitely no reference to this in nMagick, but an
undefined value would assume that the __imp_val_false and __imp_val_true
types should at least be being defined in neko.h or the nMagick source
files. Both type names are too similar to Neko types to be coincidence,
so I don't think you'll find them in the ImageMagick repository, though
it's worth performing a grep there, if you can. My only guess is that
you're missing a .lib or .def file reference of some sort. Could you not
try compiling with VC Express?

Alternatively, throw the file updates my way (and let me know what you
changed ;-)) and I'll compile this end.

Best,
Lee




NekoHaxe wrote:

>
> Hello list,
>
> I dunno who can help me with this, if Lee or Nicolas.
>
> I added a few extra functions to nMagick, and when
>
> trying to recompile the ndll I get a bunch of linking
>
> errors, there are a lot of them, but all refer to
>
> "undefined reference to '__imp_val_false' "
>
> or
>
> "undefined reference to '__imp_val_true' "
>
> I don't get any other error.
>
> all errors refer to file nMagick.c, but I think it's more
>
> related to neko. I don't know with what version of
>
> neko was nMagick compiled the first time. I'm
>
> using neko 1.80 for windows. Compiling with
>
> cygwin's gcc, (I have already compiled windows'
>
> ndll's with gcc)
>
> Carlos
>
>
> ------------------------------------------------------------------------
>
> ¡Todo sobre Amor y Sexo!
> La guía completa para tu vida en Mujer de Hoy:
> http://mx.mujer.yahoo.com/ 


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Compiling a ndll, nMagick

Gamehaxe
Hi,
val_true and val_false are coming from "neko.h" where that are
defined as externs:

VEXTERN value val_true;
VEXTERN value val_false;

Where VEXTERN should map to extern __declspec( dllimport )

This generates the "__imp_" requirements.

These symbols should be in you neko.dll export library.
ie, when you compile neko.dll, you should get a neko.lib.
This should define the symbol.

You can check to see if your neko.lib has this symbol with:

dumpbin -exports neko.lib | grep true

You can also check the dll to see if it has the symbol for the runtime:

dumpbin -exports neko.dll | grep true

I get : "  _val_true" for the first and " 73   48 00015024 val_true"
for the second.

If you do not get these, then I'm guessing it's something to do with gcc
exporting data symbols.

Hugh


> Hi Carlos,
>
> I've never compiled with gcc before, so I'm not sure about how to track  
> this error. Theres definitely no reference to this in nMagick, but an  
> undefined value would assume that the __imp_val_false and __imp_val_true  
> types should at least be being defined in neko.h or the nMagick source  
> files. Both type names are too similar to Neko types to be coincidence,  
> so I don't think you'll find them in the ImageMagick repository, though  
> it's worth performing a grep there, if you can. My only guess is that  
> you're missing a .lib or .def file reference of some sort. Could you not  
> try compiling with VC Express?
>
> Alternatively, throw the file updates my way (and let me know what you  
> changed ;-)) and I'll compile this end.
>
> Best,
> Lee
>
>
>
>
> NekoHaxe wrote:
>>
>> Hello list, I dunno who can help me with this, if Lee or Nicolas.
>>
>> I added a few extra functions to nMagick, and when
>>
>> trying to recompile the ndll I get a bunch of linking
>>
>> errors, there are a lot of them, but all refer to
>>
>> "undefined reference to '__imp_val_false' "
>>
>> or
>>
>> "undefined reference to '__imp_val_true' "
>>
>> I don't get any other error.
>>
>> all errors refer to file nMagick.c, but I think it's more
>>
>> related to neko. I don't know with what version of neko was nMagick  
>> compiled the first time. I'm
>>
>> using neko 1.80 for windows. Compiling with cygwin's gcc, (I have  
>> already compiled windows'
>>
>> ndll's with gcc)
>>
>> Carlos
>>
>>
>> ------------------------------------------------------------------------
>>
>> ¡Todo sobre Amor y Sexo!
>> La guía completa para tu vida en Mujer de Hoy:
>> http://mx.mujer.yahoo.com/
>
>



--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Compiling a ndll, nMagick

NekoHaxe
In reply to this post by NekoHaxe
Hello Lee
It seems the error only happened when trying to statically
link the dll, I compiled dinamically and everything works
ok. I think that you manage to statically compile the dll
as your's is almost 4 mb and mine is around 97 kb.
(How do you compile the thing in vcc, I really don't
know how to use it, and I'll like to statically compile
so I have no dependency problems.)
Basically I implemented the MagickMosaicImages,
the MagickGet/SetImagePage, and wrote the 
DEFINE_PRIM for a bunch of methods that were
invoked in Manager.hx, but where not available.
Also created a Page class for the page definition.
I'm reading the ImageMagick site, and it seems that 
MagickMosaicImages is deprecated, I'm going to 
see what replaces it. When I'm done I'll could
send you a patch with the changes.

Carlos
Hi Carlos,

I've never compiled with gcc before, so I'm not sure about how to track

this error. Theres definitely no reference to this in nMagick, but an 
undefined value would assume that the __imp_val_false and __imp_val_true 
types should at least be being defined in neko.h or the nMagick source 
files. Both type names are too similar to Neko types to be coincidence, 
so I don't think you'll find them in the ImageMagick repository, though

it's worth performing a grep there, if you can. My only guess is that 
you're missing a .lib or .def file reference of some sort. Could you not 
try compiling with VC Express?

Alternatively, throw the file updates my way (and let me know what you 
changed ;-)) and I'll compile this end.

Best,
Lee




NekoHaxe wrote:
>
> Hello list, 
>
> I dunno who can help me with this, if Lee or Nicolas.
>
> I added a few extra functions to nMagick, and when
>
> trying to recompile the ndll I get a bunch of linking
>
> errors, there are a lot of them, but all refer to
>
> "undefined reference to '__imp_val_false' "
>
> or
>
> "undefined reference to '__imp_val_true' "
>
> I don't get any other error.
>
> all errors refer to file nMagick.c, but I think it's more
>
> related to neko. I don't know with what version of 
>
> neko was nMagick compiled the first time. I'm
>
> using neko 1.80 for windows. Compiling with 
>
> cygwin's gcc, (I have already compiled windows'
>
> ndll's with gcc)
>
> Carlos
>
>
> ------------------------------------------------------------------------
>
> ¡Todo sobre Amor y Sexo!
> La guía completa para tu vida en Mujer de Hoy:
> http://mx.mujer.yahoo.com/ 



_______________________________________________
Haxe mailing list
[hidden email]
http://lists.motion-twin.com/mailman/listinfo/haxe



¡Todo sobre Amor y Sexo!
La guía completa para tu vida en Mujer de Hoy:
http://mx.mujer.yahoo.com/

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Re: Compiling a ndll, nMagick

Lee Sylvester
I believe there are some flags you need to set to get it to compile
statically. The ImageMagick website has some information on how to do
this. It could be that you're missing one of the necessary flags.

Lee




NekoHaxe wrote:

> Hello Lee
> It seems the error only happened when trying to statically
> link the dll, I compiled dinamically and everything works
> ok. I think that you manage to statically compile the dll
> as your's is almost 4 mb and mine is around 97 kb.
> (How do you compile the thing in vcc, I really don't
> know how to use it, and I'll like to statically compile
> so I have no dependency problems.)
> Basically I implemented the MagickMosaicImages,
> the MagickGet/SetImagePage, and wrote the
> DEFINE_PRIM for a bunch of methods that were
> invoked in Manager.hx, but where not available.
> Also created a Page class for the page definition.
> I'm reading the ImageMagick site, and it seems that
> MagickMosaicImages is deprecated, I'm going to
> see what replaces it. When I'm done I'll could
> send you a patch with the changes.
>
> Carlos
>
>     Hi Carlos,
>
>     I've never compiled with gcc before, so I'm not sure about how to track
>
>     this error. Theres definitely no reference to this in nMagick, but an
>     undefined value would assume that the __imp_val_false and __imp_val_true
>     types should at least be being defined in neko.h or the nMagick source
>     files. Both type names are too similar to Neko types to be coincidence,
>     so I don't think you'll find them in the ImageMagick repository, though
>
>     it's worth performing a grep there, if you can. My only guess is that
>     you're missing a .lib or .def file reference of some sort. Could you not
>     try compiling with VC Express?
>
>     Alternatively, throw the file updates my way (and let me know what you
>     changed ;-)) and I'll compile this end.
>
>     Best,
>     Lee
>
>
>
>
>     NekoHaxe wrote:
>     >
>     > Hello list,
>     >
>     > I dunno who can help me with this, if Lee or Nicolas.
>     >
>     > I added a few extra functions to nMagick, and when
>     >
>     > trying to recompile the ndll I get a bunch of linking
>     >
>     > errors, there are a lot of them, but all refer to
>     >
>     > "undefined reference to '__imp_val_false' "
>     >
>     > or
>     >
>     > "undefined reference to '__imp_val_true' "
>     >
>     > I don't get any other error.
>     >
>     > all errors refer to file nMagick.c, but I think it's more
>     >
>     > related to neko. I don't know with what version of
>     >
>     > neko was nMagick compiled the first time. I'm
>     >
>     > using neko 1.80 for windows. Compiling with
>     >
>     > cygwin's gcc, (I have already compiled windows'
>     >
>     > ndll's with gcc)
>     >
>     > Carlos
>     >
>     >
>     > ------------------------------------------------------------------------
>     >
>     > ¡Todo sobre Amor y Sexo!
>     > La guía completa para tu vida en Mujer de Hoy:
>     > http://mx.mujer.yahoo.com/ 
>
>
>
>              
>
>     _______________________________________________
>     Haxe mailing list
>     [hidden email]
>     http://lists.motion-twin.com/mailman/listinfo/haxe
>              
>
>
> ------------------------------------------------------------------------
>
> ¡Todo sobre Amor y Sexo!
> La guía completa para tu vida en Mujer de Hoy:
> http://mx.mujer.yahoo.com/ 


--
haXe - an open source web programming language
http://haxe.org