[NME] Compilation error

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

[NME] Compilation error

rammserker
Everything was going well, until today. I was going to compile some code for testing something in Linux and then: Error. Then went to the NME sample code to figure if it was my fault or was something else, and then: Error. This is the error log:

haxelib run hxcpp Build.xml haxe -Dcpp -Dhaxe_208 -Dnme -Dnme_install_tool -Dno_console -Dtrue
Creating hxcpp.h.gch...
g++ -Iinclude -c -fvisibility=hidden -O2 -fpic -fPIC -DHX_LINUX -m32 -I/home/rammserker/SVN/hxcpp//include -frtti -o hxcpp.h.gch /home/rammserker/SVN/hxcpp//include/hxcpp.h
g++ -I. -Iinclude -c -fvisibility=hidden -O2 -fpic -fPIC -DHX_LINUX -m32 -I/home/rammserker/SVN/hxcpp//include -x c++ -frtti ./src/nme/media/SoundTransform.cpp -oobj/linux//src/nme/media/SoundTransform.o
./src/nme/media/SoundTransform.cpp: In member function ‘Void nme::media::SoundTransform_obj::__construct(double, double)’:
./src/nme/media/SoundTransform.cpp:11: error: declaration of ‘double vol’ shadows a parameter
./src/nme/media/SoundTransform.cpp:11: error: ‘__o_vol’ was not declared in this scope
./src/nme/media/SoundTransform.cpp:12: error: declaration of ‘double panning’ shadows a parameter
./src/nme/media/SoundTransform.cpp:12: error: ‘__o_panning’ was not declared in this scope
Called from ? line 1
Called from BuildTool.hx line 1100
Called from BuildTool.hx line 501
Called from BuildTool.hx line 538
Called from BuildTool.hx line 657
Called from BuildTool.hx line 690
Called from BuildTool.hx line 200
Uncaught exception - Error : 256 - build cancelled

I don't what's happening. Tried in hxcpp and NME from haxelib (3.0.0 and 3.0.1) and also latest hxcpp and NME from SVN... I'm puzzled :S

Max
0 1 0 | 0 0 1 | 1 1 1

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

Re: [NME] Compilation error

rammserker
Was searching and found this. This is the generated code that's having problems:

#include <hxcpp.h>

#ifndef INCLUDED_nme_media_SoundTransform
#include <nme/media/SoundTransform.h>
#endif
namespace nme{
namespace media{

Void SoundTransform_obj::__construct(double vol,double panning)
{
double vol = __o_vol.Default(1.0);
double panning = __o_panning.Default(0.0);
{   
    HX_SOURCE_POS("/home/rammserker/Desarrollo/Haxe/Lib/nme/3,0,1/nme/media/SoundTransform.hx",10)
    this->volume = vol;
    HX_SOURCE_POS("/home/rammserker/Desarrollo/Haxe/Lib/nme/3,0,1/nme/media/SoundTransform.hx",11)
    this->pan = panning;
}
;   
    return null();
}
// And continues ...

And here is the same code generated yesterday, that was succesfull to compile:

#include <hxcpp.h>

#ifndef INCLUDED_nme_media_SoundTransform
#include <nme/media/SoundTransform.h>
#endif
namespace nme{
namespace media{

Void SoundTransform_obj::__construct(Dynamic __o_vol,Dynamic __o_panning)
{
double vol = __o_vol.Default(1.0);
double panning = __o_panning.Default(0.0);
{
HX_SOURCE_POS("/home/rammserker/Desarrollo/Haxe/Lib/nme/3,0,1/nme/media/SoundTransform.hx",10)
this->volume = vol;
HX_SOURCE_POS("/home/rammserker/Desarrollo/Haxe/Lib/nme/3,0,1/nme/media/SoundTransform.hx",11)
this->pan = panning;
}
;
return null();
}
// And continues...

If you see the parameters of SoundTransform_obj::__construct, in the first snippet it has wrong parameters entering the method ( vol and panning ) and in the second snippet are ok ( __o_vol and __o_panning ). Also, in the first snippet the types of the parameters is "double" and in the second is "Dynamic". I don't know what's happening... :(

Max
0 1 0 | 0 0 1 | 1 1 1



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

Re: [NME] Compilation error

singmajesty
That's interesting.

Based on the differences between the two, it sounds like this may be a  
difference in HXCPP versions?

Can you try and do a clean build using the haxelib version of HXCPP?  
(delete the generated obj directory before compiling)




On Mon, 10 Oct 2011 15:29:50 -0700, Maximiliano Fernández  
<[hidden email]> wrote:

> Was searching and found this. This is the generated code that's having
> problems:
>
> #include <hxcpp.h>
>
> #ifndef INCLUDED_nme_media_SoundTransform
> #include <nme/media/SoundTransform.h>
> #endif
> namespace nme{
> namespace media{
>
> Void SoundTransform_obj::__construct(double vol,double panning)
> {
> double vol = __o_vol.Default(1.0);
> double panning = __o_panning.Default(0.0);
> {
>
> HX_SOURCE_POS("/home/rammserker/Desarrollo/Haxe/Lib/nme/3,0,1/nme/media/SoundTransform.hx",10)
>     this->volume = vol;
>
> HX_SOURCE_POS("/home/rammserker/Desarrollo/Haxe/Lib/nme/3,0,1/nme/media/SoundTransform.hx",11)
>     this->pan = panning;
> }
> ;
>     return null();
> }
> // And continues ...
>
> And here is the same code generated yesterday, that was succesfull to
> compile:
>
> #include <hxcpp.h>
>
> #ifndef INCLUDED_nme_media_SoundTransform
> #include <nme/media/SoundTransform.h>
> #endif
> namespace nme{
> namespace media{
>
> Void SoundTransform_obj::__construct(Dynamic __o_vol,Dynamic __o_panning)
> {
> double vol = __o_vol.Default(1.0);
> double panning = __o_panning.Default(0.0);
> {
> HX_SOURCE_POS("/home/rammserker/Desarrollo/Haxe/Lib/nme/3,0,1/nme/media/SoundTransform.hx",10)
>  this->volume = vol;
> HX_SOURCE_POS("/home/rammserker/Desarrollo/Haxe/Lib/nme/3,0,1/nme/media/SoundTransform.hx",11)
>  this->pan = panning;
> }
> ;
> return null();
> }
> // And continues...
>
> If you see the parameters of SoundTransform_obj::__construct, in the  
> first
> snippet it has wrong parameters entering the method ( vol and panning )  
> and
> in the second snippet are ok ( __o_vol and __o_panning ). Also, in the  
> first
> snippet the types of the parameters is "double" and in the second is
> "Dynamic". I don't know what's happening... :(
>
> Max
> 0 1 0 | 0 0 1 | 1 1 1

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

Re: [NME] Compilation error

rammserker
I've already made that... And the problem continue. Buuut...

I go back to haXe 2.07 and tried again (rev. 3980) and it worked! I don't know what happened. I will try the latest revisions of the compiler to see what happened. Thanks ;)

Max
0 1 0 | 0 0 1 | 1 1 1



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

Re: [NME] Compilation error

rammserker
I have found the problematic compiler revision:

Revision 4014 - 07 Oct 2011 - 09:26

After that revision, all the compiler revisions I tried have the same error. Check the differences and look for the problem. I don't know how to do it... If I can help in some way, tell me.

Max
0 1 0 | 0 0 1 | 1 1 1


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

Re: [NME] Compilation error

rammserker
Sorry: Linux 32bits

That's all. Working now with revision 4013 and I don't have any errors

Max
0 1 0 | 0 0 1 | 1 1 1



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

Re: [NME] Compilation error

Nicolas Cannasse
In reply to this post by rammserker
Le 11/10/2011 00:29, Maximiliano Fernández a écrit :
> Was searching and found this. This is the generated code that's having
> problems:

Could you report this issue on code.google.com/p/haxe/issues ?
It seems to come from a change I made recently, I'll have to investigate
further, it doesn't seem like a easy fix.

Best,
Nicolas

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

Re: [NME] Compilation error

Gamehaxe
Without looking at the details, I assumed it was something
to do the the "constructor with default args" that I may be
treating differently from a "member with default args",
unless you have been changing things there.  ie, it may
be a subtle error in the hxcpp output.

Hugh

> Le 11/10/2011 00:29, Maximiliano Fernández a écrit :
>> Was searching and found this. This is the generated code that's having
>> problems:
>
> Could you report this issue on code.google.com/p/haxe/issues ?
> It seems to come from a change I made recently, I'll have to investigate  
> further, it doesn't seem like a easy fix.
>
> Best,
> Nicolas

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

Re: [NME] Compilation error

rammserker
Issue reported! Tell me if I can help you in some other way to solve this. It's time to go to sleep, but will be around in some hours.

Bye!

Max
0 1 0 | 0 0 1 | 1 1 1



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