OCamlPro / wxOCaml

a WxWidgets binding for OCaml
Other
31 stars 8 forks source link

Build broken on macosx10.6.8 #1

Closed sergezloto closed 11 years ago

sergezloto commented 11 years ago

Had to modify Makefiles as follows to get it to link:


--- a/wxWidgets/Makefile
+++ b/wxWidgets/Makefile
@@ -33,12 +33,12 @@ lib$(NAME).a: $(OBJECTS)
 #      $(CXX) $(CXXFLAGS)  -g -Wl,--hash-size=31 -Wl,--reduce-memory-overheads -shared

 .cpp.o:
-       $(CXX) $(CXXFLAGS) $(CPPFLAGS) -g -Wl,--hash-size=31 -Wl,--reduce-memory-overhe
+       $(CXX) $(CXXFLAGS) $(CPPFLAGS) -g -DwxcREFUSE_MEDIACTRL -fPIC -c $< -o $@

 clean:
        rm -f *.so *.o *~ generated $(GENERATED_CPP_SOURCES) $(GENERATED_OCAML_SOURCES)

 test: hello.cpp
-       $(CXX) $(CXXFLAGS) $(CPPFLAGS) -g -Wl,--hash-size=31 -Wl,--reduce-memory-overhe
+       $(CXX) $(CXXFLAGS) $(CPPFLAGS) -g -DwxcREFUSE_MEDIACTRL -fPIC hello.cpp -o test

 # -pthread   -lwx_gtk2u_xrc-2.9 -lwx_gtk2u_stc-2.9 -lwx_gtk2u_richtext-2.9 -lwx_gtk2u_

Going further, build breaks with

serge-imac:ocplib-wxOCaml serge$ make
make -C wxDefsGen
make[1]: Nothing to be done for `all'.
make -C wxStubsGen
../_obuild/wxStubsGen/wxStubsGen.asm -api ../api \
        -cpp ../wxWidgets \
        -ocaml ../wxWidgets \
        ../api/*.api
Generate sources for version "2.9.4"
make -C  wxWidgets -j 1
make[1]: Nothing to be done for `all'.
ocp-build
Updating ocp-build.root
File "/Users/serge/tmp/github/ocplib-wxOCaml/samples/wxSamples-resources/resources.ocp", line 1, characters -1--1:
Error: in project "wxSamples-resources", the source filename
    "samples/wxSamples-resources/sample_xpm.ml" does not exist
RULE 12 (state active)
        SOURCE samples/wxSamples-resources/sample_xpm.ml(not available)
        SOURCE _obuild/wxSamples-resources/sample_xpm.mlmods ok(not available)
    /Users/serge/.opam/4.00.1/bin/ocamlopt.opt -c -o ${temp}/sample_xpm.cmx -I ./_obuild/wxSamples-resources -I ./samples/wxSamples-resources samples/wxSamples-resources/sample_xpm.ml
    Rename ${temp}/sample_xpm.cmi to _obuild/wxSamples-resources/sample_xpm.cmi
    Rename ${temp}/sample_xpm.cmx to _obuild/wxSamples-resources/sample_xpm.cmx
    Rename ${temp}/sample_xpm.o to _obuild/wxSamples-resources/sample_xpm.o
        TARGET _obuild/wxSamples-resources/sample_xpm.cmi
        TARGET _obuild/wxSamples-resources/sample_xpm.o
        TARGET _obuild/wxSamples-resources/sample_xpm.cmx
make: *** [all] Error 2
serge-imac:ocplib-wxOCaml serge$ 
lefessan commented 11 years ago

Building problems using "make" are obsolete. You should now use the "next" branch of OCamlPro/ocp-build to build the "next-ocpbuild" branch of WxOCaml.