Author Topic: can't compile WxWidgets with borland compiler ( -pipe problem) pls help  (Read 5725 times)

rozniy

  • Guest
Hi, I'm new to Code Blocks, trying to switch from Dev-C++. I've been doing wxWidgets programming using MingW in Dev-C++, and now I'm trying to compile the same wxWidgets program using Borland, prefereably using the CodeBlocks IDE...

Anyway, tinkering around with CodeBlocks I've managed to get a very basic "Hello Sailormoon!" to compile and run using Borland bcc32 as compiler. But when I tried to compile the basic wxWidgets example CodeBlocks gives us, the compiler protests at the very first step, saying -pipes is an illegal option (for bcc32 presumably).

So I thought, "Hokay, I'll edit the makefile!"

But CodeBlocks hath no Makefile? And when I tried editing what it uses instead of Makefile (removing the -pipes option) CodeBlocks ignores me and insists -pipe is an illegal option.

How do I get Code Blocks to not use -pipes when using Borland to compile wxwidgets application?

I have installed wxWidigets library and compiled the library from command line using the provided Makefile. Using command line bcc32 and the example makefiles, the wxWdigets examples are easily compiled. But I would like to do it within CodeBlocks, for I like to make it easy for myself... I'm too lazy to write a Makefile every time!

I want to switch from MingW to Borland because some DLL a firm provided to interface with A/D cum I/O card has import libraries only for VC and Borland, and all my efforts to jimmy up a MingW import library are fail, and none of the base are belong to me. It seems likely I can rebuild my wxWidgets application using bcc32. I'll do it by command line if necessary, but If CodeBlocks can be set to do this, it would make my day.

So How do I set CodeBlocks to build wxWidgets application using Borland?
« Last Edit: August 20, 2005, 09:17:28 pm by rickg22 »

rozniy

  • Guest
Re: can't compile WxWidgets with borland compiler ( -pipe problem) pls help
« Reply #1 on: August 26, 2005, 06:12:28 am »
Hmmm... OK... No reply? It's all right, I've figured out the command line options (but without truly understanding them).

After studying the output of the example makefiles, here are the options to compile and link wxwidgets using Borland command line compiler (my project didn't use resource files so the resource compiler options... I was too lazy), just so, if anyone wishes to modify CodeBlocks to fit Borland and wxwidgets. I cobbled up a rather verbose Makefile (after much hissing, spitting and cursing... how much swearing does an average programmer do?)

It's the debug version... I should probably change the options a bit for release version... mswd to msw, WXDEBUG to I'm-not-sure, wx*d.lib into wx*.lib, all that stuff.

Though it only works properly if cc3250mt.dll is in the same folder... I ought to copy that into some system folder somewhere...

Quote
CURFOLD=d:\wxwidgets-2.6.1\mywidget8
BCCFOLD=d:\borland\bcc55
WXFOLD=d:\wxwidgets-2.6.1


BCCFLAGS= -I$(BCCFOLD)\include -v -Od -tWM

WXFLAGS = -D__WXMSW__ -D__WXDEBUG__ -I$(WXFOLD)\include -I$(WXFOLD)\lib\bcc_lib\mswd -I$(CURFOLD) -DNOPCH -a8 -g0

BCCLINKS=-L$(BCCFOLD)\lib -L$(BCCFOLD)\lib\psdk -L$(WXFOLD)\lib\bcc_lib -aa c0w32.obj

WXLINKS=wxmsw26d_core.lib wxbase26d.lib  wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib   ole2w32.lib oleacc.lib odbc32.lib import32.lib cw32mti.lib

BIN  = Projek.exe

RES=

OBJ  = Frame.obj Panell.obj  Page2.obj Page1.obj Page3.obj hashmain.obj
#GPS.obj myDialog.obj
#omitting this for the time being A822_Functions.obj $(RES)





all: Projek.exe

clean: clean-custom
   del $(OBJ) $(BIN)

$(BIN) : $(OBJ)
   ilink32 -Tpe -q $(BCCLINKS) $(OBJ),$(BIN),,$(WXLINKS)

Frame.obj : Frame.cpp
   bcc32 -q -c -P -oFrame.obj -tWR $(BCCFLAGS) $(WXFLAGS) Frame.cpp

#GPS.obj : GPS.cpp
#   bcc32 -q -c -P -oGPS.obj -tWR $(BCCFLAGS) $(WXFLAGS) GPS.cpp

#myDialog.obj : myDialog.cpp
#   bcc32 -q -c -P -omyDialog.obj -tWR $(BCCFLAGS) $(WXFLAGS) myDialog.cpp

Page1.obj : Page1.cpp
   bcc32 -q -c -P -oPage1.obj -tWR $(BCCFLAGS) $(WXFLAGS) Page1.cpp

Page2.obj : Page2.cpp
   bcc32 -q -c -P -oPage2.obj -tWR $(BCCFLAGS) $(WXFLAGS) Page2.cpp

Page3.obj : Page3.cpp
   bcc32 -q -c -P -oPage3.obj -tWR $(BCCFLAGS) $(WXFLAGS) Page3.cpp

Panell.obj : Panell.cpp
   bcc32 -q -c -P -oPanell.obj -tWR $(BCCFLAGS) $(WXFLAGS) Panell.cpp

hashmain.obj : hashmain.cpp
   bcc32 -q -c -P -ohashmain.obj -tWR $(BCCFLAGS) $(WXFLAGS) hashmain.cpp

#A822_Functions.obj : A822_Functions.cpp
   #bcc32 -q -c -P -oA822_Functions.obj -tWR $(BCCFLAGS) $(WXFLAGS) A822_Functions.cpp


« Last Edit: August 26, 2005, 06:57:31 am by rozniy »

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: can't compile WxWidgets with borland compiler ( -pipe problem) pls help
« Reply #2 on: August 26, 2005, 08:30:10 am »
Anyway, tinkering around with CodeBlocks I've managed to get a very basic "Hello Sailormoon!" to compile and run using Borland bcc32 as compiler. But when I tried to compile the basic wxWidgets example CodeBlocks gives us, the compiler protests at the very first step, saying -pipes is an illegal option (for bcc32 presumably).

No need to edit Makefiles to make it work. Just go to "Project->Build options" and remove the '-pipe' (or any other) flag fom compiler options...

Yiannis.
Be patient!
This bug will be fixed soon...