Author Topic: CodeBlocks_wx29.cbp linkage issue?  (Read 6084 times)

stefanos_

  • Guest
CodeBlocks_wx29.cbp linkage issue?
« on: May 31, 2012, 11:01:11 am »
hi everyone. I have tried to compile CodeBlocks_wx29.cbp and the first thing that says to me is

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

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

Offline xunxun

  • Almost regular
  • **
  • Posts: 187
Re: CodeBlocks_wx29.cbp linkage issue?
« Reply #1 on: May 31, 2012, 11:05:30 am »
I remembered exchndl don't need to be built.
Regards,
xunxun

stefanos_

  • Guest
Re: CodeBlocks_wx29.cbp linkage issue?
« Reply #2 on: May 31, 2012, 11:26:20 am »
so shall i remove it from Linker?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: CodeBlocks_wx29.cbp linkage issue?
« Reply #3 on: May 31, 2012, 11:36:51 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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

stefanos_

  • Guest
Re: CodeBlocks_wx29.cbp linkage issue?
« Reply #4 on: May 31, 2012, 11:45:00 am »
In
Code
C:\MinGW\__installer\downloaded\
this file libintl-0.17-1-mingw32-dll-8.tar.lzma is found and in
Code
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?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: CodeBlocks_wx29.cbp linkage issue?
« Reply #5 on: May 31, 2012, 01:50:32 pm »
In
Code
C:\MinGW\__installer\downloaded\
this file libintl-0.17-1-mingw32-dll-8.tar.lzma is found and in
Code
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.

Code
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">
« Last Edit: May 31, 2012, 02:20:02 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: CodeBlocks_wx29.cbp linkage issue?
« Reply #6 on: May 31, 2012, 01:51:47 pm »
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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

stefanos_

  • Guest
Re: CodeBlocks_wx29.cbp linkage issue?
« Reply #7 on: May 31, 2012, 02:54:58 pm »
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_

  • Guest
Re: CodeBlocks_wx29.cbp linkage issue?
« Reply #8 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

Code
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.
« Last Edit: May 31, 2012, 03:44:32 pm by stefanos_ »

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: CodeBlocks_wx29.cbp linkage issue?
« Reply #9 on: June 01, 2012, 02:04:34 am »
I found that exchndl does not need intl library, see:
http://forums.codeblocks.org/index.php/topic,15940.msg107630.html#msg107630
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.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: CodeBlocks_wx29.cbp linkage issue?
« Reply #10 on: June 01, 2012, 06:03:30 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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

stefanos_

  • Guest
Re: CodeBlocks_wx29.cbp linkage issue?
« Reply #11 on: June 02, 2012, 11:09:51 pm »
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