On 15-4-2012 5:26, John Labenski wrote:
> On Sat, Apr 14, 2012 at 6:20 AM, klaas.holwerda<n...@klaasholwerda.nl>  wrote:
>
>> The problem came back, both vars are empty:
>>
>> if ((CMAKE_SIZEOF_VOID_P MATCHES 4) OR (CMAKE_CL_64 MATCHES 0))
>>      set(IS_32_BIT TRUE)
>>      set(IS_64_BIT FALSE)
>> elseif((CMAKE_SIZEOF_VOID_P MATCHES 8) OR (CMAKE_CL_64 MATCHES 1))
>>      set(IS_32_BIT FALSE)
>>      set(IS_64_BIT TRUE)
>> else()
>>      MESSAGE(WARNING "Oops, unable to determine if using 32 or 64 bit 
>> compilation.")
>>      MESSAGE(WARNING "CMAKE_SIZEOF_VOID_P ${CMAKE_SIZEOF_VOID_P} CMAKE_CL_64 
>> ${CMAKE_CL_64}" )
>> endif()
> Sounds like you may have the problem with CMake discussed here.
>
> http://www.cmake.org/pipermail/cmake/2011-January/042058.html
>
> Not sure how to handle that, maybe I should simply cache IS_XX_BIT so
> it stays the same between CMake runs.

That might be best.
I in general remove the whole build dir contents, to test cmake stuff, and 
clear the cache inside 
cmake-gui.
If i do that, it passed that part without problems somehow.

>
>> [ 19%] Building CXX object 
>> modules/luamodule/CMakeFiles/wxLuaModule.dir/__/wxbind/src/wxcore_gdi.cpp.o
>> /home/klaas/soft/wxlua/trunk/wxLua/modules/wxbind/src/wxcore_gdi.cpp: In 
>> function ‘int
>> wxLua_wxIconBundle_AddIcon(lua_State*)’:
>> /home/klaas/soft/wxlua/trunk/wxLua/modules/wxbind/src/wxcore_gdi.cpp:7356:29:
>>  warning: ‘void
>> wxIconBundle::AddIcon(const wxString&, long int)’ is deprecated (declared 
>> at
>> /usr/local/include/wx-2.9/wx/iconbndl.h:91) [-Wdeprecated-declarations]
>> /home/klaas/soft/wxlua/trunk/wxLua/modules/wxbind/src/wxcore_gdi.cpp: In 
>> function ‘int
>> wxLua_wxIconBundle_GetIcon1(lua_State*)’:
>> /home/klaas/soft/wxlua/trunk/wxLua/modules/wxbind/src/wxcore_gdi.cpp:7374:63:
>>  error: taking address
>> of temporary [-fpermissive]
> This line?
> const wxIcon* returns = (const wxIcon*)&self->GetIcon(size);
>
> I'm not sure how to convince GCC that this is a not a temporary
> variable since it isn't.
Why not?? A wxIcon is returned from GetIcon(size), and that is a temporary i 
think.
But i am not good at such thinks.
>
> Could you try this:
> const wxIcon* returns = reinterpret_cast<const wxIcon*>(&self->GetIcon(size));
Did not help.
But the next does ( it stores/copies the return wxIcon first ):

     static wxIcon icon = self->GetIcon(size);
     const wxIcon* returns = (const wxIcon*) &icon;

or:

     wxIcon icon = self->GetIcon(size);
     const wxIcon* returns = (const wxIcon*) &icon;


>
>> No id added this again ( -Wdeprecated-declarations does not seem to help, 
>> but i do get an enormous
>> amount of warning about it):
> That's fine, wxWidgets declares a lot of functions deprecated, but
> wxLua supports multiple versions. It's unfortunately something we have
> to live with, unless I ignore them all with -Wno-deprecated to silence
> them, which I probably will.
>
>>      if (IS_64_BIT)
>>          add_definitions( -fPIC )
>>          add_definitions(-Wdeprecated-declarations )
>>          add_definitions(-fpermissive)
>>          #set(CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} -fPIC)
>>      endif()
>>
>> I am now here:
>>
>> Linking CXX shared library libwx.so
>> /usr/bin/ld: /usr/local/lib/libwx_gtk2u_stc-2.9.a(stclib_stc.o): relocation 
>> R_X86_64_32 against
>> `wxStyledTextCtrl::sm_eventTable' can not be used when making a shared 
>> object; recompile with -fPIC
>> /usr/local/lib/libwx_gtk2u_stc-2.9.a: could not read symbols: Bad value
>> collect2: ld returned 1 exit status
>> make[2]: *** [modules/luamodule/libwx.so] Error 1
>> make[1]: *** [modules/luamodule/CMakeFiles/wxLuaModule.dir/all] Error 2
>> make: *** [all] Error 2
>>
>> No idea what this is all about. I believe -fPIC was used.
> -fPIC is definitely used for wxLua in 64-bit for everything, is it for
> wxWidgets when building staticly? You can probably check by calling
> wx-config --cxxflags
>
> This is what's going on. You build wxWidgets statically, and I bet
> they don't use -fPIC when building it. wxLua tries to create a shared
> libwx.so and links to the static wx libs and you get the -fPIC errors.
>
> Maybe rebuild wxWidgets with
>
> make CXXFLAGS=-fPIC CFLAGS=-fPIC (or do this through configure)

Done that, seems to help.

>
>> And libwx.so is that a wxLua lib?
> Yes, it is the Lua module that from Lua you call require("wx") to
> load, but I have not finished testing it.

oke.
>
>> Now i found BUILD_SHARED_LIBS as one of the Cmake options.
>>
>>
>>
>> Still see -shared in there :-(
> Yes, this is intentional. The library libwx.so must always be shared
> so it can be dynamically loaded from Lua.

I see.

>
> Can you compile the wxWidgets media control sample without error?
If you mean the MediaPlayer example, yes, and it works. I do not see another 
example, so i think 
that is the only one.

With all the advice, i now get until here (see end this mail). The library 
-lgstinterfaces-0.10 is 
missing to link too? If i add it by hand as -lgstinterfaces-0.10 down here, on 
the commandline, it 
links.
In aps/CMakeLists change this, also works:

     LINK_LIBRARIES
         #wxLuaBindLib
         ${wxLuaBind_ALL_LIBS}
         wxLuaSocketLib
         wxLuaDebugLib
         wxLuaLib
         LuaLib
         gstinterfaces-0.10
         ${wxWidgets_LIBRARIES}

With that i can compile completely! :-)
But -Wno-deprecated did not make much a difference for all the warnings??

Linking CXX executable wxLua
cd /home/klaas/soft/buildwxluadeb29/apps/wxlua && /usr/bin/cmake -E 
cmake_link_script 
CMakeFiles/wxLua_app.dir/link.txt --verbose=1
/usr/bin/c++    -pthread -g    CMakeFiles/wxLua_app.dir/src/lconsole.cpp.o 
CMakeFiles/wxLua_app.dir/src/wxlua.cpp.o  -o wxLua -rdynamic -L/usr/local/lib 
../../modules/wxbind/libwxLuaBindLib.so 
../../modules/wxluasocket/libwxLuaSocketLib.so 
../../modules/wxluadebug/libwxLuaDebugLib.so ../../modules/wxlua/libwxLuaLib.so 
../../modules/lua/libLuaLib.so -L/usr/local/lib -pthread 
/usr/local/lib/libwx_gtk2u_stc-2.9.a 
/usr/local/lib/libwx_gtk2u_xrc-2.9.a /usr/local/lib/libwx_baseu_net-2.9.a 
/usr/local/lib/libwx_gtk2u_media-2.9.a 
/usr/local/lib/libwx_gtk2u_propgrid-2.9.a 
/usr/local/lib/libwx_gtk2u_richtext-2.9.a /usr/local/lib/libwx_gtk2u_aui-2.9.a 
/usr/local/lib/libwx_gtk2u_html-2.9.a /usr/local/lib/libwx_gtk2u_adv-2.9.a 
/usr/local/lib/libwx_gtk2u_core-2.9.a /usr/local/lib/libwx_baseu_xml-2.9.a 
/usr/local/lib/libwx_baseu-2.9.a -lwxscintilla-2.9 -pthread -lgtk-x11-2.0 
-lgdk-x11-2.0 -latk-1.0 
-lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 
-lfreetype 
-lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lX11 
-lSM -lpng -ljpeg 
-lexpat -lwxregexu-2.9 -lwxtiff-2.9 -lz -ldl -lm 
../../modules/wxbind/libwxLuaBindLib.so 
../../modules/wxlua/libwxLuaLib.so ../../modules/lua/libLuaLib.so 
-L/usr/local/lib -pthread 
/usr/local/lib/libwx_gtk2u_stc-2.9.a /usr/local/lib/libwx_gtk2u_xrc-2.9.a 
/usr/local/lib/libwx_baseu_net-2.9.a /usr/local/lib/libwx_gtk2u_media-2.9.a 
/usr/local/lib/libwx_gtk2u_propgrid-2.9.a 
/usr/local/lib/libwx_gtk2u_richtext-2.9.a 
/usr/local/lib/libwx_gtk2u_aui-2.9.a /usr/local/lib/libwx_gtk2u_html-2.9.a 
/usr/local/lib/libwx_gtk2u_adv-2.9.a /usr/local/lib/libwx_gtk2u_core-2.9.a 
/usr/local/lib/libwx_baseu_xml-2.9.a /usr/local/lib/libwx_baseu-2.9.a 
-lwxscintilla-2.9 
-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 
-lgdk_pixbuf-2.0 
-lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 
-lgthread-2.0 -lrt 
-lglib-2.0 -lX11 -lSM -lpng -ljpeg -lexpat -lwxregexu-2.9 -lwxtiff-2.9 -lz -ldl 
-lm 
-Wl,-rpath,/usr/local/lib:/home/klaas/soft/buildwxluadeb29/modules/wxbind:/home/klaas/soft/buildwxluadeb29/modules/wxluasocket:/home/klaas/soft/buildwxluadeb29/modules/wxluadebug:/home/klaas/soft/buildwxluadeb29/modules/wxlua:/home/klaas/soft/buildwxluadeb29/modules/lua:
 

../../modules/wxbind/libwxLuaBindLib.so: undefined reference to 
`gst_implements_interface_check'
../../modules/wxbind/libwxLuaBindLib.so: undefined reference to 
`gst_bus_set_sync_handler'
../../modules/wxbind/libwxLuaBindLib.so: undefined reference to 
`gst_element_query_position'

etc.






------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to