Re: [Rd] Problem using ofstream in C++ class in package for MacOS X

2007-02-09 Thread cstrato
Dear Kasper Thank you, but I want to keep the focus on my own problem (I can indeed compile your package). Since I do not have an url, I would like to attach my package, so that people could try it. In my initial mailing I have attached my package as MyClass_0.1.2.tar.gz, but it got scrambled

Re: [Rd] Problem using ofstream in C++ class in package for MacOS X

2007-02-09 Thread Kasper Daniel Hansen
I have some experience wrapping code from Affymetrix in R (see the affxparser package). Depending on who actually wrote the package, you may find that it is not trivial to get it to work on different platforms. They are not always carefully to think about different compilers etc. You may w

[Rd] Problem using ofstream in C++ class in package for MacOS X

2007-02-09 Thread cstrato
Dear Ross Thank you for this clarification, maybe there is something misconfigured on my Intel-Mac. BTW, I have now upgraded to XCode 2.4.1 from 2.4, but the result remains the same. I don´t know if this could help clarify what might be wrong, but I am not able to compile plier, a simple pack

Re: [Rd] Problem using ofstream in C++ class in package for MacOS X

2007-02-08 Thread Paul Roebuck
On Thu, 8 Feb 2007, Ross Boylan wrote: > On Thu, Feb 08, 2007 at 11:53:21PM +0100, cstrato wrote: > ... > > >Maybe there's some subtle linker problem, or a problem with the > > >representation of strings > > > > What do you mean with linker problem? > > > Nothing very specific, but generically wro

Re: [Rd] Problem using ofstream in C++ class in package for MacOS X

2007-02-08 Thread Ross Boylan
On Thu, Feb 08, 2007 at 11:53:21PM +0100, cstrato wrote: ... > >Maybe there's some subtle linker problem, or a problem with the > >representation of strings > > > > > > > What do you mean with linker problem? > Nothing very specific, but generically wrong options, wrong objects/libraries, or wro

Re: [Rd] Problem using ofstream in C++ class in package for MacOS X

2007-02-08 Thread cstrato
Ross Boylan wrote: > On Thu, Feb 08, 2007 at 10:04:14PM +0100, cstrato wrote: > >> Ross Boylan wrote: >> >>> On Sun, Feb 04, 2007 at 10:47:37PM +0100, cstrato wrote: >>> >>> Seth Falcon wrote: > cstrato <[EMAIL PROTECTED]> writes: > >

Re: [Rd] Problem using ofstream in C++ class in package for MacOS X

2007-02-08 Thread Ross Boylan
On Thu, Feb 08, 2007 at 10:04:14PM +0100, cstrato wrote: > Ross Boylan wrote: > >On Sun, Feb 04, 2007 at 10:47:37PM +0100, cstrato wrote: > > > >>Seth Falcon wrote: > >> > >>>cstrato <[EMAIL PROTECTED]> writes: > >>> > >>> > Thank you for your fast answer. > Sorrowly, I don´t

Re: [Rd] Problem using ofstream in C++ class in package for MacOS X

2007-02-08 Thread cstrato
Ross Boylan wrote: > On Sun, Feb 04, 2007 at 10:47:37PM +0100, cstrato wrote: > >> Seth Falcon wrote: >> >>> cstrato <[EMAIL PROTECTED]> writes: >>> >>> Thank you for your fast answer. Sorrowly, I don´t know how to use a debugger on MacOS X, I am using old-style pr

Re: [Rd] Problem using ofstream in C++ class in package for MacOS X

2007-02-08 Thread Ross Boylan
On Sun, Feb 04, 2007 at 10:47:37PM +0100, cstrato wrote: > Seth Falcon wrote: > > cstrato <[EMAIL PROTECTED]> writes: > > > >> Thank you for your fast answer. > >> Sorrowly, I don´t know how to use a debugger on MacOS X, I am using > >> old-style print commands. > >> > > > > You should be

Re: [Rd] Problem using ofstream in C++ class in package for MacOS X

2007-02-05 Thread cstrato
Dear Jochen Thank you, there seems to be a problem with accessing memory but probably not in my simple program. Here are the essential parts: 1. R-function: "writeFileCpp" <- function(outfile=character(0)) { r <- .C("WriteFileCpp",as.character(outfile), PACKAGE="MyClass"); return(); } 2.

Re: [Rd] Problem using ofstream in C++ class in package for MacOS X

2007-02-04 Thread cstrato
Seth Falcon wrote: > cstrato <[EMAIL PROTECTED]> writes: > >> Thank you for your fast answer. >> Sorrowly, I don´t know how to use a debugger on MacOS X, I am using >> old-style print commands. >> > > You should be able to use gdb on OS X (works for me, YMMV). So you > could try: > >

Re: [Rd] Problem using ofstream in C++ class in package for MacOS X

2007-02-04 Thread cstrato
Dirk Eddelbuettel wrote: > On 4 February 2007 at 21:20, cstrato wrote: > | Thank you for your fast answer. > | Sorrowly, I don´t know how to use a debugger on MacOS X, I am using > | old-style print commands. > | However, here is the output of the crash log from my Mac. Does it help? > > Not me. I

Re: [Rd] Problem using ofstream in C++ class in package for MacOS X

2007-02-04 Thread Seth Falcon
cstrato <[EMAIL PROTECTED]> writes: > Thank you for your fast answer. > Sorrowly, I don´t know how to use a debugger on MacOS X, I am using > old-style print commands. You should be able to use gdb on OS X (works for me, YMMV). So you could try: R -d gdb run # source a script

Re: [Rd] Problem using ofstream in C++ class in package for MacOS X

2007-02-04 Thread Dirk Eddelbuettel
On 4 February 2007 at 21:20, cstrato wrote: | Thank you for your fast answer. | Sorrowly, I don´t know how to use a debugger on MacOS X, I am using | old-style print commands. | However, here is the output of the crash log from my Mac. Does it help? Not me. I barely know what Mac OS X is, and ne

Re: [Rd] Problem using ofstream in C++ class in package for MacOS X

2007-02-04 Thread cstrato
Dirk Eddelbuettel wrote: > On 4 February 2007 at 20:17, cstrato wrote: > | I am currently learning how to create R packages using C++ classes. > > Congratulations :) > > [ This reminds me to email Oleg (CC'ed). Oleg, your HOWTO is a very useful. > Would you consider adding a section on Dominick

Re: [Rd] Problem using ofstream in C++ class in package for MacOS X

2007-02-04 Thread Dirk Eddelbuettel
On 4 February 2007 at 20:17, cstrato wrote: | I am currently learning how to create R packages using C++ classes. Congratulations :) [ This reminds me to email Oleg (CC'ed). Oleg, your HOWTO is a very useful. Would you consider adding a section on Dominick's most excellent RcppTemplate packa

[Rd] Problem using ofstream in C++ class in package for MacOS X

2007-02-04 Thread cstrato
Dear all, I am currently learning how to create R packages using C++ classes. For this purpose I have written a small package MyClass (which I try to attach since I do not have access to a website). MyClass has methods WriteFileC() and WriteFileCpp() which implement C-style and C++-style writing