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