1

Topic: Entry point in library

Prompt how to organize the program and compilation that the entry point in the program was in library, as in MFC. In application MFC the entry point in the program is somewhere in bowels MFC! (I.e. in the decision there are two projects: executed exe and static library lib. Entry point I want to place in lib. Whether it is possible?) VS2015, Win7 thanks.

2

Re: Entry point in library

Hello, Vladimir, you wrote: V> Prompt how to organize the program and compilation that the entry point in the program was in library, as in MFC. In application MFC the entry point in the program is somewhere in bowels MFC! V> (I.e. in the decision there are two projects: executed exe and static library lib. Entry point I want to place in lib. Whether it is possible?) V> VS2015, Win7 not absolutely I understand. What hinders main to allocate in library?

3

Re: Entry point in library

Hello, Went, you wrote: W> Not absolutely I understand. What hinders main to allocate in library? Placed in library: extern "C" int APIENTRY _tWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) {...} the compiler Message: error LNK2019: the link to the unsolved exterior character _WinMain@16 in function "int __ cdecl Intuitively I understand that the entry point is necessary for defining somewhere in project tinctures. Only where and as!

4

Re: Entry point in library

Hello, Vladimir, you wrote: V> Hello, Went, you wrote: W>> Not absolutely I understand. What hinders main to allocate in library? V> placed in library: V> extern "C" V> int APIENTRY _tWinMain (V> HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) V> {V>... V>} V> the compiler Message: V> error LNK2019: the link to the unsolved exterior character _WinMain@16 in function "int __ cdecl V> Intuitively I understand that the entry point is necessary for defining somewhere in project tinctures. V> only where and as! Does not confuse that _tWinMain and WinMain it is a bit different names?

5

Re: Entry point in library

Hello, kov_serg, you wrote: _> does not confuse that _tWinMain and WinMain it is a bit different names? At all does not confuse. #define _tWinMain wWinMain//in tchar.h

6

Re: Entry point in library

Hello, Vladimir, you wrote: V> Hello, kov_serg, you wrote: _>> does not confuse that _tWinMain and WinMain it is a bit different names? V> at all does not confuse. V>#define _tWinMain wWinMain//in tchar.h simply check up a name in that library which submit on an input . It is possible hands. This name coincides?

7

Re: Entry point in library

Hello, Vladimir, you wrote: V> Hello, kov_serg, you wrote: _>> does not confuse that _tWinMain and WinMain it is a bit different names? V> at all does not confuse. V>#define _tWinMain wWinMain//in tchar.h wWinMain and WinMain too different names. And that that  wants WinMain in any way does not confuse?

8

Re: Entry point in library

Hello, Vladimir, you wrote: V> Prompt how to organize the program and compilation that the entry point in the program was in library, as in MFC. In application MFC the entry point in the program is somewhere in bowels MFC! wxWidgets. In it main hid somewhere in library, but not in lib, and in what that a macro (picked for a long time, now I do not remember). Hello World on wxWidgets.