April 27, 2024, 01:23:45 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Conversion Problem

Started by bevets, January 13, 2007, 12:48:02 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bevets

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

Parker

It sounds like something already imported that function. Does using an alias work? (I don't have EB)

Ionic Wind Support Team

Works here under a stock install.  Are you including any other files?
Ionic Wind Support Team

bevets

@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

Ionic Wind Support Team

Did you perchance try and install any pak files to the ebasic installation directory?  the .incc files are different.

Ionic Wind Support Team

bevets

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

Ionic Wind Support Team

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.
Ionic Wind Support Team