News:

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

Main Menu

Compiling Codeblocks from sourcecode

Started by cprgmswr2, April 27, 2006, 11:04:41 PM

Previous topic - Next topic

cprgmswr2

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

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

#2
Thnx, Now I am having a problem with no wx directory, Where can I download the header files for the wxWidgets

squizzz

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

Pecan

#4
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.


cprgmswr2

Is there currently anyone working on making codeblocks compatible with widgets 2.6.3?

killerbot

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

This is the error I am currently having. I am not sure how to currect the issue
ld.exe:: cannot find -lwxmsw26u

sethjackson

Quote from: cprgmswr2 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


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

cprgmswr2

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

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

#11
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

sethjackson

#12
Quote from: cprgmswr2 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

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) Select

cd <WXWIN>\build\msw


Code (dos) Select

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

cprgmswr2

#13
I miss read the instructions...this is the output I am getting

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

sethjackson

#14
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) Select

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