wxWidgets and Borland Turbo C++ Explorer Edition Topic is solved

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
NinjaNL
Moderator
Moderator
Posts: 899
Joined: Sun Oct 03, 2004 10:33 am
Location: Oosterwolde, Netherlands

Post by NinjaNL » Fri Oct 20, 2006 10:51 am

T-Rex wrote:Could you write step-by-step plan of project configuration and wxWidgets build options?
Will do.
T-Rex wrote:Also one thing, do you have ServicePack2 for Windows XP installed on your machine?
Yes, I do.
Follow the development of my screenplay authoring program at http://wxscreenplaywriter.blogspot.com/

NinjaNL
Moderator
Moderator
Posts: 899
Joined: Sun Oct 03, 2004 10:33 am
Location: Oosterwolde, Netherlands

Post by NinjaNL » Fri Oct 20, 2006 1:25 pm

Build wxWidgets:

Edit wxWidgets\include\wx\msw\setup0.h file as outlined in wxWidgets documentation, copy it to wxWidgets\include\wx\setup.h

Ensure that the WXWIN environment variable points to the wxWidgets folder.

Ensure that the TurboExplorer C++ Bin folder is in the path, preferably at the front so that it is searched first.


Use command prompt,

make -f makefile.bcc BUILD=release MONOLITHIC=1 USE_OPENGL=1 USE_XRC=1 USE_ODBC=1 RUNTIME_LIBS=static USE_RTTI=0 USE_EXCEPTIONS=1 2> error_base.txt

Note that this is for a monolithic release static build, adjust these as required. I do this twice - release and debug


Once the libraries have been compiled correctly, it is time to:


Fire up TurboExplorer C++

File - New - Other...

Console Application

OK

Ensure that the three Check Boxes are NOT selected (Use VCL, Multi Threaded, Console Application)
Ensure that the Specify Project Source check box is selected, click on the ... button and browse to the folder containing the source file you wish to use. Select the source file, Click on Open, then OK.

File - Save Project As...
Choose a suitable name, Turbo C++ doesnt seen to like having the project name the same as that of the included source file, so I choose to name it <samplename>Proj.bdsproj

Project - Options...

In the following Dialog, select C++ compiler, Paths and Defines
Click the Edit button next to the Include Search Path edit box,
In the Path dialog, click the ... button
Browse to the wxWidgets\lib\bcc_lib\mswd folder, then click on OK, then on Add

repeat to add the wxWidgets\include folder

The list of include directories should now be:(Assuming the notebook sample)
C:\wxWidgets\samples\notebook
$(BDS)\include
$(BDS)\include\dinkumware
$(BDS)\include\vcl
C:\wxWidgets\lib\bcc_lib\mswd // this would obviously be C:\wxWidgets\lib\bcc_lib\msw for a release build
C:\wxWidgets\include

(there may be ..\..\include instead of C:\wxWidgets\include)


Click OK

In the Conditional defines edit box add the text

_DEBUG;__WXMSW__;__WXDEBUG__ (for release it would be just __WXMSW__)


Select C++ compiler, Warnings in the listbox, You may choose to enable "W8057 Parameter is never used", it is turned off by default, but this is up to you.


Select C++ compiler, Compiling
enable "enums always integer sized"


Select C++ compiler, data Alignment
select 8 byte data alignment

Select C++ compiler, Register Variables
select Register Variables

Select C++ compiler, C++ Compatibility
Uncheck Zero-length empty base class
Uncheck Zero=length empty class member functions


Click OK


Project - Add to Project...
Select "Files of Type" Library Files (*.lib), browse to the wxWidgets\lib\bcc_lib folder, select the required libraries, then click on Open

Wait forever while TurboExplorer adds the libraries to the project. there seems to be an error in Turbo C++ where it opens one of the library files in the IDE, simply close this pane and proceed.

Repeat the above for the resource files should one exist, and also any added source files.

Save your project
File - Save All

Choose Project - Build projectname (Shift+F9)

Then try Running (F9)

I believe that this is everything.

Next is making a template for creating your own programs.

I hope that this is sufficient.
Follow the development of my screenplay authoring program at http://wxscreenplaywriter.blogspot.com/

User avatar
T-Rex
Moderator
Moderator
Posts: 1198
Joined: Sat Oct 23, 2004 9:58 am
Location: Zaporizhzhya, Ukraine
Contact:

Post by T-Rex » Fri Oct 20, 2006 2:22 pm

OK, thanks, I'll try to do the same today's night

Regarding libraries... I'm adding libraries using

Code: Select all

#pragma comment(lib, "my_library.lib")
This allows to avoid using full path to libraries but you have to add library path to project settings (or IDE library search paths)

NinjaNL
Moderator
Moderator
Posts: 899
Joined: Sun Oct 03, 2004 10:33 am
Location: Oosterwolde, Netherlands

Post by NinjaNL » Mon Oct 23, 2006 6:51 am

As an aside to the original question, does anyone know why my virus checker seems to see the compiled programs as a possible threat (it moves the compiled program to its quarantine section before it actually runs)?
Follow the development of my screenplay authoring program at http://wxscreenplaywriter.blogspot.com/

gururamnath
Moderator
Moderator
Posts: 466
Joined: Sat Sep 18, 2004 2:49 am
Location: California, USA

Post by gururamnath » Wed Mar 28, 2007 2:07 am

I have created a prebuilt library and a project template for Turbo C++. Have a look at http://forums.wxwidgets.org/viewtopic.php?t=13397 .

Thanks,
Guru Kathiresan
wxWidgets Form Designer for Delphi and C++ Builder - http://www.twinforms.com

Code snippets for wxWidgets - http://wxsnippets.com

biplab
I live to help wx-kind
I live to help wx-kind
Posts: 194
Joined: Fri Feb 17, 2006 4:16 am
Location: Singapore
Contact:

Post by biplab » Fri Mar 30, 2007 3:57 am

Oops, I'm late. Use Code::Blocks to compile wxWidgets app with Borland Turbo C++ Explorer edition. C::B's wxWidgets project wizard officially supports it!!

To use it-
1. Create a copy of Borland C++ 5.5.1 compiler in Code::Blocks and rename it to , BorlandTCEE or anything you like. You've to point the new compiler binaries.
2. Set the new compiler to default.
3. Now use the wxWidgets Project wizard to create a Project for you and the project will compile with Turbo C++ Explorer Edition.

To add TurboC++ EE in COde::Blocks, you may watch the following tutorial.
http://biplab.in/2007/01/09/add-turbo-c ... odeblocks/

Please Note: The tutorial is bit old and C::B UI has undergone a minor change. Now you'll see a Combo showing Compiler options and other settings instead of Tabs.

Regards,

Biplab
Blog: http://biplab.in

IDE: Code::Blocks
Compilers: GCC, MSVC, etc. ;)
OS: WinXP-SP2 & Linux.

gururamnath
Moderator
Moderator
Posts: 466
Joined: Sat Sep 18, 2004 2:49 am
Location: California, USA

Post by gururamnath » Sat Mar 31, 2007 12:17 am

biplab wrote:Oops, I'm late. Use Code::Blocks to compile wxWidgets app with Borland Turbo C++ Explorer edition. C::B's wxWidgets project wizard officially supports it!!
The Question is "how to use the IDE", you answer explains how to use the command line compiler in C:B. Not sure your answer is related to the question.

-Guru Kathiresan
wxWidgets Form Designer for Delphi and C++ Builder - http://www.twinforms.com

Code snippets for wxWidgets - http://wxsnippets.com

biplab
I live to help wx-kind
I live to help wx-kind
Posts: 194
Joined: Fri Feb 17, 2006 4:16 am
Location: Singapore
Contact:

Post by biplab » Sat Mar 31, 2007 3:13 am

gururamnath wrote: The Question is "how to use the IDE", you answer explains how to use the command line compiler in C:B. Not sure your answer is related to the question.
I understand your point.

My point was
  1. Add the compiler to Code::Blocks
  2. Use Code::Blocks wxWidgets Project Wizard to use the new compiler for wxWidgets projects
Across the different compilers the wizard remains same. So I think it can be helpful. :)

Regards,

Biplab
Blog: http://biplab.in

IDE: Code::Blocks
Compilers: GCC, MSVC, etc. ;)
OS: WinXP-SP2 & Linux.

Post Reply