Author Topic: Compiling Codeblocks from sourcecode  (Read 17968 times)

cprgmswr2

  • Guest
Compiling Codeblocks from sourcecode
« on: April 27, 2006, 11:04:41 pm »
When I tried to recompile codeblocks from the avaible source code by using the recent version of codeblocks updated april 26 and mingw 3.1.0 I get the following Error: cc1plus.exe: unrecognized option `-Winvalid-pch'

Can someone either point me to correct version of mingw for compile codeblocks itself or have suggestions for what the problem may be

takeshimiya

  • Guest
Re: Compiling Codeblocks from sourcecode
« Reply #1 on: April 27, 2006, 11:18:55 pm »
Yes, that version of mingw doesn't support precompiled headers.

See here for a more up-to-date version & guide: http://wiki.codeblocks.org/index.php?title=MinGW_installation

cprgmswr2

  • Guest
Re: Compiling Codeblocks from sourcecode
« Reply #2 on: April 27, 2006, 11:23:30 pm »
Thnx, Now I am having a problem with no wx directory, Where can I download the header files for the wxWidgets
« Last Edit: April 27, 2006, 11:28:49 pm by cprgmswr2 »

Offline squizzz

  • Almost regular
  • **
  • Posts: 132
Re: Compiling Codeblocks from sourcecode
« Reply #3 on: April 27, 2006, 11:44:35 pm »
Usually http://wxwidgets.org/ is a good place to get wxWidgets library, but there are issues with C::B + 2.6.3, so you may grab version 2.6.2 from sf.net project page here: http://sourceforge.net/project/showfiles.php?group_id=9863

Also this wiki article may help you set it up properly: http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.6.2_to_develop_Code::Blocks_%28MSW%29
this space is for rent

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: Compiling Codeblocks from sourcecode
« Reply #4 on: April 27, 2006, 11:50:36 pm »
It's damnably hard finding info on that wiki anymore.
All the old instruction pages have no links, and the current
linked pages have no instructions or are blank.

But... you can click on "special pages" then click on "show all pages"
and the old instructions are still there.

« Last Edit: April 28, 2006, 12:11:40 am by Pecan »

cprgmswr2

  • Guest
Re: Compiling Codeblocks from sourcecode
« Reply #5 on: April 27, 2006, 11:51:32 pm »
Is there currently anyone working on making codeblocks compatible with widgets 2.6.3?

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: Compiling Codeblocks from sourcecode
« Reply #6 on: April 27, 2006, 11:57:09 pm »
building codeblocks on windows : see the wiki : the nightly cookbook, explains everything (also on how to get that MingW) :
http://wiki.codeblocks.org/index.php?title=Nightly_Cookbook

Cb and wx 2.6.3. I am planning on providing a nightly based upon wx 2.6.3, we'll see what are the problems that are remaining. In the last couple of weeks, from time to time some code has changed to cope with 2.6.3.



cprgmswr2

  • Guest
Re: Compiling Codeblocks from sourcecode
« Reply #7 on: April 28, 2006, 01:47:16 am »
This is the error I am currently having. I am not sure how to currect the issue
ld.exe:: cannot find -lwxmsw26u

sethjackson

  • Guest
Re: Compiling Codeblocks from sourcecode
« Reply #8 on: April 28, 2006, 01:48:32 am »
This is the error I am currently having. I am not sure how to currect the issue
ld.exe:: cannot find -lwxmsw26u


Do you have an ANSI build of wx or a unicode one?

cprgmswr2

  • Guest
Re: Compiling Codeblocks from sourcecode
« Reply #9 on: April 28, 2006, 01:53:38 am »
I have both of them downloaded.

I am not sure exactly where the compiler expects the files to be is part of the problem and does the name matter?

sethjackson

  • Guest
Re: Compiling Codeblocks from sourcecode
« Reply #10 on: April 28, 2006, 02:29:42 am »
OK let me get this straight where did you download them from? You need the libs to build C::B.... Just having the DLL's won't work....

Download wx 2.6.3 from here.

http://prdownloads.sourceforge.net/wxwindows/wxMSW-2.6.3-Setup-1.exe

Then compile with these instructions... It doesn't matter that it says wx 2.6.2....

http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.6.2_to_develop_Code::Blocks_%28MSW%29


cprgmswr2

  • Guest
Re: Compiling Codeblocks from sourcecode
« Reply #11 on: April 28, 2006, 02:38:26 am »
I downloaded wx 2.6.3, and I set the global variable wx to point to that directory and then compiled the project and along the way I get the error message

   ld.exe:: cannot find -lwxmsw26u

I will addon that I now understand that I have to compile the library for wxWidgets before I can compile codeblocks, now the problem I am having is compiling wxWidgets library according to the link you sent me

After Researching and if I understand correctly, MingW cannot build the library for wxWidgets, only borland or vc++ can
« Last Edit: April 28, 2006, 03:29:00 am by cprgmswr2 »

sethjackson

  • Guest
Re: Compiling Codeblocks from sourcecode
« Reply #12 on: April 28, 2006, 03:33:01 am »
I downloaded wx 2.6.3, and I set the global variable wx to point to that directory and then compiled the project and along the way I get the error message

   ld.exe:: cannot find -lwxmsw26u

I will addon that I now understand that I have to compile the library for wxWidgets before I can compile codeblocks, now the problem I am having is compiling wxWidgets library according to the link you sent me

After Researching and if I understand correctly, MingW cannot build the library for wxWidgets, only borland or vc++ can

NO.  :shock: MinGW builds wx just fine. It is the official way of building C::B.... I have no clue where you read that....  :shock:

EDIT:

Here is what I do. I have MinGW.

Code: dos
cd <WXWIN>\build\msw

Code: dos
mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release 

That is all now wait for MinGW to finish compiling wx. Then compile C::B. :D HTH
« Last Edit: April 28, 2006, 03:37:31 am by sethjackson »

cprgmswr2

  • Guest
Re: Compiling Codeblocks from sourcecode
« Reply #13 on: April 28, 2006, 03:39:11 am »
I miss read the instructions...this is the output I am getting

Code
C:\Program Files\wxWidgets-2.6.3\build\msw>mingw32-make -f makefile.gcc BUILD=re
lease MONOLITHIC=1 SHARED=0 UNICODE=1
if not exist gcc_mswu mkdir gcc_mswu
if not exist ..\..\lib\gcc_lib mkdir ..\..\lib\gcc_lib
if not exist ..\..\lib\gcc_lib\mswu mkdir ..\..\lib\gcc_lib\mswu
if not exist ..\..\lib\gcc_lib\mswu\wx mkdir ..\..\lib\gcc_lib\mswu\wx
if not exist ..\..\lib\gcc_lib\mswu\wx\setup.h copy ..\..\include\wx\msw\setup.h
 ..\..\lib\gcc_lib\mswu\wx\setup.h
        1 file(s) copied.
if not exist ..\..\lib\gcc_lib\mswu\wx\msw mkdir ..\..\lib\gcc_lib\mswu\wx\msw
gcc -E "..\..\include\wx\msw\genrcdefs.h" > "..\..\lib\gcc_lib\mswu\wx\msw\rcdef
s.h"
gcc -c -o gcc_mswu\wxregex_regcomp.o  -O2 -mthreads  -DHAVE_W32API_H -I..\..\inc
lude -I..\..\lib\gcc_lib\mswu -D__WXMSW__ -D_UNICODE   -MTgcc_mswu\wxregex_regco
mp.o -MFgcc_mswu\wxregex_regcomp.o.d -MD ../../src/regex/regcomp.c
In file included from ../../src/regex/regcustom.h:39,
                 from ../../src/regex/regguts.h:38,
                 from ../../src/regex/regcomp.c:33:
../../include/wx/defs.h:210: error: syntax error before "typedef"
mingw32-make: *** [gcc_mswu\wxregex_regcomp.o] Error 1
« Last Edit: April 28, 2006, 04:43:07 am by cprgmswr2 »

sethjackson

  • Guest
Re: Compiling Codeblocks from sourcecode
« Reply #14 on: April 28, 2006, 03:44:19 am »
Ok I fixed the Wiki. someone changed the build steps (doesn't matter too much, but it wasn't correct). :P

Use this

Code: dos
mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release

EDIT:

You need at least GCC 3.4.2 to compile I belive.... I have 3.4.4 which comes with RC2. I think you have an older version of GCC.

See this.

http://wiki.codeblocks.org/index.php?title=MinGW_installation


« Last Edit: April 28, 2006, 03:47:29 am by sethjackson »