]>
Commit | Line | Data |
---|---|---|
1 | /* | |
2 | * File: dummy.cc | |
3 | * Purpose: See below | |
4 | * Author: Julian Smart | |
5 | * Created: 1993 | |
6 | * Updated: | |
7 | * Copyright: (c) 1993, AIAI, University of Edinburgh | |
8 | */ | |
9 | ||
10 | /* static const char sccsid[] = "@(#)dummy.cc 1.2 5/9/94"; */ | |
11 | ||
12 | /* A dummy file to include wx.h. If precompiling wx.h, I | |
13 | * always start by compiling this and producing the PCH file. | |
14 | * Then subsequent source files use the PCH file. | |
15 | * | |
16 | * If precompiling wx.h for wxWindows and derived apps, | |
17 | * link dummy.obj with your program (the MSC 7 linker complains otherwise). | |
18 | * | |
19 | * This is the only convenient way I found to use precompiled headers | |
20 | * under MSC 7. | |
21 | * | |
22 | * This will produce a big PCH file. | |
23 | */ | |
24 | ||
25 | ||
26 | ||
27 | #if defined(__BORLANDC__) | |
28 | #if !(defined(__WIN32__) || defined(__NT__) || defined(__WIN32__)) | |
29 | #pragma hdrfile "c:\wx\src\msw\wx.pch" | |
30 | #endif | |
31 | ||
32 | #pragma hdrstart | |
33 | #endif | |
34 | ||
35 | #include "wx/wxprec.h" | |
36 | #include "windows.h" | |
37 | ||
38 | #ifdef __BORLANDC__ | |
39 | #pragma hdrstop | |
40 | #endif | |
41 | ||
42 | // Foils optimizations in Visual C++ (see also app.cpp). Without it, | |
43 | // dummy.obj isn't linked and we get a linker error. | |
44 | #if defined(_MSC_VER) && defined(__WIN16__) | |
45 | char wxDummyChar=0; | |
46 | #endif | |
47 | ||
48 | #if defined(WXUSINGDLL) | |
49 | ||
50 | // NT defines APIENTRY, 3.x not | |
51 | #if !defined(APIENTRY) | |
52 | #define APIENTRY FAR PASCAL | |
53 | #endif | |
54 | ||
55 | #ifdef __WATCOMC__ | |
56 | int PASCAL | |
57 | #else | |
58 | int APIENTRY | |
59 | #endif | |
60 | ||
61 | WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR m_lpCmdLine, | |
62 | int nCmdShow ) | |
63 | { | |
64 | return wxEntry((WXHINSTANCE) hInstance, (WXHINSTANCE) hPrevInstance, m_lpCmdLine, nCmdShow); | |
65 | } | |
66 | #endif | |
67 | ||
68 |