|
From: Ryan P. <rpu...@gm...> - 2007-01-18 16:03:09
|
Hi I can't seem to build wxLua with Visual C++ 7.1 ToolKit or Visual C++ 2005 pro. I am really only tring to build wxLuaFreeze.exe using wxWidgets statically linked so I don't have any dependencies. I only get one error: ------ Rebuild All started: Project: app_wxluafreeze, Configuration: Release > Multilib Win32 ------ > 7>Deleting intermediate and output files for project 'app_wxluafreeze', > configuration 'Release Multilib|Win32' > 7>Compiling... > 7>wxluafreeze.cpp > 7>Compiling resources... > 7>Linking... > 7>wxlua_msw28_wxbind.lib(wx_bind.obj) : error LNK2019: unresolved external > symbol "__int64 __cdecl wxFileModificationTime(class wxString const &)" > (?wxFileModificationTime@@YA_JABVwxString@@@Z) referenced in function "int > __cdecl wxLua_function_wxFileModificationTime(struct lua_State *)" > (?wxLua_function_wxFileModificationTime@@YAHPAUlua_State@@@Z) > 7>..\..\..\bin\vc_lib\wxluafreeze.exe : fatal error LNK1120: 1 unresolved > externals > Please note: I changed 2 settings in all projects in VC 2005. 1) Using the multi-threaded run-time library NOT the DLL version 2) Set 'Treat wchar_t as built-in Type' to NO. (because my wxWidgets library is built using the VC 71. Toolkit and that is the default setting for VC7.1) -- Regards, Ryan RJP Computing |
|
From: John L. <jla...@gm...> - 2007-01-18 16:37:28
|
On 1/18/07, Ryan Pusztai <rpu...@gm...> wrote:
> Hi I can't seem to build wxLua with Visual C++ 7.1 ToolKit or Visual C++
> 2005 pro. I am really only tring to build wxLuaFreeze.exe using wxWidgets
> statically linked so I don't have any dependencies. I only get one error:
>
> > ------ Rebuild All started: Project: app_wxluafreeze, Configuration:
> Release Multilib Win32 ------
> > 7>Deleting intermediate and output files for project 'app_wxluafreeze',
> configuration 'Release Multilib|Win32'
> > 7>Compiling...
> > 7>wxluafreeze.cpp
> > 7>Compiling resources...
> > 7>Linking...
> > 7>wxlua_msw28_wxbind.lib(wx_bind.obj) : error LNK2019:
> unresolved external symbol "__int64 __cdecl wxFileModificationTime(class
> wxString const &)"
> (?wxFileModificationTime@@YA_JABVwxString@@@Z) referenced
> in function "int __cdecl
> wxLua_function_wxFileModificationTime(struct lua_State *)"
> (?wxLua_function_wxFileModificationTime@@YAHPAUlua_State@@@Z)
> > 7>..\..\..\bin\vc_lib\wxluafreeze.exe : fatal error
> LNK1120: 1 unresolved externals
> >
>
> Please note: I changed 2 settings in all projects in VC 2005.
> 1) Using the multi-threaded run-time library NOT the DLL version
> 2) Set 'Treat wchar_t as built-in Type' to NO. (because my wxWidgets library
> is built using the VC 71. Toolkit and that is the default setting for VC7.1)
Humm, that is strange. I just tried in VC 2005 with the default
include/wx/msw/setup0.h in debug multilib without a problem. The
changes you made should probably not matter. I have updated the
bindings files to take into account the wxWidgets wxUSE_DATETIME
#ifdef for these classes, but that shouldn't matter for you.
You may want to try to really clean things and rebuild or if you don't
think you'll use that function, just rem out the line in wx_bind.cpp
that calls wxFileModificationTime.
Regards,
John Labenski
|
|
From: Ryan P. <rpu...@gm...> - 2007-01-18 17:11:29
|
On 1/18/07, John Labenski <jla...@gm...> wrote: > > Humm, that is strange. I just tried in VC 2005 with the default > include/wx/msw/setup0.h in debug multilib without a problem. The > changes you made should probably not matter. I have updated the > bindings files to take into account the wxWidgets wxUSE_DATETIME > #ifdef for these classes, but that shouldn't matter for you. I actually have tried release multilib and release monolithic. It actually looks like the return type of '__int64' is the problem. Does that need to be converted to something Lua specific? I am totally guessing and don't quite understand the ins and outs of the internals of wxLua. I am writing a little wxLuaFreeze utility that will create executables through a gui interface. I am calling it "wxLuaFreezer". If you are interested in the script when I am done just let me know. I find it useful so far but I am not done. I also want it to change the default icon of the executable with reshacker. You may want to try to really clean things Yes I actually created a new directory and extracted the source zip file and that is what I get. and rebuild or if you don't > think you'll use that function, just rem out the line in wx_bind.cpp > that calls wxFileModificationTime. OK, any other ideas? I would like to use that function at some point. Is it because wxLua doesn't support that function? -- Regards, Ryan RJP Computing |
|
From: John L. <jla...@gm...> - 2007-01-18 18:38:05
|
On 1/18/07, Ryan Pusztai <rpu...@gm...> wrote:
> On 1/18/07, John Labenski <jla...@gm...> wrote:
> > Humm, that is strange. I just tried in VC 2005 with the default
> > include/wx/msw/setup0.h in debug multilib without a problem. The
> > changes you made should probably not matter. I have updated the
> > bindings files to take into account the wxWidgets wxUSE_DATETIME
> > #ifdef for these classes, but that shouldn't matter for you.
>
> I actually have tried release multilib and release monolithic. It actually
> looks like the return type of '__int64' is the problem. Does that need to be
> converted to something Lua specific? I am totally guessing and don't quite
> understand the ins and outs of the internals of wxLua.
Are you building on a 64 bit machine?
The wxFileModificationTime function has been rewritten to return a
wxDateTime instead of time_t since lua only has the double number type
so a wxDateTime is used to encapsulate it.
In wxWidgets 2.8 include/wx/filefn.h we have this
WXDLLIMPEXP_BASE time_t wxFileModificationTime(const wxString& filename);
and in wxLua/modules/wxbind/src/file.cpp
returns = new wxDateTime(wxFileModificationTime(filename));
finally, in include/wx/datetime.h we have
inline wxDateTime(time_t timet);
I don't understand why it doesn't work, wxFileModificationTime returns
time_t and wxDateTime takes time_t so why should it fail? I guess the
real problem is that wxFileModificationTime is missing for you.
==============================
Could you try to edit wxLua/modules/wxbind/src/file.cpp and test this
replacement code or variations of it to force your compiler to
recognize wxFileModificationTime? Maybe even try the wxWidgets minimal
sample and see if wxFileModificationTime works for you there?
returns = new wxDateTime((time_t)wxFileModificationTime(filename));
> I am writing a little wxLuaFreeze utility that will create executables
> through a gui interface. I am calling it "wxLuaFreezer". If you are
> interested in the script when I am done just let me know. I find it useful
> so far but I am not done. I also want it to change the default icon of the
> executable with reshacker.
That would be interesting, please post some updates as you go.
> OK, any other ideas? I would like to use that function at some point. Is it
> because wxLua doesn't support that function?
See above, but there is no reason why wxLua shouldn't be able to have
this work. It's something to do with your compiler or it's settings.
Regards,
John Labenski
|