News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

CodeBlocks_wx29.cbp linkage issue?

Started by stefanos_, May 31, 2012, 11:01:11 AM

Previous topic - Next topic

stefanos_

hi everyone. I have tried to compile CodeBlocks_wx29.cbp and the first thing that says to me is


||=== Code::Blocks wx2.9.x, exchndl ===|
ld.exe||cannot find -lintl|


I have opened both CodeBlocks.cbp and CodeBlocks_wx29.cbp with notepad++ (using Compare option), and regards to linkage, seem to me that are identical.


<Linker>
    <Add library="bfd" />
    <Add library="iberty" />
    <Add library="intl" />
    <Add directory="base\exchndl\lib" />
</Linker>


CodeBlocks.cbp compiles just fine with no complains at all (apart from warnings).

Can anyone who has successfully compiled it to provide some feedback?

My specs are:

wxWidgets 2.9.3
TDM's GCC 4.6.1
Windows XP SP3 (fully updated)

Cheers

xunxun

I remembered exchndl don't need to be built.
Regards,
xunxun

stefanos_


MortenMacFly

Quote from: stefanos_ on May 31, 2012, 11:26:20 AM
so shall i remove it from Linker?
Either you simply disable the "exchdl" target from the virtual target "All" or d/l the "intl" lib from GnuWin32 or another (devpack) package. It used to be shipped with the compiler as part of the compiler, it seems not part of your compiler, so you need to find an alternative if you really require "exchdl" (which is optional to run C::B).
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

stefanos_

In C:\MinGW\__installer\downloaded\ this file libintl-0.17-1-mingw32-dll-8.tar.lzma is found and in C:\MinGW\bin\ libintl-8.dll is found.

Is this the file I supposed to have, or should I find a newer version to install it?

stahta01

#5
Quote from: stefanos_ on May 31, 2012, 11:45:00 AM
In C:\MinGW\__installer\downloaded\ this file libintl-0.17-1-mingw32-dll-8.tar.lzma is found and in C:\MinGW\bin\ libintl-8.dll is found.

Is this the file I supposed to have, or should I find a newer version to install it?

It works for me; but, you still need to edit the project to directly link to it.


It is easier to edit the virtual "all" target.

I compile the "exchdl" target because I am using an DW2 version of MinGW GCC.

The exchdl.dll gives crash information when Code::Blocks crashes; I am hoping compiling  a DW2 exchdl.dll will give better CB crash info.
But, so far my self compiled CB has refused to crash to confirm it works for me.


Patch I just used to compile wx29 version of exchdl.dll;
Note this is NOT a patch to be applied to trunk. Because it is no more correct than the original.
Note: I copied two DLLs (to the CB devel[29] folder) because I assumed it would need them when CB crashed.
The intl-8 and iconv DLLs.

Tested ONLY with the wx28 version of Code::Blocks.

Tim S.


Index: src/CodeBlocks_wx29.cbp
===================================================================
--- src/CodeBlocks_wx29.cbp (revision 8021)
+++ src/CodeBlocks_wx29.cbp (working copy)
@@ -13,14 +13,16 @@
<Option object_output=".objs29" />
<Option type="3" />
<Option compiler="gcc" />
+ <Option projectLinkerOptionsRelation="1" />
<Compiler>
<Add directory="base\exchndl\include" />
</Compiler>
<Linker>
<Add library="bfd" />
<Add library="iberty" />
- <Add library="intl" />
+ <Add library="intl-8" />
<Add directory="base\exchndl\lib" />
+ <Add directory="$(TARGET_COMPILER_DIR)/bin" />
</Linker>
</Target>
<Target title="tinyXML">
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

MortenMacFly

Quote from: stefanos_ on May 31, 2012, 11:45:00 AM
Is this the file I supposed to have, or should I find a newer version to install it?
Well that's the dynamic (runtime) library, what you need it the related import library - for example:
http://gnuwin32.sourceforge.net/packages/gettext.htm
-> "Developer files".
(But that is rather old.)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

stefanos_

thanks to both of you.

@stahta01, your patch seems to do the trick; let's wait to see if it compiles successfully without further complains.

cheers

stefanos_

#8
even though I have successully compiled CodeBlocks_wx29.cbp, ContribPlugins.workspace fails to compile at CppCheck.cpp


Compiling: CppCheckListLog.cpp
Linking dynamic library: ..\..\..\devel\share\codeblocks\plugins\CppCheck.dll
..\..\..\.objs\plugins\contrib\CppCheck\CppCheck.o: In function `ZN8CppCheck7ExecuteEv':
C:/SVN_Codes/CodeBlocks/src/plugins/contrib/CppCheck/CppCheck.cpp:223: undefined reference to `_imp___ZN11FileFilters13CPLPL_DOT_EXTE
'
collect2: ld returned 1 exit status
Process terminated with status 1 (1 minutes, 0 seconds)
1 errors, 7 warnings (1 minutes, 0 seconds)


Update: Obviously it won't compile properly at some point, because certain plugin projects point to wxWidgets 2.8.x whereas they should have pointed to wxWidgets 2.9.x, so basically it means to generate a new .cbp for each contrib/<Project name> and add it to a new workspace...

I will experiment and see how it goes.

Update Part 2: Forget about it! the entire project heavily uses parameters such as "wxmsw28$(WX_SUFFIX)" and "$(#WX.lib)\gcc_dll" to make a few...I think the best thing for Code::Blocks would be to separate CodeBlocks_wx29.cbp et al in a totally new branch and experiment in there, or even fork it in GitHub and play there. I will going to do it tonight at home.

ollydbg

If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

MortenMacFly

Quote from: stefanos_ on May 31, 2012, 03:12:47 PM
even though I have successully compiled CodeBlocks_wx29.cbp, ContribPlugins.workspace fails to compile at CppCheck.cpp
The contrib plugins are not guaranteed to work with wx2.9.x. There is work under-way (Biplab works on that to my knowledge), but so far only the C::B core and the core plugins are working properly under wx2.9.x.

BTW: The "contrib plugins" are called like that because actually the contributors should take care of that. Maybe you should contact the author of the CppCheck plugin.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

stefanos_

hey MortenMacFly, thanks for the reply.

I have decided not to fix anything myself, because after I have copied it locally and tried to work a bit with project files, i literally got lost from all those necessary changes i had to make.

Therefore I will continue working with the standard Code::Blocks.cbp project which i know it compiles just fine :)

Thanks for once again.

cheers