why can't the linker resolve the overloads?

  • Thread starter Thread starter clintmiller
  • Start date Start date
C

clintmiller

here's the header:
#pragma once

using namespace System;

#define MapCascadeError(CasErrorEnum) \
static GeometryException* MapError(CasErrorEnum error, String*
message, Exception* innerException); \
static GeometryException* MapError(CasErrorEnum error, String*
message) { return MapError(error, message, NULL); } \
static GeometryException* MapError(CasErrorEnum error) { return
MapError(error, String::Empty); } \

public __gc class GeometryExceptionBuilder
{
public:
MapCascadeError(BRepBuilderAPI_EdgeError)
MapCascadeError(BRepBuilderAPI_WireError)
MapCascadeError(BRepBuilderAPI_FaceError)

private:
GeometryExceptionBuilder() { }

static GeometryException* ConstructException(String* message, String*
mappedDetails, Exception* innerException);
};

here's the source://
*********************************************************************************
// BRepBuilderAPI_EdgeError mapping
//
*********************************************************************************
GeometryException*
GeometryExceptionBuilder::MapError(BRepBuilderAPI_EdgeError error,
String* message, Exception* innerException)
{ .... }

it includes an implementation like the above for each mapping described
in the header as well as the implementation of the of the
ConstructException method (in other words, everthing the class needs to
compile). and compile it does (successfully)

however, come link time, here's what i get:

LINK : error LNK2020: unresolved token (060008D5)
GeometryExceptionBuilder::MapError
LINK : error LNK2020: unresolved token (060008D8)
GeometryExceptionBuilder::MapError
LINK : fatal error LNK1120: 2 unresolved externals

if the linker is unable to resolve the overload, i can't see why. does
anyone have any insight?

thank you!
 
Back
Top