User forums > Using Code::Blocks

[SOLVED] C::B 13.12 -static not working

<< < (3/7) > >>

dcbdbis:
So I cleaned, then rebuilt the library with the SHARED=0 and UNICODE=0 options with monolithic remaining set at 1. Now I have a gcc_lib subdir.

I modified my project to use the new libwx* file as an external dependency, and made the appropriate changes to the linker settings.

The build is now failing with:


--- Code: ---||=== Build: Release in BicycleGearingCalculator (compiler: GNU GCC Compiler) ===|
C:\wxWidgets-2.8.12\lib\gcc_lib\libwxmsw28.a(monolib_app.o):app.cpp|| undefined reference to `InitCommonControls@0'|
C:\wxWidgets-2.8.12\lib\gcc_lib\libwxmsw28.a(monolib_app.o):app.cpp|| undefined reference to `OleInitialize@4'|
C:\wxWidgets-2.8.12\lib\gcc_lib\libwxmsw28.a(monolib_app.o):app.cpp|| undefined reference to `OleUninitialize@0'|
C:\wxWidgets-2.8.12\lib\gcc_lib\libwxmsw28.a(monolib_msw_spinbutt.o):spinbutt.cpp|| undefined reference to `CreateUpDownControl@48'|
C:\wxWidgets-2.8.12\lib\gcc_lib\libwxmsw28.a(monolib_filename.o):filename.cpp|| undefined reference to `CoCreateInstance@20'|
C:\wxWidgets-2.8.12\lib\gcc_lib\libwxmsw28.a(monolib_filename.o):filename.cpp|| undefined reference to `IID_IPersistFile'|

--- End code ---

I assumed that since the wxWidget compilation would include these Windows controls as it did when it built the dll. Clearly I am wrong, and C::B is missing something...Likely obvious as I don't do a lot of Windows coding...Mainly Linux and FreeBSD for my clients.

My build string (after cleaning of course) was: mingw32-make -f makefile.gcc BUILD=release SHARED=0 MONOLITHIC=1 UNICODE=0

So then out of growing frustration, I included all the libs.....and it still fails with the above messages.


Hope this info helps....


Sincerely and respectfully,

Dave

stahta01:
I suggest posting the info on the wxForum for better help; note, you will have to post the full re-build log!

http://forums.wxwidgets.org/

You are missing a library; likely more than one.

Edit: http://forums.wxwidgets.org/viewtopic.php?f=19&t=36825

Tim S.

dcbdbis:
OK. Thank you for the pointer.

I would ask this: In my original post...had I setup C::B properly to statically link? The answer to that question will satisfy me that I have setup C::B properly.


Thank you!

Sincerely and respectfully,

Dave

stahta01:
If static option displays in the build log in the correct location you likely did it right.

What it does depends on the Compiler NOT on code::blocks.

I never use the static option; so, no idea where is the correct location or what it really does.
Memory says it changed whether the gcc c lib is static or a DLL.

Tim S.

dcbdbis:
Once I get to the bottom of this...I will be posting the solve back here for others...

It may be an idea to ship C::B with a version of wxWidgets pre-compiled with the same compiler and widget version that C::B itself is built on...It would save folks some time and headache.

But that is a wish-list....


FYI.


Dave

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version