Static Lib and compiling 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
Earned some good credits
Earned some good credits
Posts: 113
Joined: Sat Jan 07, 2006 7:22 pm
Location: Grenoble (FRANCE)

Static Lib and compiling

Post by barbarello » Mon Feb 13, 2006 9:59 am


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..


Posts: 680
Joined: Wed Jan 18, 2006 6:13 pm
Location: Dallas, TX

Post by protocol » Mon Feb 13, 2006 1:43 pm

Umm... if you can. Use wxDevCpp (I'm not a representative; its just a awesome IDE).
/* UIKit && wxWidgets 2.8 && Cocoa && .Net */
wxPCRE & ObjPCRE - Regex It!

Earned some good credits
Earned some good credits
Posts: 113
Joined: Sat Jan 07, 2006 7:22 pm
Location: Grenoble (FRANCE)

Post by barbarello » Tue Feb 14, 2006 8:42 am

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" />

Post Reply