Solved

Need main defined when linking ActiveX control?

Posted on 1998-09-22
1
183 Views
Last Modified: 2010-08-05
I've written an ActiveX control (Visual C++ 5.0, Windows NT) and it compiles and links fine in the debug version. But when I try to link the release version the linker claims the symbol __main is undefined (reference from LIBC.lib(crt0.obj)). Any idea what is going on? I don't think I need to define a main procedure in an ActiveX control, do I?
0
Comment
Question by:webb
1 Comment
 
LVL 3

Accepted Solution

by:
xyu earned 200 total points
ID: 1173466
It's known problem if You link with libc.lib (e.g. You want to use static single threaded run-time) You can easily solve it by adding  "void main() {}" into any of Your cpp file. It never be called anyway... Or You can solve it by using other Run-time libs like Multithreaded DLL... but adding void main().. is most simple amd effcctive solution...
Good luck
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
getting a fire fox page (view page source ) in c++ 6 42
C++ standard library based binary archive format 6 91
C++ question 3 62
How to convert MFC::CString to UTF8 wchar_t* 10 142
Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

910 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now