Valik Posted May 15, 2009 Posted May 15, 2009 Read it here folks because it's not in the changelog: Revision: 4365 Author: Valik Date: 10:16:58 PM, Thursday, May 14, 2009 Message: Fixed: PluginOpen() returns -1 on failure. Changed: PlluginClose() now returns a boolean. ---- Modified : /trunk/autoit/src/script_process.cpp
JSThePatriot Posted May 15, 2009 Posted May 15, 2009 Read it here folks because it's not in the changelog: Revision: 4365 Author: Valik Date: 10:16:58 PM, Thursday, May 14, 2009 Message: Fixed: PluginOpen() returns -1 on failure. Changed: PlluginClose() now returns a boolean. ---- Modified : /trunk/autoit/src/script_process.cppValik, I wanted to personally thank you for working on the Plugin code. I know it may not have been much of your time, but I know your time is quite valuable so thank you. Jarvis AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)
monoceres Posted May 27, 2009 Posted May 27, 2009 (edited) I'm going to sound like a n00b now, but how the fuck do I link to the plugin sdk?My failing routine (Visual Studio 2008):Creating a new Win32 Project with Dll as configuration typeAdding the AU3_PLUGIN_SDK folder to the projects additional include directoriesCreating a new source file (main.cpp) and copying and pasting the contents of the sdk example in it.Adding the plugin source file to my project (right click and choosing add->from existing item)CompileLink time -- > Unresolved external symbol error!Going insane. I have an old project that compiles just fine, but I cannot remember how I configured it and I cannot see any differences from my above tactic.Anothing thing, why does it work when I change configuration type to static library (.lib)? Edited May 27, 2009 by monoceres Broken link? PM me and I'll send you the file!
JSThePatriot Posted May 27, 2009 Posted May 27, 2009 I'm going to sound like a n00b now, but how the fuck do I link to the plugin sdk?My failing routine (Visual Studio 2008):Creating a new Win32 Project with Dll as configuration typeAdding the AU3_PLUGIN_SDK folder to the projects additional include directoriesCreating a new source file (main.cpp) and copying and pasting the contents of the sdk example in it.Adding the plugin source file to my project (right click and choosing add->from existing item)CompileLink time -- > Unresolved external symbol error!Going insane. I have an old project that compiles just fine, but I cannot remember how I configured it and I cannot see any differences from my above tactic.Anothing thing, why does it work when I change configuration type to static library (.lib)?I haven't used VS to compile it at all. I always used Code::Blocks. I don't have the computer I did that on in front of me to remember what I did.......hrm. Will try to figure it out when I get an extra moment to pull that computer out.Thanks,Jarvis AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)
Richard Robertson Posted May 27, 2009 Posted May 27, 2009 I thought the plugin SDK was a project? I think it was. I just made a copy of it and built right on top of it.
monoceres Posted May 27, 2009 Posted May 27, 2009 I thought the plugin SDK was a project? I think it was. I just made a copy of it and built right on top of it.No, it's practically just au3plugin.c and au3plugin.h. There is a Dev-Cpp project included but that's kinda useless when you're using Visual Studio. Broken link? PM me and I'll send you the file!
Valik Posted May 27, 2009 Posted May 27, 2009 You do realize you left out the most important piece of information, right?
monoceres Posted May 27, 2009 Posted May 27, 2009 You do realize you left out the most important piece of information, right?The errors maybe? Here's the Build log.http://monoceres.se/Uploads/fail/BuildLog.htm Broken link? PM me and I'll send you the file!
Valik Posted May 27, 2009 Posted May 27, 2009 Are you 200% sure you're actually compiling au3plugin.c as part of the project? You only showed linker output. Do a /rebuild and show the full output from that so we can see the compiled files, too. Also, the reason it compiles as a static library is obvious: Libraries are compile-time files so the linker can resolve missing symbols in a library file. In other words, the linker doesn't know those symbols aren't missing intentionally to be resolved by another library somewhere when you attempt to use this library.
monoceres Posted May 27, 2009 Posted May 27, 2009 Are you 200% sure you're actually compiling au3plugin.c as part of the project? You only showed linker output. Do a /rebuild and show the full output from that so we can see the compiled files, too.No, however au3plugin.c do get listed when recompiling.Full log:http://monoceres.se/Uploads/fail/BuildLog2.htmAlso, the reason it compiles as a static library is obvious: Libraries are compile-time files so the linker can resolve missing symbols in a library file. In other words, the linker doesn't know those symbols aren't missing intentionally to be resolved by another library somewhere when you attempt to use this library.Of course Broken link? PM me and I'll send you the file!
Valik Posted May 27, 2009 Posted May 27, 2009 Send me the project. I can't seem to get linker errors with our test example.
Valik Posted May 27, 2009 Posted May 27, 2009 Hmph at knowing what was wrong all along. It's a linkage issue due to mixed C and C++. It's an SDK issue you can fix one of two ways. The way we'll fix it is to do the following: #ifdef __cplusplus extern "C" { #endif // C++ /* Helper functions for working with variant like variables */ AU3_PLUGIN_VAR * AU3_AllocVar(void); AU3_PLUGINAPI void AU3_FreeVar(AU3_PLUGIN_VAR *pVar); void AU3_ResetVar(AU3_PLUGIN_VAR *pVar); int AU3_GetType(const AU3_PLUGIN_VAR *pVar); void AU3_SetString(AU3_PLUGIN_VAR *pVar, const char *szString); char * AU3_GetString(const AU3_PLUGIN_VAR *pVar); void AU3_FreeString(char *szString); void AU3_SetInt32(AU3_PLUGIN_VAR *pVar, int nValue); int AU3_GetInt32(const AU3_PLUGIN_VAR *pVar); void AU3_SetInt64(AU3_PLUGIN_VAR *pVar, __int64 n64Value); __int64 AU3_GetInt64(const AU3_PLUGIN_VAR *pVar); void AU3_SetDouble(AU3_PLUGIN_VAR *pVar, double fValue); double AU3_GetDouble(const AU3_PLUGIN_VAR *pVar); void AU3_SethWnd(AU3_PLUGIN_VAR *pVar, HWND hWnd); HWND AU3_GethWnd(const AU3_PLUGIN_VAR *pVar); int AU3_HexToDec(const char *szHex); #ifdef __cplusplus } #endif // C++ That will be fixed in the SDK shortly. The alternative is to right-click au3plugin.c and change the "Compile as" option to C++ (it's C by default). I don't recommend this since you'll likely forget. Besides this is trivial to solve in the SDK itself.
monoceres Posted May 27, 2009 Posted May 27, 2009 Thanks Valik. I can now go to sleep in a good mood. Broken link? PM me and I'll send you the file!
monoceres Posted May 28, 2009 Posted May 28, 2009 Wouldn't it be kinda logical to receive a wide string from AU3_GetString() or at least add AU3_GetWString() since autoit uses Unicode internally? Broken link? PM me and I'll send you the file!
Valik Posted May 28, 2009 Posted May 28, 2009 (edited) IIRC the SDK was written before AutoIt was UNICODE. It needs a lot of work and that is just one of the many things that it needs to better do. Edited May 28, 2009 by Valik
JSThePatriot Posted May 29, 2009 Posted May 29, 2009 IIRC the SDK was written before AutoIt was UNICODE. It needs a lot of work and that is just one of the many things that it needs to better do.Yes it was definitely written before AutoIt went UNICODE. It does need work. I would love to see this section completed. There are so many things that can now be done with Plugins, and I think it would help make many things quite powerful, and potentially quicker than some UDF's.Till then, I sit with patience,Jarvis AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)
Valik Posted June 8, 2009 Posted June 8, 2009 (edited) I have updated the SDK download in the first post with a new version (SFX format instead of ZIP). The new version just fixes the C++ linkage issue. Edited June 8, 2009 by Valik Typo.
Richard Robertson Posted June 9, 2009 Posted June 9, 2009 Are there plans to redo the plugins for newly supported features?
Valik Posted June 9, 2009 Posted June 9, 2009 This was just a maintenance release I did for you guys. The status of the plugin architecture hasn't changed otherwise.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now