hxcpp 1.0.2

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

hxcpp 1.0.2

Gamehaxe

Hi,
I have release a new version of hxccp/haxelib that hopefully should fix
the errors reported so far.  You can install the update with

haxelib install hxcpp

You may need to delete your generated "cpp" directory if you
have upgraded - although I think you should be ok if you do not.

In testing I had a very strange problem on Linux where one
of the dso files appeared to be "tainted" in some way, and it
could not be loaded as a dso.  If I "mv" the file, the problem
remained, but if I "cp" the file, it works. I tried "chmod" and
"chown" to no effect.  I'm prepared to write this off as a
quirk of the unzip process, but if anyone either gets this
problem or knows the reason, please let me know.

Hugh

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

Re: hxcpp 1.0.2

clemos
Hi Hugh

I've updated hxcpp on my Ubuntu 64, and the build process for a basic
"hello world" app goes a bit further, but it still stops with errors :

/usr/local/haxe/lib/hxcpp/1,0,2//runtime/src/hxCFFI.cpp: In function
‘void* val_to_kind(hxObject*, _vkind*)’:
/usr/local/haxe/lib/hxcpp/1,0,2//runtime/src/hxCFFI.cpp:118: erreur:
cast from ‘_vkind*’ to ‘int’ loses precision
/usr/local/haxe/lib/hxcpp/1,0,2//runtime/src/hxCFFI.cpp: In function
‘hxObject* alloc_abstract(_vkind*, void*)’:
/usr/local/haxe/lib/hxcpp/1,0,2//runtime/src/hxCFFI.cpp:184: erreur:
cast from ‘_vkind*’ to ‘int’ loses precision
/usr/local/haxe/lib/hxcpp/1,0,2//runtime/src/hxCFFI.cpp: In function
‘void kind_share(_vkind**, const char*)’:
/usr/local/haxe/lib/hxcpp/1,0,2//runtime/src/hxCFFI.cpp:556: erreur:
cast from ‘_vkind*’ to ‘int’ loses precision

+++++++
Clément

On Mon, Jul 27, 2009 at 6:49 PM, Hugh Sanderson<[hidden email]> wrote:

>
> Hi,
> I have release a new version of hxccp/haxelib that hopefully should fix
> the errors reported so far.  You can install the update with
>
> haxelib install hxcpp
>
> You may need to delete your generated "cpp" directory if you
> have upgraded - although I think you should be ok if you do not.
>
> In testing I had a very strange problem on Linux where one
> of the dso files appeared to be "tainted" in some way, and it
> could not be loaded as a dso.  If I "mv" the file, the problem
> remained, but if I "cp" the file, it works. I tried "chmod" and
> "chown" to no effect.  I'm prepared to write this off as a
> quirk of the unzip process, but if anyone either gets this
> problem or knows the reason, please let me know.
>
> Hugh
>
> --
> haXe - an open source web programming language
> http://haxe.org
>

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

Re: hxcpp 1.0.2

tong-2
In reply to this post by Gamehaxe
On Tue, 2009-07-28 at 00:49 +0800, Hugh Sanderson wrote:
> Hi,
> I have release a new version of hxccp/haxelib that hopefully should fix
> the errors reported so far.

hi,

2 bugs detected:

* fields called 'namespace' throw an error, cause of keyword conflict
(works on other platforms)

* compling haxe.unit.TestRunner:
gcc -c -fvisibility=hidden -O2 -DHX_LINUX
-I/home/tong/haxelib/hxcpp/1,0,2//include -Iinclude
-frtti ./src/haxe/unit/TestRunner.cpp
-oobj/linux//src/haxe/unit/TestRunner.o
./src/haxe/unit/TestRunner.cpp: In member function ‘Void
haxe::unit::<unnamed>::__default_print::run(Dynamic)’:
./src/haxe/unit/TestRunner.cpp:156: error: expected `;' before ‘return’


/h

--
[)   |   5   |<   †   |2   3   3


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

Re: hxcpp 1.0.2

Nicolas Cannasse
In reply to this post by clemos
clemos a écrit :

> Hi Hugh
>
> I've updated hxcpp on my Ubuntu 64, and the build process for a basic
> "hello world" app goes a bit further, but it still stops with errors :
>
> /usr/local/haxe/lib/hxcpp/1,0,2//runtime/src/hxCFFI.cpp: In function
> ‘void* val_to_kind(hxObject*, _vkind*)’:
> /usr/local/haxe/lib/hxcpp/1,0,2//runtime/src/hxCFFI.cpp:118: erreur:
> cast from ‘_vkind*’ to ‘int’ loses precision
> /usr/local/haxe/lib/hxcpp/1,0,2//runtime/src/hxCFFI.cpp: In function
> ‘hxObject* alloc_abstract(_vkind*, void*)’:
> /usr/local/haxe/lib/hxcpp/1,0,2//runtime/src/hxCFFI.cpp:184: erreur:
> cast from ‘_vkind*’ to ‘int’ loses precision
> /usr/local/haxe/lib/hxcpp/1,0,2//runtime/src/hxCFFI.cpp: In function
> ‘void kind_share(_vkind**, const char*)’:
> /usr/local/haxe/lib/hxcpp/1,0,2//runtime/src/hxCFFI.cpp:556: erreur:
> cast from ‘_vkind*’ to ‘int’ loses precision

A side note to Hugh about 64 bit mode :
"int" is still 32 bits so you cannot store pointers inside it. You can
use "int_val" instead , as defined in neko.h

Nicolas

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

Re: hxcpp 1.0.2

Hugh Sanderson-2
In reply to this post by Gamehaxe
Hi,
In this particular case (vkind) I actually store a (32 bit) int
in a pointer, so a simple truncating cast-to-int should be enough.
But obviously gcc does not like my syntax.
I think I will keep them as pointers everywhere - this will
solve the problem easily.

Libraries & dso created with 64 bit pointers (windows,lunux) are
obviously not going to be compatible with 32 bit exe, so
should we create a "Linux64" "Windows64" bin, or perhaps
Linux/std.ndll64 or Linux/std64.ndll ?
The latter might be a bit safer since it may prevent you from
"accidentally" finding the wrong dll in a search path. ie,
if you want to distribute 64bit and 32bit in the one directory:

app/
app/MyExe32
app/MyExe64
app/MyDLL.ndll
app/MyDLL.ndll64   or   MyDLL64.ndll

Or similary

app/neko
app/neko64
app/neko.dso
app/neko64.dso
app/MyApp.n
app/MyDLL.ndll
app/MyDLL.ndll64

For the iphone (which uses static libraries, not dynamic libraries) I
went with both in same directory: (device, & simulator)

iPhone/libstd.iphoneos.a
iPhone/libstd.iphonesim.a

The reason for this is that it is convenient to add both to your
xcode project.  The linker will choose the correct one depending
on target architecture.  Also, the xcode project does not normally
show the directory, so that can be a bit confusing.

Does neko address this issue?  Or it it 32 bit only.

Hugh


>> I've updated hxcpp on my Ubuntu 64, and the build process for a basic
>> "hello world" app goes a bit further, but it still stops with errors :
>>
>> /usr/local/haxe/lib/hxcpp/1,0,2//runtime/src/hxCFFI.cpp: In function
>> ‘void* val_to_kind(hxObject*, _vkind*)’:
>> /usr/local/haxe/lib/hxcpp/1,0,2//runtime/src/hxCFFI.cpp:118: erreur:
>> cast from ‘_vkind*’ to ‘int’ loses precision
>> /usr/local/haxe/lib/hxcpp/1,0,2//runtime/src/hxCFFI.cpp: In function
>> ‘hxObject* alloc_abstract(_vkind*, void*)’:
>> /usr/local/haxe/lib/hxcpp/1,0,2//runtime/src/hxCFFI.cpp:184: erreur:
>> cast from ‘_vkind*’ to ‘int’ loses precision
>> /usr/local/haxe/lib/hxcpp/1,0,2//runtime/src/hxCFFI.cpp: In function
>> ‘void kind_share(_vkind**, const char*)’:
>> /usr/local/haxe/lib/hxcpp/1,0,2//runtime/src/hxCFFI.cpp:556: erreur:
>> cast from ‘_vkind*’ to ‘int’ loses precision
> A side note to Hugh about 64 bit mode :
> "int" is still 32 bits so you cannot store pointers inside it. You can
> use "int_val" instead , as defined in neko.h

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

Re: hxcpp 1.0.2

jlm@justinfront.net
Hugh

> The reason for this is that it is convenient to add both to your
> xcode project.  The linker will choose the correct one depending
> on target architecture.  Also, the xcode project does not normally
> show the directory, so that can be a bit confusing

[quote]
If you’re writing a lot of Objective-C and find yourself annoyed by  
some of XCode’s quirks (such as how it handles documents and windows),  
you can skip XCode and use a real editor, such as TextMate. Dr. Nic  
has also published a TextMate bundle for editing Objective-C with  
excellent snippets and syntax highlighting. You can grab the bundle at http://github.com/drnic/objective-c-iphone-tmbundle 
.
[/quote]
see
http://www.linux-mag.com/cache/7368/1.html

( Obviously the bundle should work on e-texteditor, reducing the  
amount of mac only dependancy in the workflow. Also found http://www.cocotron.org/Info/ 
  )


On 28 Jul 2009, at 02:39, Hugh Sanderson wrote:

> Hi,
> In this particular case (vkind) I actually store a (32 bit) int
> in a pointer, so a simple truncating cast-to-int should be enough.
> But obviously gcc does not like my syntax.
> I think I will keep them as pointers everywhere - this will
> solve the problem easily.
>
> Libraries & dso created with 64 bit pointers (windows,lunux) are
> obviously not going to be compatible with 32 bit exe, so
> should we create a "Linux64" "Windows64" bin, or perhaps
> Linux/std.ndll64 or Linux/std64.ndll ?
> The latter might be a bit safer since it may prevent you from
> "accidentally" finding the wrong dll in a search path. ie,
> if you want to distribute 64bit and 32bit in the one directory:
>
> app/
> app/MyExe32
> app/MyExe64
> app/MyDLL.ndll
> app/MyDLL.ndll64   or   MyDLL64.ndll
>
> Or similary
>
> app/neko
> app/neko64
> app/neko.dso
> app/neko64.dso
> app/MyApp.n
> app/MyDLL.ndll
> app/MyDLL.ndll64
>
> For the iphone (which uses static libraries, not dynamic libraries) I
> went with both in same directory: (device, & simulator)
>
> iPhone/libstd.iphoneos.a
> iPhone/libstd.iphonesim.a
>
> The reason for this is that it is convenient to add both to your
> xcode project.  The linker will choose the correct one depending
> on target architecture.  Also, the xcode project does not normally
> show the directory, so that can be a bit confusing.
>
> Does neko address this issue?  Or it it 32 bit only.
>
> Hugh
>
>
>>> I've updated hxcpp on my Ubuntu 64, and the build process for a  
>>> basic
>>> "hello world" app goes a bit further, but it still stops with  
>>> errors :
>>>
>>> /usr/local/haxe/lib/hxcpp/1,0,2//runtime/src/hxCFFI.cpp: In function
>>> ‘void* val_to_kind(hxObject*, _vkind*)’:
>>> /usr/local/haxe/lib/hxcpp/1,0,2//runtime/src/hxCFFI.cpp:118: erreur:
>>> cast from ‘_vkind*’ to ‘int’ loses precision
>>> /usr/local/haxe/lib/hxcpp/1,0,2//runtime/src/hxCFFI.cpp: In function
>>> ‘hxObject* alloc_abstract(_vkind*, void*)’:
>>> /usr/local/haxe/lib/hxcpp/1,0,2//runtime/src/hxCFFI.cpp:184: erreur:
>>> cast from ‘_vkind*’ to ‘int’ loses precision
>>> /usr/local/haxe/lib/hxcpp/1,0,2//runtime/src/hxCFFI.cpp: In function
>>> ‘void kind_share(_vkind**, const char*)’:
>>> /usr/local/haxe/lib/hxcpp/1,0,2//runtime/src/hxCFFI.cpp:556: erreur:
>>> cast from ‘_vkind*’ to ‘int’ loses precision
>> A side note to Hugh about 64 bit mode :
>> "int" is still 32 bits so you cannot store pointers inside it. You  
>> can
>> use "int_val" instead , as defined in neko.h
>
> --
> haXe - an open source web programming language
> http://haxe.org


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

Re: hxcpp 1.0.2

Nicolas Cannasse
In reply to this post by Hugh Sanderson-2
Hugh Sanderson a écrit :
> Hi,
> In this particular case (vkind) I actually store a (32 bit) int
> in a pointer, so a simple truncating cast-to-int should be enough.
> But obviously gcc does not like my syntax.

In that case you need to do the following :

(int)(int_val)vkind

This will first turn the pointer into a 64 bit int, then truncate the
64bit int into a 32bit one. This will remove the GCC warning/error.

> The reason for this is that it is convenient to add both to your
> xcode project.  The linker will choose the correct one depending
> on target architecture.  Also, the xcode project does not normally
> show the directory, so that can be a bit confusing.
>
> Does neko address this issue?  Or it it 32 bit only.

I guess you should treat 64-bit as a different OS, so have files stored
into bin/Linux64/*.dso

The only issue left is to support 64-bit mode into haxe so it gives the
good search directory depending on the CPU. This is done in genneko by
generate_libs_init which adds to the neko search path the haxelib directory.

Nicolas

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

Re: hxcpp 1.0.2

Gamehaxe
In reply to this post by tong-2
Hi,
Yes, I will have to find the definitive list of keywords to remap.
This will have to wait for the 2.05 haxe release, since I
can't fix this in haxelib.

The TestRunner code just needs a "cpp" section in the print function, eg

#elseif cpp
    cpp.Lib.print(v);

This too will have to wait for 2.05

Hugh

> On Tue, 2009-07-28 at 00:49 +0800, Hugh Sanderson wrote:
>> Hi,
>> I have release a new version of hxccp/haxelib that hopefully should fix
>> the errors reported so far.
>
> hi,
>
> 2 bugs detected:
>
> * fields called 'namespace' throw an error, cause of keyword conflict
> (works on other platforms)
>
> * compling haxe.unit.TestRunner:
> gcc -c -fvisibility=hidden -O2 -DHX_LINUX
> -I/home/tong/haxelib/hxcpp/1,0,2//include -Iinclude
> -frtti ./src/haxe/unit/TestRunner.cpp
> -oobj/linux//src/haxe/unit/TestRunner.o
> ./src/haxe/unit/TestRunner.cpp: In member function ‘Void
> haxe::unit::<unnamed>::__default_print::run(Dynamic)’:
> ./src/haxe/unit/TestRunner.cpp:156: error: expected `;' before ‘return’
>
>
> /h
> 



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

Re: hxcpp 1.0.2

Gamehaxe
In reply to this post by jlm@justinfront.net
I'm not plannig on writing another line of Objective-C, now
the hxcpp target is working :)

> [quote]
> If you’re writing a lot of Objective-C ...

> of XCode’s quirks (such as how it handles documents and windows), you  
> can skip XCode and use a real editor, such as TextMate. Dr. Nic has also  
> published a TextMate bundle for editing Objective-C with excellent  
> snippets and syntax highlighting. You can grab the bundle at  
> http://github.com/drnic/objective-c-iphone-tmbundle.
> [/quote]
> see
> http://www.linux-mag.com/cache/7368/1.html
>
> ( Obviously the bundle should work on e-texteditor, reducing the amount  
> of mac only dependancy in the workflow. Also found  
> http://www.cocotron.org/Info/  )
>
>

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

Re: hxcpp 1.0.2

Gamehaxe
In reply to this post by clemos
Hi,
I *think* I have fixed this in the latest svn version.
You can test it from there, or wait for the next release.

Hugh

> Hi Hugh
>
> I've updated hxcpp on my Ubuntu 64, and the build process for a basic
> "hello world" app goes a bit further, but it still stops with errors :
>
> /usr/local/haxe/lib/hxcpp/1,0,2//runtime/src/hxCFFI.cpp: In function
> ‘void* val_to_kind(hxObject*, _vkind*)’:
> /usr/local/haxe/lib/hxcpp/1,0,2//runtime/src/hxCFFI.cpp:118: erreur:
> cast from ‘_vkind*’ to ‘int’ loses precision
> /usr/local/haxe/lib/hxcpp/1,0,2//runtime/src/hxCFFI.cpp: In function
> ‘hxObject* alloc_abstract(_vkind*, void*)’:
> /usr/local/haxe/lib/hxcpp/1,0,2//runtime/src/hxCFFI.cpp:184: erreur:
> cast from ‘_vkind*’ to ‘int’ loses precision
> /usr/local/haxe/lib/hxcpp/1,0,2//runtime/src/hxCFFI.cpp: In function
> ‘void kind_share(_vkind**, const char*)’:
> /usr/local/haxe/lib/hxcpp/1,0,2//runtime/src/hxCFFI.cpp:556: erreur:
> cast from ‘_vkind*’ to ‘int’ loses precision
>
> +++++++
> Clément
>
> On Mon, Jul 27, 2009 at 6:49 PM, Hugh Sanderson<[hidden email]>  
> wrote:
>>
>> Hi,
>> I have release a new version of hxccp/haxelib that hopefully should fix
>> the errors reported so far.  You can install the update with
>>
>> haxelib install hxcpp
>>
>> You may need to delete your generated "cpp" directory if you
>> have upgraded - although I think you should be ok if you do not.
>>
>> In testing I had a very strange problem on Linux where one
>> of the dso files appeared to be "tainted" in some way, and it
>> could not be loaded as a dso.  If I "mv" the file, the problem
>> remained, but if I "cp" the file, it works. I tried "chmod" and
>> "chown" to no effect.  I'm prepared to write this off as a
>> quirk of the unzip process, but if anyone either gets this
>> problem or knows the reason, please let me know.
>>
>> Hugh
>>
>> --
>> haXe - an open source web programming language
>> http://haxe.org
>>
>
> --
> haXe - an open source web programming language
> http://haxe.org



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

Re: hxcpp 1.0.2

tong-2
In reply to this post by Gamehaxe
On Tue, 2009-07-28 at 00:49 +0800, Hugh Sanderson wrote:


+ haxe.Template:

 -frtti ./src/haxe/Template.cpp -oobj/linux//src/haxe/Template.o
./src/haxe/Template.cpp: In member function ‘double
haxe::Template_obj::makeExpr2(List)::_Function_1::run()’:
./src/haxe/Template.cpp:555: error: ambiguous overload for ‘operator-’
in ‘-Dynamic::operator()()()’
./src/haxe/Template.cpp:555: note: candidates are: operator-(double)
<built-in>
./src/haxe/Template.cpp:555: note:                 operator-(int)
<built-in>


/t

--
[)   |   5   |<   †   |2   3   3


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

Re: hxcpp 1.0.2

Gamehaxe
Thanks,

I have patched the svn version, so you can update from that,
or wait unil the next release.

And to everyone, I appreciate the bug reports - keep them coming.
I hope to run out someday :)

Hugh


> On Tue, 2009-07-28 at 00:49 +0800, Hugh Sanderson wrote:
>
>
> + haxe.Template:
>
>  -frtti ./src/haxe/Template.cpp -oobj/linux//src/haxe/Template.o
> ./src/haxe/Template.cpp: In member function ‘double
> haxe::Template_obj::makeExpr2(List)::_Function_1::run()’:
> ./src/haxe/Template.cpp:555: error: ambiguous overload for ‘operator-’
> in ‘-Dynamic::operator()()()’
> ./src/haxe/Template.cpp:555: note: candidates are: operator-(double)
> <built-in>
> ./src/haxe/Template.cpp:555: note:                 operator-(int)
> <built-in>
>
>
> /t
>



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

Re: hxcpp 1.0.2

Robin Palotai
Some features I found so far. Sorry I don't include the haxe code or
trace back to a minimal example for now, maybe you'll just look at it
and know the solution. If not, I'll debug :)

1,
generated code:
....
struct _Function_1{
               static Pkg Block( NodeData &d)/* DEF (ret block)(not intern) */{
                  haxe::FastList_Pkg _g2 = d->pkgs;
                  haxe::FastCell_Pkg k = _g2->head;
                  struct _Function_2{
                     static Dynamic Block( haxe::FastList_Pkg
&_g2,haxe::FastCell_Pkg &k)/* DEF (ret block)(not intern) */{
                        _g2->head = k->next;
                        return k->elt;
                     }
                  };
                  return
                     k == null() ?
                     Void( null() ) :
//////
///// error on the next line. changed manually to
_Function_2::Block(_g2,k); and it worked (at least compiled)
///// error msg: null::null(Dynamic) not found, candidates...
/////
                     Void( _Function_2::Block(_g2,k) );
               }
            };

2,
I don't know the hx scenario, but in

int col = me[0]->dmod->g->nodes[k]->data->__Field(STRING(L"col",3));

i got the error message that hxObject has no field data. Changed it to:

int col = me[0]->dmod->g->nodes[k]->__Field(STRING(L"data",4))->__Field(STRING(L"col",3));

and it compiled.

3,
exp function missing from Math?

Thanks for the great work!
Robin

On Tue, Jul 28, 2009 at 2:54 PM, Hugh Sanderson<[hidden email]> wrote:

> Thanks,
>
> I have patched the svn version, so you can update from that,
> or wait unil the next release.
>
> And to everyone, I appreciate the bug reports - keep them coming.
> I hope to run out someday :)
>
> Hugh
>
>
>> On Tue, 2009-07-28 at 00:49 +0800, Hugh Sanderson wrote:
>>
>>
>> + haxe.Template:
>>
>>  -frtti ./src/haxe/Template.cpp -oobj/linux//src/haxe/Template.o
>> ./src/haxe/Template.cpp: In member function ‘double
>> haxe::Template_obj::makeExpr2(List)::_Function_1::run()’:
>> ./src/haxe/Template.cpp:555: error: ambiguous overload for ‘operator-’
>> in ‘-Dynamic::operator()()()’
>> ./src/haxe/Template.cpp:555: note: candidates are: operator-(double)
>> <built-in>
>> ./src/haxe/Template.cpp:555: note:                 operator-(int)
>> <built-in>
>>
>>
>> /t
>>
>
>
>
> --
> haXe - an open source web programming language
> http://haxe.org
>

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

hxcpp & mac

smailbox2005-mac
Hi, I have a little question for use hxcpp on OSX leopard.
I install hxcpp with haxelib and create a simple .hx file:

Text.hx:
class Test {
    static function main() {
        trace("Hello World !");
    }
}

When I try to compile with

haxe -cpp out -main Test

the procedure exit with these errors:

haxelib run hxcpp Build.xml haxe -Dcpp -Dhaxe_204 -Dtrue
Called from <null> line 1
Called from BuildTool.hx line 611
Called from BuildTool.hx line 292
Called from a C function
Called from BuildTool.hx line 315
Called from BuildTool.hx line 369
Uncaught exception - No compiler defined

I install the last version of haxe and I have installed xcode...
Many thanks
Daniel


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

Re: hxcpp & mac

jlm@justinfront.net
Hi I got exactly the same ( posted this in the 2.04 release thread ) I am also on Leopard.  I think we need to modify the build.xml to point to a compiler or linker or something but I am just guessing.

Cheers

;j

On 28 Jul 2009, at 22:16, [hidden email] wrote:

Hi, I have a little question for use hxcpp on OSX leopard.
I install hxcpp with haxelib and create a simple .hx file:

Text.hx:
class Test {
    static function main() {
        trace("Hello World !");
    }
}

When I try to compile with 

haxe -cpp out -main Test

the procedure exit with these errors:

haxelib run hxcpp Build.xml haxe -Dcpp -Dhaxe_204 -Dtrue
Called from <null> line 1
Called from BuildTool.hx line 611
Called from BuildTool.hx line 292
Called from a C function
Called from BuildTool.hx line 315
Called from BuildTool.hx line 369
Uncaught exception - No compiler defined

I install the last version of haxe and I have installed xcode...
Many thanks
Daniel

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


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

Re: hxcpp & mac

Gamehaxe
Hi,
I'm pretty sure it is to do with the OS identification.
I think it is looking for "darwin", I have not checked leopard.

I small change to "BuildTool.hx" is probably in order.

You could try setting the environment variable (depending on shell)
setenv  OSTYPE darwin
or
export OSTYPE = darwin (I think ?)

and see if you can "trick" it into using the darwin compiler
(which is just gcc).

I can look at better solution later.

Hugh


> Hi I got exactly the same ( posted this in the 2.04 release thread ) I
> am also on Leopard.  I think we need to modify the build.xml to point
> to a compiler or linker or something but I am just guessing.
>
> Cheers
>
> ;j
>
> On 28 Jul 2009, at 22:16, [hidden email] wrote:
>
>> Hi, I have a little question for use hxcpp on OSX leopard.
>> I install hxcpp with haxelib and create a simple .hx file:
>>
>> Text.hx:
>> class Test {
>>     static function main() {
>>         trace("Hello World !");
>>     }
>> }
>>
>> When I try to compile with
>>
>> haxe -cpp out -main Test
>>
>> the procedure exit with these errors:
>>
>> haxelib run hxcpp Build.xml haxe -Dcpp -Dhaxe_204 -Dtrue
>> Called from <null> line 1
>> Called from BuildTool.hx line 611
>> Called from BuildTool.hx line 292
>> Called from a C function
>> Called from BuildTool.hx line 315
>> Called from BuildTool.hx line 369
>> Uncaught exception - No compiler defined
>>
>> I install the last version of haxe and I have installed xcode...
>> Many thanks
>> Daniel
>>
>> --
>> haXe - an open source web programming language
>> http://haxe.org
>



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

Re: hxcpp & mac

Benjamin Dasnois
Note that when setting a variable in bash one should NOT put
whitespaces around the equal sign ( = ) because bash won't correctly
understand it and will complain.

On Wed, Jul 29, 2009 at 2:10 AM, Hugh Sanderson<[hidden email]> wrote:

> Hi,
> I'm pretty sure it is to do with the OS identification.
> I think it is looking for "darwin", I have not checked leopard.
>
> I small change to "BuildTool.hx" is probably in order.
>
> You could try setting the environment variable (depending on shell)
> setenv  OSTYPE darwin
> or
> export OSTYPE = darwin (I think ?)
>
> and see if you can "trick" it into using the darwin compiler
> (which is just gcc).
>
> I can look at better solution later.
>
> Hugh
>
>
>> Hi I got exactly the same ( posted this in the 2.04 release thread ) I
>> am also on Leopard.  I think we need to modify the build.xml to point
>> to a compiler or linker or something but I am just guessing.
>>
>> Cheers
>>
>> ;j
>>
>> On 28 Jul 2009, at 22:16, [hidden email] wrote:
>>
>>> Hi, I have a little question for use hxcpp on OSX leopard.
>>> I install hxcpp with haxelib and create a simple .hx file:
>>>
>>> Text.hx:
>>> class Test {
>>>    static function main() {
>>>        trace("Hello World !");
>>>    }
>>> }
>>>
>>> When I try to compile with
>>>
>>> haxe -cpp out -main Test
>>>
>>> the procedure exit with these errors:
>>>
>>> haxelib run hxcpp Build.xml haxe -Dcpp -Dhaxe_204 -Dtrue
>>> Called from <null> line 1
>>> Called from BuildTool.hx line 611
>>> Called from BuildTool.hx line 292
>>> Called from a C function
>>> Called from BuildTool.hx line 315
>>> Called from BuildTool.hx line 369
>>> Uncaught exception - No compiler defined
>>>
>>> I install the last version of haxe and I have installed xcode...
>>> Many thanks
>>> Daniel
>>>
>>> --
>>> haXe - an open source web programming language
>>> http://haxe.org
>>
>
>
>
> --
> haXe - an open source web programming language
> http://haxe.org
>



--
DASNOIS Benjamin
http://www.benjamindasnois.com

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

Re: hxcpp & mac

Baluta Cristian
i modified the line 551 from BuildTool.hx from haxe/lib/hxcpp/1,0,2/build-tool/ with: var os = "darwin";//neko.Sys.getEnv("OSTYPE");
but is not working. in fact, if i delete the entire content of this file is giving me the same error.


On Wed, Jul 29, 2009 at 3:50 AM, Benjamin Dasnois <[hidden email]> wrote:
Note that when setting a variable in bash one should NOT put
whitespaces around the equal sign ( = ) because bash won't correctly
understand it and will complain.

On Wed, Jul 29, 2009 at 2:10 AM, Hugh Sanderson<[hidden email]> wrote:
> Hi,
> I'm pretty sure it is to do with the OS identification.
> I think it is looking for "darwin", I have not checked leopard.
>
> I small change to "BuildTool.hx" is probably in order.
>
> You could try setting the environment variable (depending on shell)
> setenv  OSTYPE darwin
> or
> export OSTYPE = darwin (I think ?)
>
> and see if you can "trick" it into using the darwin compiler
> (which is just gcc).
>
> I can look at better solution later.
>
> Hugh
>
>
>> Hi I got exactly the same ( posted this in the 2.04 release thread ) I
>> am also on Leopard.  I think we need to modify the build.xml to point
>> to a compiler or linker or something but I am just guessing.
>>
>> Cheers
>>
>> ;j
>>
>> On 28 Jul 2009, at 22:16, [hidden email] wrote:
>>
>>> Hi, I have a little question for use hxcpp on OSX leopard.
>>> I install hxcpp with haxelib and create a simple .hx file:
>>>
>>> Text.hx:
>>> class Test {
>>>    static function main() {
>>>        trace("Hello World !");
>>>    }
>>> }
>>>
>>> When I try to compile with
>>>
>>> haxe -cpp out -main Test
>>>
>>> the procedure exit with these errors:
>>>
>>> haxelib run hxcpp Build.xml haxe -Dcpp -Dhaxe_204 -Dtrue
>>> Called from <null> line 1
>>> Called from BuildTool.hx line 611
>>> Called from BuildTool.hx line 292
>>> Called from a C function
>>> Called from BuildTool.hx line 315
>>> Called from BuildTool.hx line 369
>>> Uncaught exception - No compiler defined
>>>
>>> I install the last version of haxe and I have installed xcode...
>>> Many thanks
>>> Daniel
>>>
>>> --
>>> haXe - an open source web programming language
>>> http://haxe.org
>>
>
>
>
> --
> haXe - an open source web programming language
> http://haxe.org
>



--
DASNOIS Benjamin
http://www.benjamindasnois.com

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



--
Băluță Cristian
http://ralcr.com
http://imagin.ro

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

Re: hxcpp & mac

Hugh Sanderson-2
In reply to this post by smailbox2005-mac
I should have mentioned that you should build this file with
haxe Compile.hxml
in the build-tools directory to create the "hxcpp/run.n" file.

Another thing you could try is adding "-D macos" to
your haxe command line.  This will get passed through to the
build-tool command line and possibly help.

For the record, could you  please

echo $OSTYPE

for me.

Thanks,

Hugh

> i modified the line 551 from BuildTool.hx from
> haxe/lib/hxcpp/1,0,2/build-tool/ with: var os =
> "darwin";//neko.Sys.getEnv("OSTYPE");but is not working. in fact, if
> i delete the entire content of this file is giving me the same error.
>

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

Re: hxcpp & mac

Baluta Cristian
after i set the env var with the previous command i get: darwin9.0
i've compiled the BuildTool with the modification from the previous post and is working, thanks.

textmate returns:

compile: /Users/Cristi/Documents/hxcpp/compile.hxml
haxelib run hxcpp Build.xml haxe -Dcpp -Dhaxe_204 -Dtrue

and i get an unix executable which opens me the terminal and prints what i trace. 


can you assist me further and tell me what i have to do in order to compile for the iPhone? or what kind of application can i do with hxcpp, how do i get an .app?

Thanks.


On Wed, Jul 29, 2009 at 7:41 AM, Hugh Sanderson <[hidden email]> wrote:
I should have mentioned that you should build this file with
haxe Compile.hxml
in the build-tools directory to create the "hxcpp/run.n" file.

Another thing you could try is adding "-D macos" to
your haxe command line.  This will get passed through to the
build-tool command line and possibly help.

For the record, could you  please

echo $OSTYPE

for me.

Thanks,

Hugh


i modified the line 551 from BuildTool.hx from
haxe/lib/hxcpp/1,0,2/build-tool/ with: var os =
"darwin";//neko.Sys.getEnv("OSTYPE");but is not working. in fact, if
i delete the entire content of this file is giving me the same error.


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



--
Băluță Cristian
http://ralcr.com
http://imagin.ro

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