User forums > Help

Nightly builds no longer compile

(1/2) > >>

merlin:
Hi,

I've been compiling nightly builds for a long time without a problem, until now.  About the time Codeblocks 8.02 was released I upgraded to a new computer running vista.

I installed the latest cygwin (not used for compiling wxWidgets or Codeblocks), MinGW, wxWidgets 2.8.9 (compiled with MinGW) and Codeblocks 8.02 on the machine.  After that I get the following error trying to compile codeblocks from the svn source:


-------------- Build: sdk in Code::Blocks ---------------

Running target pre-build steps
build_tools/autorevision/autorevision +wx +int +t . include/autorevision.h
'svn' is not recognized as an internal or external command,
operable program or batch file.
Precompiling header: include\sdk_precomp.h
In file included from C:/cygwin/home/paul/Workspace/wxWidgets-2.8.9/include/wx/gsocket.h:175,
                 from C:/cygwin/home/paul/Workspace/wxWidgets-2.8.9/include/wx/sckaddr.h:20,
                 from C:/cygwin/home/paul/Workspace/wxWidgets-2.8.9/include/wx/socket.h:24,
                 from C:\Users\paul\Documents\Workspace\codeblocks\trunk\src\include\sdk_common.h:82,
                 from C:\Users\paul\Documents\Workspace\codeblocks\trunk\src\include\sdk_precomp.h:13:
C:/cygwin/home/paul/Workspace/wxWidgets-2.8.9/include/wx/msw/gsockmsw.h:93: error: `SOCKET' does not name a type
C:/cygwin/home/paul/Workspace/wxWidgets-2.8.9/include/wx/msw/gsockmsw.h:104: error: field `m_timeout' has incomplete type
Process terminated with status 1 (0 minutes, 56 seconds)
2 errors, 11 warnings
 

Everything up to the sdk compiles just fine.

It looks like winsock.h needs to be included but I would have thought that the wxWidgets headers would look after that and I've never needed to change anything before this.

Wondering if anyone else has had a similar problem (and found a solution to it :-)

Windows Vista Home Premium
MinGW 5.1.4
wxWidgets 2.8.9
Codeblocks 8.02
Codeblocks source latest nightly svn

MortenMacFly:

--- Quote from: merlin on November 05, 2008, 07:16:11 am ---Wondering if anyone else has had a similar problem (and found a solution to it :-)

--- End quote ---
I don't know why you need Cygwin but my 2 cents that this is the cause of the error. It seems you are trying to use Cygwin header files for compilation (even if you say you just installed it).
Please do only install the MinGW compiler suite, then don't put your project under a Cygwin "managed" folder, remove any references to Cygwin (there might be an environment variable set, for example) and try again.

merlin:
That had crossed my mind but since i was running much the same configuration on my old XP computer I had discounted it and a possibility.

But in desperation I figured your suggestion was worth a shot.  Since I wanted to re-install vista anyway I bit the bullet and did it yesterday.

BTW:  The reason for cygwin is that (apart from running xterms) I develop for several different compilers.  There was about 6 different toolchains on my XP box without any problems (getting paranoid enough to think that its maybe a vista thing)

Installed wxWidgets 2.8.9 for windows using the windows installer from the wx site.  Path: c:\wxWidgets-2.8.9

I installed codeblocks-8.02 + mingw.

I compiled wxWidgets using mingw that was installed with codeblocks.  Used the following command line:

mingw32-make SHARED=1 USE_OPENGL=1 BUILD=release MONOLITHIC=1 OFFICIAL_BUILD=1 UNICODE=1 -f makefile.gcc

I checked out the latest svn (about 4 hours before this post) and got the same error:


-------------- Build: sdk in Code::Blocks ---------------

Running target pre-build steps
build_tools/autorevision/autorevision +wx +int +t . include/autorevision.h
'svn' is not recognized as an internal or external command,
operable program or batch file.
Precompiling header: include\sdk_precomp.h
In file included from C:/wxWidgets-2.8.9/include/wx/gsocket.h:175,
                 from C:/wxWidgets-2.8.9/include/wx/sckaddr.h:20,
                 from C:/wxWidgets-2.8.9/include/wx/socket.h:24,
                 from C:\Users\paul\Documents\Workspace\codeblocks\trunk\src\include\sdk_common.h:82,
                 from C:\Users\paul\Documents\Workspace\codeblocks\trunk\src\include\sdk_precomp.h:13:
C:/wxWidgets-2.8.9/include/wx/msw/gsockmsw.h:93: error: `SOCKET' does not name a type
C:/wxWidgets-2.8.9/include/wx/msw/gsockmsw.h:104: error: field `m_timeout' has incomplete type
Process terminated with status 1 (1 minutes, 5 seconds)
2 errors, 11 warnings

 
I'm really stumped now.

stahta01:
The setup.h you are using should be here:
C:\wxWidgets-2.8.9\lib\gcc_dll\mswu\wx\setup.h

How did you change it, from the default settings?

Tim S

PS: You may want to read this link
http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows#Compile_wxWidgets_in_Unicode_mode

merlin:
I compiled wx in unicode mode with:

mingw32-make SHARED=1 USE_OPENGL=1 BUILD=release MONOLITHIC=1 OFFICIAL_BUILD=1 UNICODE=1 -f makefile.gcc

I didn't see any need to change the setup.h since the only thing that I would have altered ws wxUSE_UNICODE and that does not need to be changed since it is defined in the C::B project and in setup.h it is:

#ifndef wxUSE_UNICODE
    #define wxUSE_UNICODE 0
#endif

so the #define there will never be evaluated.

I did give up on finding the cause of the problem and went for a brute force solution.  Changing sdk_common.h :

    #include <wx/process.h>
    #include <wx/radiobox.h>
    #include <wx/radiobut.h>
    #include <wx/regex.h>
    #include <wx/sizer.h>
#include <winsock.h>
    #include <wx/socket.h>
    #include <wx/spinctrl.h>
    #include <wx/splitter.h>
    #include <wx/stattext.h>
    #include <wx/string.h>

makes it all work perfectly.  As I said in my original post, it appeared as if winsock.h is not being included.  I can't find a good reason why this is so.  If anyone else was having a problem then I would put it down to a bug in the order of includes.  Since it seems to be unique to me then it must something more subtle.

Suggestions are still welcome as I would like to find a "correct" solution ot this.

Navigation

[0] Message Index

[#] Next page

Go to full version