IonicWind Software

IWBasic => General Questions => Topic started by: bevets on January 13, 2007, 12:48:02 PM

Title: Conversion Problem
Post by: bevets on January 13, 2007, 12:48:02 PM
Hi, all
Trying to convert some IBPro code to EBasic the code compiles with IBPro.

Near the top of the code i have

Declare CDECL Extern _memcpy(dst:Pointer,src:Pointer,length:UInt)

When compiled under EBasic it says 'Duplicate Declaration' then goes on to say where i call it that it has 'wrong number of parameters'

Tried commenting out the Declare above but still get 'wrong number of parameters'

Steve
Title: Re: Conversion Problem
Post by: Parker on January 13, 2007, 01:00:31 PM
It sounds like something already imported that function. Does using an alias work? (I don't have EB)
Title: Re: Conversion Problem
Post by: Ionic Wind Support Team on January 13, 2007, 01:58:48 PM
Works here under a stock install.  Are you including any other files?
Title: Re: Conversion Problem
Post by: bevets on January 13, 2007, 03:46:01 PM
@Parker, Using the Alias worked.

Declare CDECL Extern __memcpy Alias _memcpy(dst:Pointer,src:Pointer,length:UInt)

@Paul, nothing else is included.
I also have these on the following lines but they don't cause a problem.

Declare CDECL Extern _memset(dst:Pointer,value:Char,count:UInt)
Declare CDECL Extern _sprintf(dst:String,format:String,...)

Steve
Title: Re: Conversion Problem
Post by: Ionic Wind Support Team on January 13, 2007, 04:27:52 PM
Did you perchance try and install any pak files to the ebasic installation directory?  the .incc files are different.

Title: Re: Conversion Problem
Post by: bevets on January 13, 2007, 05:19:26 PM
Quote from: Paul Turley on January 13, 2007, 04:27:52 PM
Did you perchance try and install any pak files to the ebasic installation directory?  the .incc files are different.

I did but i also removed it and still had the same problem. Didn't have any other problems using the commands from the pak (so far) and scanned the files looking for where _memcpy was declared and only found it in the above source code.

Are paks going to be supported by ebasic ?

Steve
Title: Re: Conversion Problem
Post by: Ionic Wind Support Team on January 13, 2007, 06:20:34 PM
Just narrowing it down is all.  The Emergence library doesn't use memcpy from the C runtime, but I do use RTLMoveMemory from the Windows API.  Just looking for possible conflicts.

Paul.