Where are Code::Blocks wxWidgets build defaults? 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.
Post Reply
daddydave
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 214
Joined: Wed Jun 15, 2005 3:31 am
Location: United States
Contact:

Where are Code::Blocks wxWidgets build defaults?

Post by daddydave »

Trying to accomplish two things

1. Get a standard wxWidgets / MSVC free tools build going [done]
2. Get it to work with Code::Blocks

I see where I can change build options for a project once it is created (File > New Project > wxWidgets Application) but where do I set them at the template level (in other words for all such)

WELL, as I was looking at the C::B to describe the problem, I THOUGHT I figured it out, BUT I WAS WRONG. I am having to edit this post almost from scratch, I was so wrong

To the left of Build options there is a tree control :

wxWidgets Application
|
------default

It turns out that default is a TARGET....as in specifying multiple targets in a makefile. It is NOT the default build options for wxWidgets Application. I would like to get to those, because there are some command line options I am seeing in the CodeBlocks command line log that I am not seeing anywhere in the build options:
Project : wxWidgets application
Compiler : Microsoft Visual C++ Toolkit 2003 (called directly)
Directory : C:\keep\private\KODE\
--------------------------------------------------------------------------------
Switching to target: default
cl.exe /nologo -pipe -mthreads -fno-pcc-struct-return -fno-rtti -fno-exceptions -D_X86_ -DWIN32 -D_WIN32 -DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -D__WIN32__ -DSTRICT -D__WXMSW__ -D__WINDOWS__ /I"C:\Program Files\Microsoft Visual C++ Toolkit 2003\include" /I"C:\Program Files\Microsoft SDK\include" /c main.cpp /Fo.objs\main.obj
main.cpp
cl : Command line warning D4002 : ignoring unknown option '-pipe'
cl : Command line warning D4002 : ignoring unknown option '-mthreads'
cl : Command line warning D4002 : ignoring unknown option '-fno-pcc-struct-return'
cl : Command line warning D4002 : ignoring unknown option '-fno-rtti'
cl : Command line warning D4002 : ignoring unknown option '-fno-exceptions'
And I think I need to change them to (somewhat) match the build options for my wxwidgets build (not to mention get rid of the warnings).
daddydave
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 214
Joined: Wed Jun 15, 2005 3:31 am
Location: United States
Contact:

Post by daddydave »

Bump -- due to reframing of the question. It's a question again, but apparently that can only be set when first posting

i was trying to figure out how to send a private message to all wxForum moderators to ask someone to change it back to a question when someone changed it back to a question -- thanks :)
mispunt
Experienced Solver
Experienced Solver
Posts: 59
Joined: Tue Oct 19, 2004 3:23 pm
Location: Ede, Holland

Post by mispunt »

If you want to change to defaults, you have to change the template. You can do that by creating a new wxWidgets project, change the settings and save it as user-template (Projects->Save project as user-template)
Now you have you'r own template :)
OS: win XP pro
Compiler: MingW
wxWidgets version: 2.6.2
daddydave
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 214
Joined: Wed Jun 15, 2005 3:31 am
Location: United States
Contact:

Post by daddydave »

Great, thanks, that helps, and I Accepted your anwer. but ... I still want to change the command line parameters used by Code::Blocks and there are some that I don't see in build options. Are they hard coded into Code Blocks?
mispunt
Experienced Solver
Experienced Solver
Posts: 59
Joined: Tue Oct 19, 2004 3:23 pm
Location: Ede, Holland

Post by mispunt »

daddydave wrote:Great, thanks, that helps, and I Accepted your anwer. but ... I still want to change the command line parameters used by Code::Blocks and there are some that I don't see in build options. Are they hard coded into Code Blocks?
I am not sure if they are build in, it is possible that they just didn't code it at all, but I suggest you ask it on the Code::Blocks forum so you know it for sure. :)
OS: win XP pro
Compiler: MingW
wxWidgets version: 2.6.2
daddydave
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 214
Joined: Wed Jun 15, 2005 3:31 am
Location: United States
Contact:

Post by daddydave »

snooping a little further I see a file wxwidgets.cbp in the c:\program files\codeblocks\share\codeblocks\templates

Code: Select all

<?xml version="1.0"?>
<!DOCTYPE Code::Blocks_project_file>
<Code::Blocks_project_file>
	<FileVersion major="1" minor="1"/>
	<Project>
		<Option title="wxWidgets application"/>
		<Option makefile="Makefile"/>
		<Build>
			<Target title="default">
				<Option type="0"/>
			</Target>
		</Build>
		<Compiler>
			<Add option="-pipe"/>
			<Add option="-mthreads"/>
			<Add option="-fno-pcc-struct-return"/>
			<Add option="-fno-rtti"/>
			<Add option="-fno-exceptions"/>
			<Add option="-D_X86_"/>
			<Add option="-DWIN32"/>
			<Add option="-D_WIN32"/>
			<Add option="-DWINVER=0x0400"/>
			<Add option="-D__WIN95__"/>
			<Add option="-D__GNUWIN32__"/>
			<Add option="-D__WIN32__"/>
			<Add option="-DSTRICT"/>
			<Add option="-D__WXMSW__"/>
			<Add option="-D__WINDOWS__"/>
		</Compiler>
		<Linker>
			<Add library="wxmsw242"/>
		</Linker>
	</Project>
</Code::Blocks_project_file>
I'll go to the CB forum and find out why I can't find these settings in the build options even though they appear when you actually do a compile. Thanks again.
Post Reply