Re: [wxhaskell-devel] Compile problems

2013-06-16 Thread Jeremy O'Donoghue
wxdirect does not support conditional compilation, I'm afraid. It's a large
part of the reason why there are separate branches for wxWidgets 2.8 and
2.9.

Adding a real C preprocessor to wxdirect is a pretty large task.

The usual approach we have used in the past is:
* Define function in the header read by wxdirect
* Define a 'NULL' implementation as well as the correct one, e.g.

In wxc_glue.h
int wxSomeClass_GetSomeParam( TSelf(wxSomeClass), int param1, int param2);

in SomeClass.cpp
EWXWEXPORT(int,wxSomeClass_GetSomeParam)(wxSomeClass* self, int param1, int
param2)
{
#if (wxVERSION_NUMBER < 2900)
return 0;
#else
// Do the real wrapping
#endif
}

This is far from ideal, but it is the simplest workaround to get things
compiling. You can use wxCHECK_VERSION above as well - I think the logic is
inverted, but the code is otherwise similar.

Jeremy


On 9 June 2013 21:52, Charles the Hawk  wrote:

> At first I installed the 90.0.1 from the older site.  I had to modify
> wxdirect to do an "import Foreign.C.Types" to get rid of the arg type
> errors and change the pointer assignment in eljpen.cpp that others have
> mentioned.  It was working fine so I installed the 90.1 from Atze's repo
> into a sandbox as described in the wiki.  I thought I changed the path
> to use the 90.1 wxdirect but it's possible the older modified wxdirect
> was running.  I'll try to play around with it some tomorrow and make
> sure my modified wxdirect isn't being run.  But I definitely had to
> change all the CHECK_VERSIONs to 2,9,4 or they could be commented out as
> Blair suggested.
>
> I think we need to decide what to do on conditional compiles. Either 1)
> modify wxdirect to handle them (way over my head), 2) no conditionals in
> the headers wxdirect processes which also means to leave out any new
> function not in a specific lower version, or 3) require a specific
> higher version.  It seems to me that #2 is probably the simplest and
> thus best way to go as that should work on more installs without
> requiring modifications unless it turns out that SetDeviceClippingRegion
> is actually required in 2.9.4 installs.
>
> On 06/09/2013 07:31 PM, harry wrote:
> > Blair Archibald  writes:
> >
> >> I used this repo: https://github.com/atzedijkstra/wxHaskell
> >> Using wxWidgets 2.9.4, and GHC 7.6.3 the only change needed is in
> > wxc/src/cpp/eljdc.cpp line 214 (the #if wxCHECK_VERSION(2,9,5) should be
> > commented out - or at least had to be on my setup.
> >> Then a simple: cabal install ./wxdirect ./wxc ./wxcore ./wx
> >> Should hopefully get you up and running, let me know how it goes.
> > I used that one as well, and got a ton of "Unacceptable argument type in
> > foreign declaration" errors, perhaps related to
> > http://hackage.haskell.org/trac/ghc/ticket/5610.
> >
> >
> >
> --
> > How ServiceNow helps IT people transform IT departments:
> > 1. A cloud service to automate IT design, transition and operations
> > 2. Dashboards that offer high-level views of enterprise services
> > 3. A single system of record for all IT processes
> > http://p.sf.net/sfu/servicenow-d2d-j
> > ___
> > wxhaskell-devel mailing list
> > wxhaskell-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wxhaskell-devel
>
>
>
> --
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> ___
> wxhaskell-devel mailing list
> wxhaskell-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wxhaskell-devel
>
--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
wxhaskell-devel mailing list
wxhaskell-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-devel


Re: [wxhaskell-devel] Compile problems

2013-06-16 Thread harry
harry  writes:

> I tried that, uuid.dll isn't there. Google isn't much help either.

If anyone's got wxhaskell working on Windows, could they upload the dll
somewhere pretty please?


--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
wxhaskell-devel mailing list
wxhaskell-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-devel


Re: [wxhaskell-devel] Compile problems

2013-06-16 Thread harry
Eric Kow  writes:

> Hmm, apparently somebody's been down a similar path
> 
> http://www.haskell.org/haskellwiki/WxHaskell/Windows
> 
> (search uuid.dll - not sure where it comes from though)

I tried that, uuid.dll isn't there. Google isn't much help either.


--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
wxhaskell-devel mailing list
wxhaskell-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-devel


Re: [wxhaskell-devel] Compile problems

2013-06-16 Thread Eric Kow
Hmm, apparently somebody's been down a similar path

http://www.haskell.org/haskellwiki/WxHaskell/Windows

(search uuid.dll - not sure where it comes from though)

On 16 June 2013 15:01, harry  wrote:
> Charles the Hawk  writes:
>
> I can compile wx now, but linking it into an application gives
>
> Loading package wxc-0.90.0.4 ... ghc.exe: uuid: The specified module could
> not be found.
> : can't load .so/.DLL for: uuid.dll (addDLL: could not load DLL)
>
> Any idea what it wants?
>
>
> --
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> ___
> wxhaskell-devel mailing list
> wxhaskell-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wxhaskell-devel



-- 
Eric Kow 

--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
wxhaskell-devel mailing list
wxhaskell-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-devel


Re: [wxhaskell-devel] Compile problems

2013-06-16 Thread harry
Charles the Hawk  writes:

I can compile wx now, but linking it into an application gives

Loading package wxc-0.90.0.4 ... ghc.exe: uuid: The specified module could
not be found.
: can't load .so/.DLL for: uuid.dll (addDLL: could not load DLL)

Any idea what it wants?


--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
wxhaskell-devel mailing list
wxhaskell-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-devel