[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 185
  • Last Modified:

Compile error with VC++ 6.0

When compiling my ocx I get:

error LNK2001: unresolved external symbol "long __cdecl APP_OpenAPP(long)" (?APP_OpenAPP@@YAJJ@Z)

My ocx is calling a dll that has function APP_OpenApp.

Any leads?

Didou

0
didou
Asked:
didou
1 Solution
 
tdubroffCommented:
Looks like your linker is looking for the function from its local .obj files.  

I'm not sure at all about this, but I think, sometimes .lib's exist for certain .dll's that somehow tell the linker that the function is located in a .dll so it doesn't have to freak out about it.
0
 
jhanceCommented:
THIS IS A DUPLICATE QUESTION!

For some reason this guy keeps posting this question.  It looks like it's up to 4 posts now.
0
 
didouAuthor Commented:
I certainly did not meant to be abnoxiouz and send it so many time!
I don't know why it was posted
so many time!

How do I delete the question and
reclaim my points?

Thanks,
Didou
0
 
werlwindCommented:
It looks to me like a C++ name mangling issue.  Generally when calling DLL functions from withing C++ you want to make sure that the DLL function declaration in the header file is declared as extern "C", for example:

extern "C"
{
   long App_OpenApp(long);
}

Or something similar.  This will prevent C++ from modifying the function name internally as it normally does.

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now