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

Hi

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

Thanks

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

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 */
QuRegExmm
wxPCRE & ObjPCRE - Regex It!

barbarello
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" ?>
<CodeBlocks_project_file>
	<FileVersion major="1" minor="3" />
	<Project>
		<Option title="wx_static_App" />
		<Option pch_mode="0" />
		<Option compiler="gcc" />
		<Build>
			<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" />
				<Compiler>
					<Add option="-Os" />
					<Add directory="$(WXDIR)\lib\gcc_lib\msw" />
				</Compiler>
				<Linker>
					<Add option="-s" />
					<Add library="wxmsw$(WXVER)" />
					<Add directory="$(WXDIR)\lib\gcc_lib" />
				</Linker>
			</Target>
			<Environment>
				<Variable name="WXVER" value="26" />
				<Variable name="WXDIR" value="D:\wx" />
				<Variable name="OUTNAME" value="wx_static" />
			</Environment>
		</Build>
		<Compiler>
			<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" />
		</Compiler>
		<ResourceCompiler>
			<Add directory="$(WXDIR)\Include" />
		</ResourceCompiler>
		<Linker>
			<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" />
		</Linker>
		<Unit filename="main.cpp">
			<Option compilerVar="CPP" />
			<Option target="wxRelease" />
		</Unit>
	</Project>
</CodeBlocks_project_file>

Post Reply