User forums > General (but related to Code::Blocks)

how to static link a library

<< < (2/2)

Alpha:
Sorry, I just realized my instructions do not exactly fit your situation (they were written to apply to a pre-existing multi-lib configuration).
Under link libraries, you will need a minimum of:

* wxbase28u
* wxmsw28u_coreYou will also need to add libraries for any additional features you use (for example wxmsw28u_media and wxpng).

The easiest way to set this up is to run the wxWidgets project wizard, uncheck Use wxWidgets DLL and wxWidgets is built as a monolithic library, and select the feature(s) you plan to use from the last page in the wizard.  (If you do not know what to choose, select everything except for DbGrid, Odbc, Gl, and Qa.)


--- Quote from: poda19 on February 08, 2012, 11:41:34 pm ---i don't think my libraries have shared=0, i didn't build them. i installed wxPack.

--- End quote ---
From what I remember, wxPack includes all build configurations (which is why it is so large!!); also, GCC would warn about not being able to find the file (instead of saying "undefined reference ...") if this were the case.

Edit: See also: libraries list (or trunk libraries list)

stahta01:
Read info on http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef

Turn on Full Compiler Logging
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

Also read this FAQ
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_I_would_like_to_compile_a_project_using_some_non-standard_libraries._How_can_I_indicate_to_CodeBlocks_that_these_libraries_and_include_files_exist.3F

FYI: This is NOT a real Code::Blocks question; but, you are likely to find one soon.

Tim S.

poda19:
sorry i didn't have access to internet for some hours.
i did what you said Alpha and unchecked the use libraries and monolithic options. and when i builded my project it returned lots of errors(that was why i did never unchecked them before). i builded my wxwidgets libraries myself(according to wxwidgets docs) and then my project was built and everything went ok.
thank you very much for your responses specially Alpha. i really didn't think everything wil be fixed just by unchecking those two options.

Alpha:

--- Quote from: poda19 on February 09, 2012, 09:57:59 pm ---sorry i didn't have access to internet for some hours.

--- End quote ---
No problem.

Navigation

[0] Message Index

[*] Previous page

Go to full version