Solved

Compile error with VC++ 6.0

Posted on 2000-03-03
4
182 Views
Last Modified: 2010-04-10
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
Comment
Question by:didou
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 2

Expert Comment

by:tdubroff
ID: 2581982
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
 
LVL 32

Expert Comment

by:jhance
ID: 2582009
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
 

Author Comment

by:didou
ID: 2588321
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
 

Accepted Solution

by:
werlwind earned 50 total points
ID: 2650720
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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question