Page 1 of 1

Static Lib and compiling

Posted: Mon Feb 13, 2006 9:59 am
by barbarello

I compile wxWidgets with parameters SHARED=0.
So the folder created is gcc_msw

My compiler is mingw and my IDE Codeblocks.

I cannot compile due many errors
I don't know what are parameters to add.

If someone compile wxWidgets with SHARED=0, can he give me linker and compiler parameters ?
It will be nice..


Posted: Mon Feb 13, 2006 1:43 pm
by protocol
Umm... if you can. Use wxDevCpp (I'm not a representative; its just a awesome IDE).

Posted: Tue Feb 14, 2006 8:42 am
by barbarello
In case this can help someone. (I've been helping by people on CodeBlocks Forum.)

wxWidgets 2.6.2
CodeBlocks 1.0RC2
Win XP pro Sp1

(mpr added lib is just some API Win32)

wxWidgets compiled with these options :
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=0 MONOLITHIC=1 BUILD=release UNICODE=0

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
	<FileVersion major="1" minor="3" />
		<Option title="wx_static_App" />
		<Option pch_mode="0" />
		<Option compiler="gcc" />
			<Target title="wxRelease">
				<Option output="$(OUTNAME)_r.exe" />
				<Option object_output="$(OUTNAME)_r" />
				<Option type="0" />
				<Option compiler="gcc" />
				<Option includeInTargetAll="1" />
				<Option projectCompilerOptionsRelation="2" />
				<Option projectLinkerOptionsRelation="2" />
				<Option projectIncludeDirsRelation="2" />
				<Option projectResourceIncludeDirsRelation="0" />
				<Option projectLibDirsRelation="2" />
					<Add option="-Os" />
					<Add directory="$(WXDIR)\lib\gcc_lib\msw" />
					<Add option="-s" />
					<Add library="wxmsw$(WXVER)" />
					<Add directory="$(WXDIR)\lib\gcc_lib" />
				<Variable name="WXVER" value="26" />
				<Variable name="WXDIR" value="D:\wx" />
				<Variable name="OUTNAME" value="wx_static" />
			<Add option="-Wall" />
			<Add option="-pipe" />
			<Add option="-mthreads" />
			<Add option="-fno-pcc-struct-return" />
			<Add option="-fno-rtti" />
			<Add option="-fmessage-length=0" />
			<Add option="-D__GNUWIN32__" />
			<Add option="-D__WXMSW__" />
			<Add directory="$(WXDIR)\Include" />
			<Add directory="$(WXDIR)\Include" />
			<Add option="-mthreads" />
			<Add library="kernel32" />
			<Add library="user32" />
			<Add library="gdi32" />
			<Add library="comctl32" />
			<Add library="comdlg32" />
			<Add library="winspool" />
			<Add library="winmm" />
			<Add library="shell32" />
			<Add library="ole32" />
			<Add library="oleaut32" />
			<Add library="uuid" />
			<Add library="rpcrt4" />
			<Add library="advapi32" />
			<Add library="wsock32" />
			<Add library="odbc32" />
			<Add library="mpr" />
		<Unit filename="main.cpp">
			<Option compilerVar="CPP" />
			<Option target="wxRelease" />