Good Morning All,
I have haunted this site, the GNU-GCC site, and other google/yahoo search results. I am using C:B 13.12 with the included MinGW suite under Windows -7. The wxWidgets lib (2.8.12) has been built from scratch following the article on the C::B wiki. The flags for the wxWidgets build was per the C::B wiki article found here:
http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef. I did alter the flags, the flags I built with were:
mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=0 CXXFLAGS=-fno-keep-inline-dllexport where I changed the Unicode flag to "0".
I also use FreeBSD and have a second drive where I dual-boot Windows-7 for developing Windows ports. Under FreeBSD I am having no issues of any kind. C::B operates perfectly. It is a great RAD environment. Windows however is causing me issues. Under Windows, I cannot obtain a statically linked .exe file. This is where my problem comes in. The resulting executable still requires the custom dll file to run. They run fine in debug and release builds as long as this dll is in the respective debug and release folders....But I want a static link.
In my linker settings I have "C:\wxWidgets-2.8.12\lib\gcc_dll\libwxmsw28.a" for Windows (minus the quotation marks) and then in the Other Linker Options I have "-static" (minus the quotes). I am building ANSI code, not unicode under Windows.
I've found multiple posts about reading the GCC docs. I have done so for the last 4 days. "-static" is supposed to result in a static link for GCC based compilers. It isn't in my case.
I am suspecting that I am putting the "-static" flag in the wrong location under C::B.Can someone please enlighten me where to pass the "-static" flag to the linker if not where it is already?
And if I am configured properly....can someone assist in a workaround so I can generate statically linked exe's under Windows?
Also, if I am configured improperly....can someone please post an exact "HowTo" guide to configure C::B for static linking under Windows-7? I ask for the "HowTo" if I am configured improperly because there are no clear, succinct answers in the searches that I have conducted here, and elsewhere. So we might as well post it to prevent more posts like mine about static linking.
If I have missed this post somehow in my searches, I apologize, and would simply appreciate a link to the relevant post(s) for configuring C::B for static linking under WIndows-7.
Thank you for any assistance.
Sincerely and respectfully,
Dave
Edit: In reviewing the build messages. I can see the "-static" flag being passed.
I am building the same app under FreeBSD, Linux, Windows, and then a java version for web deployment for a client of mine. C::B under FreeBSD/Linux is working perfectly. My issue is specific to using C::B under native Windows-7.