extern (C) private linking issue
William R. DeVore
quartz13163 at distanthumans.org
Sun Feb 25 20:33:25 PST 2007
I am running into an issue under windows during linking.
I am getting an optlink error based on a private function in a module:
[quote]
C:\Working\D1.0\Derelict228\examples\graphical>build @simulation -full
Using Double Precision
OPTLINK (R) for Win32 Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved
Simulations\CylBoxSlide.obj(CylBoxSlide) Offset 01494H Record Type 00C3
Error 1: Previous Definition Different : _collisionCallback
[/quote]
File CylVsSphere.d has:
[code]
extern (C) private void collisionCallback(void* data, dGeomID o1, dGeomID o2) {
...
}
[/code]
and
CylBoxSlide.d has:
[code]
extern (C) private void collisionCallback(void* data, dGeomID o1, dGeomID o2) {
...
}
[/code]
Doesn't the private attribute hide the functions?
These modules are imported in a factory module (SimFactory.d) as so:
[code]
module Simulations.SimFactory;
import Simulations.ISimulation;
import Simulations.CylVsSphere;
import Simulations.CylBoxSlide;
...
[/code]
Linux linker respects the scope but window doesn't. I am using dmd 1.007
Any suggestions? Should I submit a bugzilla?
I really don't want to have a unique name for each collision callback function inside a module if I can avoid it.
Thks.
-Will (Quartz) quartz13163 at distanthumans dot info
More information about the Digitalmars-d
mailing list