- win+dows

Latest

воскресенье, 10 декабря 2017 г.

__windows__


Make sure that the wx distribution is extracted to a path with no spaces in it, and preferably on the root of your drive. Borland's compilers sometimes have problems with spaces and with the long paths which occur if you try to place it in a tree like d:\compiler\gui\wx.


Part 1 Build the library


Run a command prompt in the wx/src/msw directory and type


In my case this I extracted the wx distribution in c:\ and the compiler is in w:\borland\cb\bin so this looks:


If this doesn't compile,


  • you've probably got the set wxwincommand wrong,

  • or the path was not set by the Borland setup


If this doesn't link,

  • you've probably got the set bccdircommand wrong



To make the samples


Solution 1


Download a zip file which contains modifed cpp, mak and bpr files - it will overwrite your wx distribution cpp files!


Solution 2


#this is for Borland CBuilder IDE v1 and 3


#add a \ at the end of the lines if you editor breaks the long lines up


#copy this into notepad and save from there


# -Od disable optimisations -v debug -a1 byte align -c compile only (matches my make for the library)


CFLAG2 = -DINC_OLE2;__WIN95__;__WXMSW__;__WINDOWS__;WIN32;__BIDE__;-I$(BCB)\include;$(BCB)\include\vcl;..\..\include; -H=BC32.CSM


RFLAGS = -DINC_OLE2;__WIN95__;__WXMSW__;__WINDOWS__;WIN32;__BIDE__; -I$(BCB)\include;..\..\include;


LFLAGS = -L$(BCB)\lib;$(BCB)\lib\obj;..\..\lib -aa -Tpe -v -V4.0 -c


ALLOBJ = c0w32.obj $(OBJFILES)


ALLLIB = $(LIBFILES) vcl.lib xpm.lib wx32.lib ole2w32.lib import32.lib odbc32.lib cw32mt.lib


#you will need to add other libraries to the line above, eg the jpeg.lib for image samples



  • modify the .cpp file to include these lines near the top


#ifdef __BIDE__


#define WinMain WinMain


// USEUNIT ("another.cpp"); // use a line like this if you have more than one .cpp file


In CBuilder 1 you can use Open Project to open the mak file and edit/compile/debug.


In CBuilder 3 and 4, then you can use Open Project and choose the Open Borland CBuilder 1 Project from the drop down file types. The system will modify the mak file and update it for you.


Now try compiling it in the ide.



  • You can set it up for normal and debug modes (change the -v switch in CFLAG1 and LFLAG)

  • If you get problems saying Project undefined, then copy the text using a simple editor like notepad to the file minimal.mak (I have had problems in CBuilder 1.00 with Unix style line endings)

  • If you want to avoid the warnings about hiding virtual methods add -w-hidto the CFLAGS1 line

  • the #define WinMain WinMain line allows CBuilder to think it has a non-VCL main function

  • the USEUNIT macros tell CBuilder which other source files to include, without needing a VCL form

  • the condefs.h file defines the USEUNIT macros for non-VCL use

  • For the other samples, change the names of the cpp and rc files. If you have multiple files, just add more USEUNIT and USERC macros


Solution 3



  • download the wx_2_1_15_bc.zip file,

  • extract it

  • use the idetomak (CBuilder 1) or idetobpr (CBuilder 3/4) utility on the .ide file in the samples directory. This modifies the cpp source and makes a "suitable" mak or bpr file (at least in CBuilder 1/3/4).

  • add the location of the wx/include files in the project | options | directory dialog


I found in CBuilder 1 that the idetomak utility did not manage to convert all the samples, but idetobpr worked OK in CBuilder 3 and 4. I have a report that not all the bpr files made inb CBuilder 4 are correct

Error with ODBC32


C:\wx\lib>implib odbc32 c:\windows\system\odbc32.dll


This creates the necessary library, odbc32.lib


Unresolved Problem


Turbo Incremental Link Version 1.0 Copyright (c) 1997 Borland International


Fatal: Assertion failed: typeInx < typeCnt at "ilinkdbg.c", line 2060


Fatal: Access violation. Program terminated.


Error: Internal failure -- retrying link.


Fatal: Assertion failed: typeInx < typeCnt at "ilinkdbg.c", line 2060


Fatal: Access violation. Program terminated.


** error 2 ** deleting minimal.exe


I have not been able to track down why sometimes this error occurs and other times it is OK


I have not seen this in Cbuilder 3 or 4


Page updated on 31 May 2000 by Chris Elliott

Комментариев нет:

Отправить комментарий