⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 install-msw.txt

📁 A*算法 A*算法 A*算法 A*算法A*算法A*算法
💻 TXT
📖 第 1 页 / 共 3 页
字号:
same alignment, or you could experience mysterious crashes. To
change the alignment, change CPPFLAGS in build\msw\config.bcc.

Note (2): if you get undefined _SQL... symbols at link time,
either install odbc32.lib from the BC++ CD-ROM into your BC++ lib
directory, or set wxUSE_ODBC to 0 in include\wx\msw\setup.h and
recompile wxWidgets. The same applies if compiling using the IDE.

Note (3): If you wish debug messages to be sent to the console in
debug mode, edit makefile.bcc and change /aa to /Tpe in link commands.

Compiling using the IDE files for Borland C++ 5.0: not supported - please
use version 2.4.1 (using the make utility in commandline mode works fine_

Compiling using CBuilder (v1-v6): not supported - please
use version 2.4.1 (using the make utility in commandline mode works fine_

** REMEMBER **

In all of your wxWidgets applications, your source code should include
the following preprocessor directive:

#ifdef __BORLANDC__
#pragma hdrstop
#endif

(check the samples -- e.g., \wx2\samples\minimal\minimal.cpp -- for
more details)

Borland 16 Bit compilation for Windows 3.1
----------------------------------------------------------------

The last version of wxWidgets to support 16-bit compilation with Borland was
2.2.7 - Please download and read the instructions in that release

Watcom C++ 10.6/11 and OpenWatcom compilation
----------------------------------------------------------------

1. Change directory to build\msw. Type 'wmake -f makefile.wat' to
   make the wxWidgets core library.

2. Change directory to samples\minimal and type 'wmake -f makefile.wat'
   to make this sample. Repeat for other samples of interest.

Note (1): if your installation of Watcom doesn't have odbc32.lib file and
          you need it (i.e. you have wxUSE_ODBC=1), you can use the file
          from lib\watcom directory. See the notes in that directory.

Note (2): if variant.cpp is compiled with date/time class options, the linker
          gives up. So the date/time option is switched off for Watcom C++.
          Also, wxAutomationObject is not compiled with Watcom C++ 10.

Note (3): RawBitmaps won't work at present because they use unsupported template
          classes

Note (4): if Watcom can't read the precompiled header when building a sample,
          try deleting .pch files in build\msw\wat_* and compiling
          the sample again.

Metrowerks CodeWarrior compilation
----------------------------------------------------------------

1. CodeWarrior Pro 7 project files in XML format are already
   included in wxMSW-2.6.3.zip and the setup version.

2. Review the file include\wx\msw\setup.h (or include\wx\msw\setup0.h if
   you are working from the CVS version) to make sure the settings reflect
   what you want.  If you aren't sure, leave it alone and go with the
   default settings.  A few notes:
       - Don't use wxUSE_DEBUG_NEW_ALWAYS: it doesn't mix well with MSL
       - wxUSE_GLOBAL_MEMORY_OPERATORS works, but memory leak reports
         will be rather confusing due to interactions with the MSL ANSI
         and runtime libs.

3. The project file to build the Win32 wxWidgets libraries relies on the
   Batch File Runner plug-in.  This plug-in is not installed as part of
   a normal CW7 installation.  However, you can find this plug-in on the
   CodeWarrior Reference CD, in the Thrill Seekers folder; it's call the
   "Batch File Post Linker".

4. If you choose not to install the Batch File Runner plug-in, then you
   need to do the following by hand:
      (1) Create the directories lib\cw7msw\include\wx and copy the file
          include\wx\msw\setup.h (or include\wx\msw\setup0.h if you are
          working from the CVS version) to lib\cw7msw\include\wx\setup.h
      (2) Create the directories lib\cw7mswd\include\wx and copy the file
          include\wx\msw\setup.h (or include\wx\msw\setup0.h if you are
          working from the CVS version) to lib\cw7mswd\include\wx\setup.h

5. Import src\wxWidgetsW7.xml to create the project file wxWidgetsW7.mcp.
   Store this project file in directory src.  You may get warnings about
   not being able to find certain project paths; ignore these warnings, the
   appropriate paths will be created during the build by the Batch File Runner.

6. Choose the wxlib Win32 debug or wxlib Win32 Release target and build.  You
   will get some warnings about hidden virtual functions, illegal conversions
   from const pointers to pointers, etc., all of which you can safely ignore.
   ***Note:  if you get errors that the compiler can't find "wx/setup.h", just
   stop the build and build again.  These errors occur because sometimes the
   compiler starts doing its thing before the copying of setup.h has completed.

7. The following libraries will be produced depending on chosen
   target:
       - wx_x86.lib             ANSI Release (static)
       - wx_x86_d.lib           ANSI Debug (static)

8. Sorry, I haven't had time yet to create and test unicode or DLL versions.
   Volunteers for this are welcome (as neither DLLs nor unicode builds are
   big priorities for me ;).

9. CodeWarrior Pro7 project files (in XML format) are also provided for some
   of the samples.  In particular, there are project files for the minimal,
   controls, dialogs, dnd, nd docview samples.  You can use these project
   files as templates for the other samples and for your own projects.
       - For example, to make a project file for the "grid" sample,
         just copy the project file for the "minimal" sample, minimalW7.mcp
         (made by importing minimalW7.xml into CodeWarrior), into the
         sample/grid directory, calling it gridW7.mcp.  Open
         newgridW7.mcp and revise the project by deleting the files
         minimal.rc and minimal.cpp and adding the files griddemo.rc and
         griddemo.cpp.  Build and run....


Cygwin/MinGW compilation
----------------------------------------------------------------

wxWidgets supports Cygwin (formerly GnuWin32) betas and
releases, and MinGW. Cygwin can be downloaded from:

    http://sources.redhat.com/cygwin/

and MinGW from:

    http://www.mingw.org/

Both Cygwin and MinGW can be used with configure (assuming you have MSYS
installed in case of MinGW). You will need new enough MinGW version, preferably
MinGW 2.0 (ships with gcc3) or at least 1.0 (gcc-2.95.3). GCC versions older
than 2.95.3 don't work; you can use wxWidgets 2.4 with them.

NOTE: some notes specific to old Cygwin (< 1.1.x) are at the end of this
      section (see OLD VERSIONS)

There are two methods of compiling wxWidgets, by using the
makefiles provided or by using 'configure'.

Retrieve and install the latest version of Cygwin, or MinGW, as per
the instructions with either of these packages.

If using MinGW, you can download the add-on MSYS package to
provide Unix-like tools that you'll need to build wxWidgets using configure.

Using makefiles directly
----------------------------------------------------------------

NOTE: The makefile.gcc makefiles are for compilation under MinGW using
      native make and Windows command interpreter (command.com/cmd.exe), they
      won't work in other environments (such as UNIX or Unix-like, e.g. MSYS;
      you have to use configure instead)

Here are the steps required using the provided makefiles:

- If you are using gcc-2.95, edit build\msw\config.gcc and set the GCC_VERSION
  variable to "2.95".

- If you are compiling with GCC 3.x using makefiles and with wxUSE_STL == 1
  you need to manually add -DNO_GCC_PRAGMA to CXXFLAGS in config.gcc.

- Use the makefile.gcc files for compiling wxWidgets and samples,
  e.g. to compile a debugging version of wxWidgets:
  > cd c:\wx\build\msw
  > make -f makefile.gcc BUILD=debug
  > cd c:\wx\samples\minimal
  > make -f makefile.gcc BUILD=debug
  (See below for more options.)

  Ignore the warning about the default entry point.

- Use the 'strip' command to reduce executable/dll size (note that
  stripping an executable/dll will remove debug information!).

All targets have 'clean' targets to allow removal of object files
and other intermediate compiler files.

Using configure
----------------------------------------------------------------

Instead of using the makefiles, you can use the configure
system to generate appropriate makefiles, as used on Unix
and Mac OS X systems.

Change directory to the root of the wxWidgets distribution,
make a build directory, and run configure and make in this directory.

For example:

  cd $WXWIN
  mkdir build-debug
  cd build-debug
  ../configure --with-msw --enable-debug --enable-debug_gdb --disable-shared
  make
  make install % This step is optional, see note (6) below.
  cd samples/minimal
  make
  ./minimal.exe

Notes:

1. See also the Cygwin/MinGW on the web site or CD-ROM for
   further information about using wxWidgets with these compilers.

2. libwx.a is 100 MB or more - but much less if compiled with no
   debug info (-g0) and level 4 optimization (-O4).

3. If you get a link error under MinGW 2.95.2 referring to:

   EnumDAdvise__11IDataObjectPP13IEnumSTATDATA@8

   then you need to edit the file objidl.h at line 663 and add
   a missing PURE keyword:

   STDMETHOD(EnumDAdvise)(THIS_ IEnumSTATDATA**) PURE;

4. There's a bug in MinGW headers for some early distributions.

   in include/windows32/defines.h, where it says:

   #define LPSTR_TEXTCALLBACKA (LPSTR)-1L)

   it should say:

   #define LPSTR_TEXTCALLBACKA ((LPSTR)-1L)

   (a missing bracket).

5. OpenGL support should work with MinGW as-is. However,
   if you wish to generate import libraries appropriate either for
   the MS OpenGL libraries or the SGI OpenGL libraries, go to
   include/wx/msw/gl and use:

     dlltool -k -d opengl.def -llibopengl.a

   for the SGI DLLs, or

     dlltool -k -d opengl32.def -llibopengl32.a

   and similarly for glu[32].def.

6. The 'make install' step is optional, and copies files
   as follows:

   /usr/local/lib - wxmswXYZd.dll.a and wxmswXYZd.dll
   /usr/local/include/wx - wxWidgets header files
   /usr/local/bin - wx-config

   You may need to do this if using wx-config with the
   default root path.

7. With Cygwin, you can invoke gdb --nw myfile.exe to
   debug an executable. If there are memory leaks, they will be
   flagged when the program quits. You can use Cygwin gdb
   to debug MinGW executables.

8. Note that gcc's precompiled headers do not work on current versions of
   Cygwin. If your version of Cygwin is affected you will need to use the
   --disable-precomp-headers configure option.

OLD VERSIONS:

- Modify the file wx/src/cygnus.bat (or mingw32.bat or mingegcs.bat)
  to set up appropriate variables, if necessary mounting drives.
  Run it before compiling.

- For Cygwin, make sure there's a \tmp directory on your
  Windows drive or bison will crash (actually you don't need
  bison for ordinary wxWidgets compilation: a pre-generated .c file is
  supplied).

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -