Author Topic: Problems with compiling Code::Blocks and plugins  (Read 5380 times)

Offline L.A.T.

  • Single posting newcomer
  • *
  • Posts: 4
Problems with compiling Code::Blocks and plugins
« on: September 30, 2007, 05:17:01 pm »
Hello,
First off all, sorry for my possibly bad english, I am german and can´t write very perfectly.

Here´s the thing:
I´ve got problems to compile Code::Blocks and the plugins from the latest SVN (r4503).
The compiler I am using is the MinGW v.3.4.5.
Refered to this wiki-Page, first off all, I tried to compile wxWidgets. Therefore I got the source from here (wxMSW-2.8.6.zip for Windows XP SP2).
These are the settings I´ve used to compile it:

Quote
set path=%PATH%;C:\MinGW\bin;C:\MinGW\mingw32\bin;
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=0 MONOLITHIC=1 BUILD=release UNICODE=1 CLEAN
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=0 MONOLITHIC=1 BUILD=release UNICODE=1

As mentioned in the "Nightly cookbook" I should compile with SHARED=1 but there are uncoutable warnings, so I choosed SHARED=0 and it compiles without any error. The libraries can now be found in "C:\wxMSW-2.8.6\lib\gcc_lib".

Next step ist to build the plugins, by loading "C:\trunk\src\CodeBlocks.cbp" into Code::Blocks (v4491 from here).
Now Code::Blocks ask me for some global Variable definitions for "wx" so I entered the root path to wxWidgets ("C:\wxMSW-2.8.6") in the field "base". Once did that, C::B loads the project und I hit the "build"-Button.

1. (solved) The first error appears, when compiling "scintilla" and C::B asks for "...wx/setup.h" so I added the directory "C:\wxMSW-2.8.6\lib\gcc_lib\mswu\" which contains it, to Project -> Build options -> Search directories -> compiler;
This solves the problem.

2. Next message is "cannot find -lwxmsw28u" so I added all compiled libs from the wxwidgets directory to Project -> Build options -> Linker settings -> link libraries with absolute pathes. These are:
libwxexpat.a
libwxjpeg.a
libwxmsw28u.a (needed one)
libwxpng.a
libwxregexu.a
libwxtiff.a
libwxzlib.a

After doing this the same error still appears, so I added "C:\wxMSW-2.8.6\lib\gcc_lib" to Project -> Build options -> Search directories -> Linker. This solves the problem, but was directly followed by the next error:

Code
-------------- Build: scintilla in Code::Blocks ---------------
Linking dynamic library: devel\wxscintilla.dll
.objs\sdk\wxscintilla\src\PlatWX.o: In function `ZN4Font6CreateEPKciibbb':
C:/trunk/src/sdk/wxscintilla/src/PlatWX.cpp:109: undefined reference to `_imp___ZN19wxEncodingConverter22GetPlatformEquivalentsE14wxFontEncodingi'
.objs\sdk\wxscintilla\src\PlatWX.o: In function `ZN11SurfaceImpl10InitPixMapEiiP7SurfacePv':
C:/trunk/src/sdk/wxscintilla/src/PlatWX.cpp:222: undefined reference to `_imp___ZN8wxBitmapC1Eiii'

From here on I don´t know what to do and I can´t find anything in the forum because I don´t know for what I have to search to solve the problem. It would be nice if somebody could help.

greets
L.A.T.
« Last Edit: September 30, 2007, 05:32:59 pm by L.A.T. »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Problems with compiling Code::Blocks and plugins
« Reply #1 on: September 30, 2007, 06:45:45 pm »
FYI: The pulgins requires wxWidgets to be built using SHARED=1.

Try this, and then post the errors on compiling wxWidgets.

Code
set path=C:\MinGW\bin;C:\MinGW\mingw32\bin
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 CLEAN
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1
« Last Edit: September 30, 2007, 06:47:46 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 L.A.T.

  • Single posting newcomer
  • *
  • Posts: 4
Re: Problems with compiling Code::Blocks and plugins
« Reply #2 on: September 30, 2007, 07:03:44 pm »
Code
...
../../include/wx/event.h:33 warning: type attributes are honored only at type definition
../../include/wx/event.h:36 warning: type attributes are honored only at type definition
../../include/wx/event.h:37 warning: type attributes are honored only at type definition
../../include/wx/event.h:38 warning: type attributes are honored only at type definition
../../include/wx/event.h:39 warning: type attributes are honored only at type definition
../../include/wx/event.h:42 warning: type attributes are honored only at type definition
...
In file included from ../../include/wx/app.h:23
                 from ../../src/common/platinfo.cpp:30:

...
../../include/wx/intl.h:57 warning: type attributes are honored only at type definition
../../include/wx/intl.h:58 warning: type attributes are honored only at type definition
...
and so on

It´s always the same warning.

greets
L.A.T.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Problems with compiling Code::Blocks and plugins
« Reply #3 on: September 30, 2007, 07:35:25 pm »
Code
warning: type attributes are honored only at type definition

That warning can be ignored. They are talking about trying to reduce that warning in the development branch. I can not remember if the GCC or wxWidgets Development people are talking about a fix.

Tim S


« Last Edit: September 30, 2007, 07:41:15 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 L.A.T.

  • Single posting newcomer
  • *
  • Posts: 4
Re: Problems with compiling Code::Blocks and plugins
« Reply #4 on: September 30, 2007, 09:53:36 pm »
Thank you, now everything compiled fine.

Which is the right folder to use the new build, The "devel"- oder the "output"-Folder?
The development-Folder contains bigger files and also two more libs called "libwxscintilla.a" and "libcodeblocs.a"
Is this just for developement Code::Blocks itself and contains the debug-Version, so, for using the IDE for myself
I can simply use the Files in the "output"-Folder?

greets
L.A.T.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Problems with compiling Code::Blocks and plugins
« Reply #5 on: September 30, 2007, 10:01:25 pm »
The output folder is the correct folder to use.

The devel folder is to run Code::Blocks inside of Code::Blocks. The Code::Blocks developers are normally the only ones who do this.

Tim S
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 L.A.T.

  • Single posting newcomer
  • *
  • Posts: 4
Re: Problems with compiling Code::Blocks and plugins
« Reply #6 on: September 30, 2007, 11:13:58 pm »
Ok, just two last questions:
I want to setup a complete new IDE, so I need the whole standardlibriaries, like iostream, string, bitset and so on.
Where can I get them separatly for download? I don´t want to install C::B RC2 again to pick them out.

Maybe I´m blind, but where can I find a list of all plugins available and the download links?

thx for your time.

greets
L.A.T.

Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: Problems with compiling Code::Blocks and plugins
« Reply #7 on: September 30, 2007, 11:47:06 pm »
Hi !

When you download a nightly, all core plugins are available.
Most of the user contributed plugins can be found on the wiki

Dje

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Problems with compiling Code::Blocks and plugins
« Reply #8 on: September 30, 2007, 11:49:04 pm »
The nightly C:B does not contain minGW GCC.
I would download the MinGW-5.1.3 installer.
http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=240780&release_id=529741

Remember to pick the "Candidate" version when running the installer.

Tim S
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