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

Offline cprgmswr2

  • Multiple posting newcomer
  • *
  • Posts: 40
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

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
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

Offline cprgmswr2

  • Multiple posting newcomer
  • *
  • Posts: 40
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: 2126
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 »

Offline cprgmswr2

  • Multiple posting newcomer
  • *
  • Posts: 40
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: 5149
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.



Offline cprgmswr2

  • Multiple posting newcomer
  • *
  • Posts: 40
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?

Offline cprgmswr2

  • Multiple posting newcomer
  • *
  • Posts: 40
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


Offline cprgmswr2

  • Multiple posting newcomer
  • *
  • Posts: 40
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
  1. cd <WXWIN>\build\msw
  2.  

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

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 »

Offline cprgmswr2

  • Multiple posting newcomer
  • *
  • Posts: 40
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: [Select]
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
  1. mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release
  2.  

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 »

Offline cprgmswr2

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: Compiling Codeblocks from sourcecode
« Reply #15 on: April 28, 2006, 03:51:06 am »
This is the version output

Code: [Select]
C:\Program Files\wxWidgets-2.6.3\build\msw>mingw32-make -v
GNU Make 3.80
Copyright (C) 2002  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

sethjackson

  • Guest
Re: Compiling Codeblocks from sourcecode
« Reply #16 on: April 28, 2006, 03:54:42 am »
Ok make is fine. What is you compiler version?

Offline cprgmswr2

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: Compiling Codeblocks from sourcecode
« Reply #17 on: April 28, 2006, 03:55:26 am »
compile version mingw 5.0.2

sethjackson

  • Guest
Re: Compiling Codeblocks from sourcecode
« Reply #18 on: April 28, 2006, 03:58:39 am »
compile version mingw 5.0.2

Waal not really. It is confusing I know. The MinGW packaging version is not the same as the GCC compiler version... I'm not sure what is going on (why you can't compile wx)......

Offline cprgmswr2

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: Compiling Codeblocks from sourcecode
« Reply #19 on: April 28, 2006, 04:01:56 am »
I don't know what happened, but I reinstalled wxWidgets and it appears to now be working. Yeah!

It has been building for several minutes now
« Last Edit: April 28, 2006, 04:07:56 am by cprgmswr2 »

Offline cprgmswr2

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: Compiling Codeblocks from sourcecode
« Reply #20 on: April 28, 2006, 04:38:20 am »
Just thought I would let you know that wxWidgets finally compiled and I was also able to compile codeblocks... Wow that was difficult! Its wonderful when something finally works

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Compiling Codeblocks from sourcecode
« Reply #21 on: April 28, 2006, 08:45:16 am »
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Compiling Codeblocks from sourcecode
« Reply #22 on: April 28, 2006, 11:17:46 am »
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.

Hello,

AFAIK, C::B works pretty fine with wxWidgets 2.6.3, especially since the layout problems have been solved :D. Anyway, more in-depth tests are needed.

Anyway, I use wxWidgets 2.6.3-RC1. I should build the 2.6.3 version with the 2 patches, but I like of time now :(.

Best wishes,
Michael

Offline cprgmswr2

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: Compiling Codeblocks from sourcecode
« Reply #23 on: April 28, 2006, 01:58:14 pm »
I built codeblocks with 2.6.3 wxWidgets.

And the reason I didn't read the information on how to compile codeblocks was the fact I didn't know it existed, sorry

And for some reason the first time I installed wxWdigets, it was corrupt

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2126
Re: Compiling Codeblocks from sourcecode
« Reply #24 on: April 28, 2006, 03:18:08 pm »
Why does nobody ever read Compiling Code::Blocks for Windows (ANSI and Unicode)?

Because it's hidden deep in the bowels of the forum. Every time I want  to recommend it to someone, it takes 10 minutes of "advanced searching" to find it.

May I put it in the wiki?

thanks
pecan
 

sethjackson

  • Guest
Re: Compiling Codeblocks from sourcecode
« Reply #25 on: April 28, 2006, 04:35:43 pm »
Why does nobody ever read Compiling Code::Blocks for Windows (ANSI and Unicode)?

Because it's hidden deep in the bowels of the forum. Every time I want  to recommend it to someone, it takes 10 minutes of "advanced searching" to find it.

May I put it in the wiki?

thanks
pecan
 

Yeah good idea. Wikify it. :D