Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: chinnu on April 07, 2008, 05:19:01 pm

Title: switch between compilers on the fly?
Post by: chinnu on April 07, 2008, 05:19:01 pm
Hello,
        I just started using C::B for programming using BGI (borland graphics).. using the WINBGI workaround. it requires me to add these switches ( -lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32 ) to the linker. so everytime i compile a program that has graphics.h , things work fine.

but when i compile a program that does not use graphics.h , the program compiles fine though, after the execution i get a error dialog saying "Drawing Operation was attempted but there was no current window".

i figure this is happening because of the switches?

so how do i switch between compilers (am using borland right now along with the switches), how do i switch between borland and something else conviniently? say from the toolbar or something? does such a facility exist ?

if not, then how can i create it? can it be done if i wrote a plugin for C::B?

thanks :)
Title: Re: switch between compilers on the fly?
Post by: Deschamps on April 08, 2008, 02:55:56 pm
I suspect that you've a litle confusion. Those "switches" are standard libraries used for Windows applications. I assume you are using MinGW compilers (BGI is only a library), but, what kind of application are you trying to develop? If your programs needs a window to run, then you must create that window...

In any case, I think that I haven't understood your problem.