www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - strlen, strcpy, etc errors when trying to link an object

reply "irtcupc" <irtcupc aczv.no> writes:
Hello, I try to link an object file under win32, the format is ok 
(omf), i haven't yet started to write the di interface (it exists 
in a c H file that i'll translate) that a simple compilation try 
gives me:

---
  C:\...\myObj.obj(myObj)
  Error 42: Symbol Undefined strlen
  C:\...\myObj.obj(myObj)
  Error 42: Symbol Undefined strcpy
  C:\...\myObj.obj(myObj)
  Error 42: Symbol Undefined strcmp
  C:\...\myObj.obj(myObj)
  Error 42: Symbol Undefined memset
  C:\...\myObj.obj(myObj)
  Error 42: Symbol Undefined sprintf
---

It looks like the object wants some things coming from snn...

the command line looks like:

---
dmd app.d myObj.di myObj.obj
---

How can i "tell" the obj to use the matching snn function ?
Feb 01 2015
parent reply "irtcupc" <irtcupc aczv.no> writes:
On Sunday, 1 February 2015 at 18:19:54 UTC, irtcupc wrote:
 Hello, I try to link an object file under win32, the format is 
 ok (omf), i haven't yet started to write the di interface (it 
 exists in a c H file that i'll translate) that a simple 
 compilation try gives me:

 ---
  C:\...\myObj.obj(myObj)
  Error 42: Symbol Undefined strlen
  C:\...\myObj.obj(myObj)
  Error 42: Symbol Undefined strcpy
  C:\...\myObj.obj(myObj)
  Error 42: Symbol Undefined strcmp
  C:\...\myObj.obj(myObj)
  Error 42: Symbol Undefined memset
  C:\...\myObj.obj(myObj)
  Error 42: Symbol Undefined sprintf
 ---

 It looks like the object wants some things coming from snn...

 the command line looks like:

 ---
 dmd app.d myObj.di myObj.obj
 ---

 How can i "tell" the obj to use the matching snn function ?
No reason not to be more accurate: http://www.beaengine.org/downloads 1/ get the win32 zip file. 2/ the folder \Win32\Delphi contains the OMF object (Delphi doesnt matter here, the gui has called to folder like this because he thought Delphi is the only compilo to still use OMF ;) ) 3/ simply try to link with a dummy d source containing a main()
 dmd dummy.d BeaEngineLib.obj
A few years ago i used it in a Pascal app and i could define the involved functions but here, dmd will complain about ... Error 1: Previous Definition Different : _strlen
Feb 01 2015
parent reply ketmar <ketmar ketmar.no-ip.org> writes:
On Sun, 01 Feb 2015 18:34:01 +0000, irtcupc wrote:

did you build BeaEngine with dmc? if not, try to rebuild with dmc=20
compiler.=
Feb 01 2015
parent "irtcupc" <irtcupc nowhere.fi> writes:
On Monday, 2 February 2015 at 05:30:04 UTC, ketmar wrote:
 On Sun, 01 Feb 2015 18:34:01 +0000, irtcupc wrote:

 did you build BeaEngine with dmc? if not, try to rebuild with 
 dmc
 compiler.
It has worked, compiled with dmc, __IBMCPP__ compatibility mode, thx for pointing me out the idea.
Feb 02 2015