forums › forums › SQLyog › SQLyog Localization and Source Code Discussions › Sqlyog Compiler Errors
- This topic is empty.
-
AuthorPosts
-
-
July 24, 2010 at 7:05 am #12052jan marco alkemaMember
Compiler errors SQLYog win32 (XP, visual studio 2005, Checked out revision 257) :
1>c:devsqlyog-read-only-20100724srcwystring.cpp(624) : error C2440: '=' : cannot convert from 'const char *' to 'wyChar *'
1>c:devsqlyog-read-only-20100724srcwystring.cpp(631) : error C2440: '=' : cannot convert from 'const char *' to 'wyChar *'
Compiler errors SQLYog win64 (Window7, Checked out revision 257) :
The Compiler errors I get in a 64 bit Windows 7. My environment is the same as suggested in section “Build environment” (visual studio 2008) in http://sites.google.com/a/chromium.org/dev/developers/how-tos/build-instructions-windows
1>
Rebuild All started: Project: SQLyogCommunity, Configuration: Debug x64
1>Deleting intermediate and output files for project 'SQLyogCommunity', configuration 'Debug|x64'
1>cl : Command line warning D9035 : option 'Wp64' has been deprecated and will be removed in a future release
1>BlobMgmt.cpp
1>..srcBlobMgmt.cpp(102) : error C2065: 'GWL_USERDATA' : undeclared identifier
.
.
1>CommunityRibbon.cpp
1>..srcCommunityRibbon.cpp(70) : error C2065: 'GWL_WNDPROC' : undeclared identifier
.
.
1>ConnectionBase.cpp
1>..srcConnectionBase.cpp(99) : error C2065: 'GWL_USERDATA' : undeclared identifier
.
.
1>ConnectionCommunity.cpp
1>..srcConnectionCommunity.cpp(732) : error C2065: 'GWL_USERDATA' : undeclared identifier
.
.
1>CopyDatabase.cpp
1>..srcCopyDatabase.cpp(109) : error C2664: 'DialogBoxParamW' : cannot convert parameter 4 from 'wyInt32 (__cdecl *)(HWND,UINT,WPARAM,LPARAM)' to 'DLGPROC'
1> None of the functions with this name in scope match the target type
1>..srcCopyDatabase.cpp(121) : error C2065: 'GWL_USERDATA' : undeclared identifier
1>CustTab.cpp
1>..srcDataViewBase.cpp(2332) : error C2065: 'GWL_USERDATA' : undeclared identifier
.
.
1>DataViewQuery.cpp
1>..srcDataViewQuery.cpp(348) : error C2065: 'GWL_WNDPROC' : undeclared identifier
.
.
1>DataViewTable.cpp
1>..srcDataViewTable.cpp(221) : error C2065: 'GWL_USERDATA' : undeclared identifier
.
.
1>SQLyogCommunity – 259 error(s), 332 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
-
July 26, 2010 at 5:56 am #31144KhushbooMember
Hi,
We develop SQLyog in Visual Studio 2003 (win32) but it can be build in VS 2005 and 2008 also.
Quote:Compiler errors SQLYog win32 (XP, visual studio 2005, Checked out revision 257)Thank you for reporting this, we have fixed these errors and committed the code here:
https://sqlyog.googlecode.com/svn/trunk
Please update and check.
Quote:Compiler errors SQLYog win64 (Window7, Checked out revision 257)We have planned to migrate our project from VS 2003 to VS 2010. We will take care of all these issues, related to win64 compilation in future.
Thank You.
Regards,
Khushboo
-
July 26, 2010 at 7:43 am #31145jan marco alkemaMemberQuote:Please update and check.
32 bits compilation works again (Checked out revision 258):
Visual studio 2005:
1>
Rebuild All started: Project: SQLyogCommunity, Configuration: Debug Win32
1>SQLyogCommunity – 0 error(s), 773 warning(s)
Visual studio 2008:
1>
Rebuild All started: Project: SQLyogCommunity, Configuration: Debug Win32
1>SQLyogCommunity – 0 error(s), 781 warning(s)
-
July 28, 2010 at 8:50 am #31146jan marco alkemaMember
Khushboo,
http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/c62b1bf5-6a03-4c66-b24b-ea9fec3f2695 -> http://msdn.microsoft.com/en-us/library/ms644898
I renamed:
SetWindowLong to SetWindowLongPtr
GetWindowLong to GetWindowLongPtr
and
GWL_USERDATA to GWLP_USERDATA
GWL_WNDPROC to GWLP_WNDPROC
You get some errors like:
>error C2664: 'DialogBoxParamW' : cannot convert parameter 4 from 'wyInt32 (__cdecl *)(HWND,UINT,WPARAM,LPARAM)' to 'DLGPROC'
//ret = DialogBoxParam(pGlobals->m_hinstance, MAKEINTRESOURCE(IDD_COPYDATABASE), hwndparent, CopyDatabase::WndProc,(LONG)this);
ret = DialogBoxParam(pGlobals->m_hinstance, MAKEINTRESOURCE(IDD_COPYDATABASE), hwndparent, (DLGPROC) CopyDatabase::WndProc,(LONG)this);
delete HTMLayout.lib from Property pages -> Linker -> Input -> Additional Dependencies and put it under “compiler switch”:
#if defined _M_IX86
#pragma comment( lib, “../lib/HTMLayout.lib” )
#elif defined _M_X64
#pragma comment( lib, “../lib/HTMLayout64.lib” )
#endif
The same can be done with “../lib/pcre.lib” and “/lib/sqlited.lib”. N.B. I will do it another way, I will include the source code of pcre and sqlited in WinMain.cpp.
=============
1>Linking…
1>WinMain.obj : error LNK2019: unresolved external symbol sqlite3_close referenced in function “public: static enum wyBool __cdecl FrameWindow::CheckForAutoKeywords(void)” (?CheckForAutoKeywords@FrameWindow@@SA?AW4wyBool@@XZ)
1>WinMain.obj : error LNK2019: unresolved external symbol sqlite3_open referenced in function “public: static enum wyBool __cdecl FrameWindow::CheckForAutoKeywords(void)” (?CheckForAutoKeywords@FrameWindow@@SA?AW4wyBool@@XZ)
1>WinMain.obj : error LNK2001: unresolved external symbol pcre_free
1>WinMain.obj : error LNK2019: unresolved external symbol pcre_exec referenced in function “int __cdecl MatchStringPattern(char const *,char *,int *,int)” (?MatchStringPattern@@YAHPEBDPEADPEAHH@Z)
1>WinMain.obj : error LNK2019: unresolved external symbol pcre_compile referenced in function “int __cdecl MatchStringPattern(char const *,char *,int *,int)” (?MatchStringPattern@@YAHPEBDPEADPEAHH@Z)
1>WinMain.obj : error LNK2019: unresolved external symbol sqlite3_exec referenced in function “int __cdecl YogSqliteExec(struct sqlite3 *,char const *,int (__cdecl*)(void *,int,char * *,char * *),void *,char * *)” (?YogSqliteExec@@YAHPEAUsqlite3@@PEBDP6AHPEAXHPEAPEAD3@Z23@Z)
1>WinMain.obj : error LNK2019: unresolved external symbol sqlite3_busy_timeout referenced in function “enum wyBool __cdecl OpenKeyWordsDB(struct sqlite3 * *)” (?OpenKeyWordsDB@@YA?AW4wyBool@@PEAPEAUsqlite3@@@Z)
1>DebugBinary/SQLyog.exe : fatal error LNK1120: 7 unresolved externals
Greetings Jan Marco
-
July 28, 2010 at 10:52 am #31147KhushbooMember
Hi,
Thank you for this valuable information.
We will look into it while migrating our project from VS 2003 to VS 2010.
Regards,
Khushboo
-
August 7, 2010 at 4:25 am #31148jan marco alkemaMember
Khushboo,
Quote:We will look into it while migrating our project from VS 2003 to VS 2010.1) When will the migration be planned to execute?
2) Is there a (technical) dependency on porting SQLYog to 64 bits and the migration of “VS 2003 to VS 2010”?
See http://msdn.microsoft.com/en-us/library/aa384242(VS.85).aspx for the Rules for Using Pointers:
Quote:For example, the following code does not compile:SetWindowLong(hWnd, GWL_WNDPROC, (LONG)MyWndProc);
It should be changed as follows:
SetWindowLongPtr(hWnd, GWLP_WNDPROC, (LONG_PTR)MyWndProc);
LONG_PTR is declared in basetsd.h ( http://www.virtualbox.org/svn/vbox/trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/basetsd.h ).
SQLYog uses different type casting (wyInt32, DWORD, LONG) for parameter dwNewLong in routine ‘SetWindowLong’:
//SetWindowLong(hwnd, GWL_USERDATA,(wyInt32)pcquerywnd);
SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR) pcquerywnd);
//m_wporigproc =(WNDPROC)SetWindowLong(hwndedit, GWL_WNDPROC,(DWORD)TabHistory::WndProc);
m_wporigproc =(WNDPROC)SetWindowLongPtr(hwndedit, GWLP_WNDPROC,(LONG_PTR) TabHistory::WndProc);
//SetWindowLong(hDlg, GWL_USERDATA,(LONG)lParam);
SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR) lParam);
If you use (large) arrays (see http://stackoverflow.com/questions/1271748/dword-ptr-int-ptr-long-ptr-uint-ptr-ulong-ptr-when-how-and-why ) :
Quote:By using these _PTR types, one codebase can compile for both Win32 and Win64 targets. When performing pointer arithmetic, these types should also be used in 32bit code that needs to be compatible with 64bit. So, if you need to access an array with more than 4billion elements, you would need to use an INT_PTR rather than an INTCHAR* pHuge = new CHAR[0x200000000]; // allocate 8 billion bytes
INT idx;
INT_PTR idx2;
pHuge[idx]; // can only access the 1st 4 billion elements.
pHuge[idx2]; // can access all 64bits of potential array space.
Detect whether operating system is 32-bit or 64-bit (Hans Dietrich):
// Detect whether OS is 32-bit or 64-bit
BOOL Is64BitOS()
{
BOOL bIs64Bit = FALSE;
#if defined(_WIN64)
bIs64Bit = TRUE; // 64-bit programs run only on Win64
#elif defined(_WIN32)
// Note that 32-bit programs run on both 32-bit and 64-bit Windows
typedef BOOL (WINAPI *LPFNISWOW64PROCESS) (HANDLE, PBOOL);
LPFNISWOW64PROCESS pfnIsWow64Process = (LPFNISWOW64PROCESS)GetProcAddress(GetModuleHandle(_T(“kernel32”)), “IsWow64Process”);
if (pfnIsWow64Process)
pfnIsWow64Process(GetCurrentProcess(), &bIs64Bit);
#endif
return bIs64Bit;
}
Greetings Jan Marco
-
August 7, 2010 at 8:05 am #31149jan marco alkemaMember
Checked out revision 261, VS2005, XP:
1>c:devsqlyog-20100807srcwystring.cpp(1198) : error C2440: '=' : cannot convert from 'const char *' to 'wyChar *'
1>c:devsqlyog-20100807srcwystring.cpp(1205) : error C2440: '=' : cannot convert from 'const char *' to 'wyChar *'
In LogMgmt.cpp :
#define DEBUG_LOG_FILE “c:\sqlyogdeb.log”
I don't think that Window7 (32|64) likes to put files in C: directory
-
August 9, 2010 at 11:30 am #31150KhushbooMember
Hi Jan,
We migrated our project to VS 2010 internally. We will start building SQLyog in VS 2010 after 8.6 GA release.
Thanks,
Khushboo
-
August 23, 2010 at 7:02 pm #31151jan marco alkemaMember
Khushboo ,
I got a 64 bits Windows7 crash on:
EditorFont.cpp: pixelwidth = 4 + linenumwidth * (SendMessage(hwndedit, SCI_TEXTWIDTH, STYLE_LINENUMBER, (long)”9″));
Changed type casting of last parameter. It seems to prevent crashing in 64 bits mode:
pixelwidth = 4 + linenumwidth * (SendMessage(hwndedit, SCI_TEXTWIDTH, STYLE_LINENUMBER, (LONG_PTR) “9”));
I changed all type casting of last parameter of all SendMessage-routine to (LONG_PTR). SQLyog seems to work in 64 bits mode in my environment —)
Not tested, Maybe better change the type casting of the last two parameters to (WPARAM), (LPARAM) for all SendMessage routines -> for example:
pixelwidth = 4 + linenumwidth * (SendMessage(hwndedit, SCI_TEXTWIDTH, (WPARAM) STYLE_LINENUMBER, (LPARAM) “9”));
Greetings Jan Marco
-
August 27, 2010 at 4:18 pm #31152jan marco alkemaMember
Khushboo,
X86 (32 bits) and X64 (64 bits) SQLYog seems to work good in my environment. Only I use dll htmlayout.dll (besides system dll's). I can't include the source of htmlayout.dll, because it is not open source code.
X86Debug:
Size File
774,144 htmlayout.dll
116,736 Keywords.db
9,481,728 SQLYog.exe
x64Debug
Size File
3,756,544 htmlayout.dll
116,736 Keywords.db
11,567,104 SQLYog.exe
I changed all SendMessage to SendMessage(.., (WPARAM) x3, (LPARAM) x4);
I found two SendMessage which have parameter x3 (LPARAM) type casting instead of type casting (WPARAM).
Checked out revision 265;Line 461;EditorBase.cpp://::SendMessage(m_hwnd, SCI_REPLACESEL, (LPARAM)TRUE, (LPARAM)textstr.GetString());
I changed to:
::SendMessage(m_hwnd, SCI_REPLACESEL, (WPARAM)TRUE, (LPARAM)textstr.GetString());
Line 530:EditorBase.cpp://::SendMessage(m_hwnd, SCI_REPLACESEL, (LPARAM)TRUE, (LPARAM)text);
I changed to:
::SendMessage(m_hwnd, SCI_REPLACESEL, (WPARAM)TRUE, (LPARAM)text);
Greetings Jan Marco
-
August 27, 2012 at 5:45 am #31153jan marco alkemaMember
Hello,
I downloaded the SQLYog source code with:
svn checkout http://sqlyog.googlecode.com/svn/trunk/ sqlyog-read-only-20120826
I get errors when I compiled it on 64 bits (Windows 7):
Rebuild All started: Project: SQLyogCommunity, Configuration: Debug x64
Build started 8/26/2012 10:08:23 PM.
_PrepareForClean:
Deleting file “DebugSQLyogCommunity.lastbuildstate”.
InitializeBuildStatus:
Creating “DebugSQLyogCommunity.unsuccessfulbuild” because “AlwaysCreate” was specified.
ClCompile:
AutoCompleteInterface.cpp
BlobMgmt.cpp
..srcBlobMgmt.cpp(102): error C2065: 'GWL_USERDATA' : undeclared identifier
..srcBlobMgmt.cpp(107): error C2065: 'GWL_USERDATA' : undeclared identifier
..srcBlobMgmt.cpp(194): error C2065: 'GWL_USERDATA' : undeclared identifier
.
.
I see that the 'source port' to VS2010 has gone well–), but when will SQLYog (Community part) be ported to 64 bits?
Greetings Jan Marco
-
August 27, 2012 at 11:47 am #31154vishal.prMember
Hi Jan,
We are aware that the SQLyog source code need some cleanup in order to port to 64 bit. It is not only about getting it to compile without errors. A lot of places LONG is substituted for pointer types, this include user/instance data associated with windows, message parameters etc. So even if we are able shut up the compiler with these changes we cannot guarantee that the code will run fine on 64 bit. Also the libraries and components that SQLyog use also need to be ported to 64 bit, without doing it there is no point in compiling SQLyog for 64 bit.
It is in our wishlist and we will update here once the porting is done.
Regards,
Vishal P.R
-
September 8, 2012 at 4:27 am #31155somnambulistMember
Revision: 336 Visual Studio 2012 build errors
DEBUG
1>
Rebuild All started: Project: SQLyogCommunity, Configuration: Debug Win32
1>Build started 08/09/2012 04:58:30.
1>z:sqlyogsrccommonhelper.cpp(3841): error C3861: 'GetProcessId': identifier not found
RELEASE
1>
Rebuild All started: Project: SQLyogCommunity, Configuration: Release Win32
1>Build started 08/09/2012 05:02:24.
..srcCommonHelper.cpp(3841): error C3861: 'GetProcessId': identifier not found
Built OK in VS2010
-
September 8, 2012 at 8:15 am #31156peterlaursenParticipant
Thanks for informing us. But we have not really considered VS 2012 yet. We probably will after a few months, but everybody is too busy now for that.
-
September 8, 2012 at 8:17 am #31157peterlaursenParticipant
Added to our issue-tracker here:
-
February 20, 2013 at 9:29 am #31158vishal.prMember
Hi Jan,
We have ported SQLyog source code and all the libraries to 64 bit. You may checkout from Google Code.
-
-
AuthorPosts
- You must be logged in to reply to this topic.