[I'm cc'ing this to the list as Nerijus worked on cygwin compilation as
 well and could be interested -- hopefully it's ok]


 Hello,

 sorry for the delay with reply, I didn't have any time at all for Mahogany
during the last 2 weeks. This should get a bit better now...


On Thu, 15 Apr 2004 12:43:04 +0100 (BST) JX  wrote:

J> I have downloaded and built WxWindows 2.5.1.
J> I have checked the latest source code (MAIN) out of Mahogany CVS.
J> When trying to build under Cygwin on Win2k, I get the following errors;
J> 
J> make[2]: Entering directory
J> `/cygdrive/d/home/alastairg/Misc/Mahogany/M/extra/sr
J> c/c-client'
J> make -j1 all CC=`cat CCTYPE` CFLAGS="`cat CFLAGS`" `cat SPECIALS`
J> gcc -g -O -I/usr/include/openssl -DNO_IDEA -DNO_DSA -DOPENSSL_NO_KRB5  
J> -c -o fd
J> string.o fdstring.c
J> fdstring.c: In function `fd_string_init':
J> fdstring.c:57: error: `SEEK_SET' undeclared (first use in this
J> function)
J> fdstring.c:57: error: (Each undeclared identifier is reported only once
J> fdstring.c:57: error: for each function it appears in.)
J> fdstring.c: In function `fd_string_setpos':
J> fdstring.c:87: error: `SEEK_SET' undeclared (first use in this
J> function)
J> make[4]: *** [fdstring.o] Error 1
J> make[3]: *** [missing] Error 2
J> make[2]: *** [c-client.a] Error 2
J> make[2]: Leaving directory
J> `/cygdrive/d/home/alastairg/Misc/Mahogany/M/extra/src
J> /c-client'
J> make[1]: *** [all] Error 2
J> make[1]: Leaving directory
J> `/cygdrive/d/home/alastairg/Misc/Mahogany/M/extra'
J> make: *** [all] Error 2
J> 
J> 
J> Note that there is no error stating that it couldn't find a header
J> file, and also that /usr/include/stdio.h defines SEEK_SET.
J> 
J> Funnily enough, fdstring.c does not include stdio.h.

 This is weird and I still don't see any explanation for this but, from
your next message, I guess you found it?


On Mon, 19 Apr 2004 11:45:23 +0100 (BST) JX wrote:

J> The tricky problem was to do with the fact that when building the
J> c-client code, a file called CCTYPE is generated. Renaming this file
J> solves the problem.

 Could you please explain me why is this a problem?

J> I am now stuck because Mahogany has a class called SendMessage which
J> also happens to be a Win32 function name. I don't know if the Win32
J> headers are being included through Cygwin or through wxWindows, but it
J> is breaking the compile, and fixing the problem involves such a major
J> code re-write, that I have not the time or authority to do it. Using a
J> mahogany specific namespace would solve this problem.

 No, actually it wouldn't because SendMessage is a macro. Anyhow, fixing it
is far from being as difficult as you think: you just have to #include
<wx/msw/winundef.h> after the header which inclues <windows.h>. Actually,
maybe simply avoiding testing for OS_WIN in include/Mcclient.h would fix
it? I don't know whether OS_WIN is defined for cygwin or not right now. It
shouldn't be, normally, and wxWin will be chanegd to treat cygwin as just
another Unix and not some strange hybrid of Unix and Windows as right now.

J> The nature of most of the problems is such that I am surprised that the
J> code compiles on Windows at all.

 Probably because it is built only using compilers understanding PCH and
gcc doesn't (until today, when 3.4.0 was released, that is).

J> Here is a summary of fixes I have done
J> so far. I hope you find them helpful. If you implement these fixes, and
J> solve the SendMessage problem, please let me know so that I can try
J> building Mahogany again.
J> 
J> ---
J> 
J> Edit M/extra/src/c-client/fdstring.c to include <stdio.h>

 I'll try to update to the latest (2004 as opposed to 2001 we're using
right now) version of cclient soon, let's see if it's not fixed there
already.
 
J> Edit M/Extra/src/c-client/Makefile to rename CCTYPE to something less
J> damaging such as CCLIENT_CCTYPE. Might be a good idea to do the same
J> with other files such as CFLAGS.

 I still don't know why is this needed and I'd like to avoid modifying
cclient unless *absolutely* needed.

J> Edit M/include/gui/wxDialogLayout.h to add line;
J>      class WXDLLEXPORT wxScrolledWindow;
J> and cast returns from GetCanvas() to (wxWindow *).
J>
J> modify the following files to include <wx/dcclient.h>;
J>      src/adb/AdbFrame.cpp
J> 
J> modify the following files to include <wx/settings.h>;
J>      src/adb/AdbFrame.cpp

 Ok, done (inside #ifndef USE_PCH), thanks!
VZ



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Mahogany-Developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-developers

Reply via email to