|
Why do you want to compile an application that does not need libmysql.dll?
|
|
|
|
|
Hi,
at work i have to deploy a stand alone exe application, that has
no dependency to any libraries, that are non standard on windows
platforms. also, because the programm is used commercial, we are
not allowed to supply our programm with libmysql.dll to custommers.
thats the reason, because i have to work without libmysql.dll.
|
|
|
|
|
You can't. No matter what RDMS you use, there's going to be some
required dependency, even using ODBC/ADO/etc.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I'm a little curious as to why not.
I mean, you can use something like Thinstall or MoleBox or PBundle or AlloyFiles to package a whole bunch of files into a single .exe file.
You can use FileMon to get a list of all the file transactions made by an app, allowing you to ensure that you don't inadvertantly miss a file, as FileMon will list all files that have an open,read or write operation performed.
I've got a single .exe file that contains all of Office 2007 on my flash drive. I've also got single-exe-file versions of 3dsMax, Maya & ZBrush. Surely a simple DB program would be a snap comapared to these?
simon
|
|
|
|
|
Linking to a library and packaging files into single executables
are two different things.
To avoid the separate DLL, you need to be able to statically link to the
LibMySQL libraries. Can you build a static library from the libmysql sources?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: Linking to a library and packaging files into single executables
are two different things.
Yup, sure are. If you link to a static lib, then a flaw is discovered you're in the unenviable position of having to roll-out a replacement exe file. It also means that your app may consist of many files.
If on the other hand, you package the DLL-using app with Thinstall for example, if a flaw is discovered in the bundled DLL file, you can just drop the updated DLL file into the application's sandbox folder and the app will use the new DLL rather than the packaged one. So, you still get the best of both worlds with Thinstall. You also get the advantage of a single compressed file, which alone is a good enough reason to package something if it will be used on a usb drive or via a network.
Mark Salsbery wrote: Can you build a static library from the libmysql sources?
Yeah, course you can build either a static or a dynamic version of a mySQL app. You've just gotta link with mysqlclient.lib rather than libmysql.lib, which simply loads libmysql.dll on demand.
|
|
|
|
|
Apparently I missed the entire point of your question
I thought you wanted to eliminate shipping libmysql.dll with your app.
The only way to do that is statically link to a static library version
of that DLL.
Sorry!
Mark
*edit* well shoot - you aren't even the OP LOL I'm not sure what you're getting at...<br />
as I understand it, the OP is NOT allowed to ship the DLL.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi All,
I am working on one application where i use an edit control and on button click i just want to delete the text of edit box using VK_BACK.
my code is
HWND hWnd = NULL;
hWnd = ::GetDlgItem(m_hWnd, IDC_EDIT);
::SendMessage(hWnd, WM_KEYDOWN, (WPARAM)0, (LPARAM)VK_BACK);
Thanks in advance.
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
modified on Wednesday, July 30, 2008 8:28 AM
|
|
|
|
|
Perhaps the Edit control is coded to respond to WM_KEYUP rather than WM_KEYDOWN, or maybe these are ignored in favour of WM_CHAR. It's possible, although unlikely, that you might need to send all 3 in the right order. If none of that works you'll need to do a GetText and something to get the cursor position, remove a character yourself and do a SetText to put the modified text back.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
Is using VK_BACK a constraint?
Shilpi Boosar wrote: button click i just want to delete the text of edit box "
Since you want to delete the text in the edit box why don't you simply use SetWindowText(/*windowhandle*/,"").
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
No because my main concern is to delete the text of edit box using VK_BACK when i click the button.
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
This should work then.
::SendMessage (hwndEdit,WM_CHAR,(WPARAM)VK_BACK,(LPARAM)1);
Rate it if this helps
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Thanks It Works
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
Hi,
In my console application (Visual Studio 2005) I can't include "iostream.h" header file instead of that I need to include following code.
#include <iostream><br />
using namespace std;</iostream>
Can anyone please tell me why it is that I remember in "Turbo C" I only used iostream.h and it was sufficient.
Thanks,
Mushq
|
|
|
|
|
See, for instance, here [^].
BTW: Google is an invaluable resource...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi all,
I have the following errors:
1>UpdateServiceModule.obj : error LNK2019: unresolved external symbol __imp__SetupDiDestroyDeviceInfoList@4 referenced in function "public: int __thiscall CDeviceLocationInformationList::Collect0(int)" (?Collect0@CDeviceLocationInformationList@@QAEHH@Z)
1>UpdateServiceModule.obj : error LNK2019: unresolved external symbol __imp__SetupDiGetDeviceInstanceIdW@20 referenced in function "public: int __thiscall CDeviceLocationInformationList::Collect0(int)" (?Collect0@CDeviceLocationInformationList@@QAEHH@Z)
1>UpdateServiceModule.obj : error LNK2019: unresolved external symbol __imp__SetupDiGetDeviceRegistryPropertyW@28 referenced in function "public: int __thiscall CDeviceLocationInformationList::Collect0(int)" (?Collect0@CDeviceLocationInformationList@@QAEHH@Z)
1>UpdateServiceModule.obj : error LNK2019: unresolved external symbol __imp__SetupDiEnumDeviceInfo@12 referenced in function "public: int __thiscall CDeviceLocationInformationList::Collect0(int)" (?Collect0@CDeviceLocationInformationList@@QAEHH@Z)
1>UpdateServiceModule.obj : error LNK2019: unresolved external symbol __imp__SetupDiGetClassDevsW@16 referenced in function "public: int __thiscall CDeviceLocationInformationList::Collect0(int)" (?Collect0@CDeviceLocationInformationList@@QAEHH@Z)
1>D:\SVN\Licensin System\Work Package\UpdateManager\Debug\UpdateService.exe : fatal error LNK1120: 5 unresolved externals
I have already included setupapi.h and I still have those errors, what am I lacking?
Thanks,
Jayjay
|
|
|
|
|
You should link your project with Setupapi.lib :
1. On Visual Studio (assuming 2003 or later) select Project->UpdateService Properties... menu item.
2. On the newly appeared window choose the Configuration Properties->Linker->Input node.
3. Finally, add Setupapi.lib in the Additional Dependecies line of the list on the right.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
In addition to Carlo's reply, you can add it with a #pragma directive too:
#pragma comment(lib, "Setupapi.lib")
|
|
|
|
|
Hello,
i create my own CMyPropertySheet derived from CPropertySheet to show some tabs etc.!
This part works, my sheet is created and is shown, with property pages etc.,
but as a own single window, i need it to embed on dialog!
Is it posible to make a CPropertySheet as a child object of my dialog,
so i can embed him on my dialog, like a tab control? Which function to override for that?
Thank you for any help!!
termal
|
|
|
|
|
In your OnInitDialog
CPropertySheet sheet;
CPropertyPage page;
sheet.AddPage(&page);
sheet.Create(this, WS_CHILD | WS_VISIBLE, WS_EX_CONTROLPARENT);
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Hi,
that works
Thank you!!!
termal
|
|
|
|
|
How can we create the Message Que.?
How can we implement user defined messages...?
CAn we create user defined message que in VC++
|
|
|
|
|
We read a book about windows programming.
I'm not being horrible - proper answers to these question would require more than a few paragraphs. And the fact that you think these are few-line answers tells me that you are just starting with message driven programming. And that's a big leap of thinking.
Short answers to help you with google:
1/ GetMessage
2/ RegisterWindowMessage or just use WM_USER+N as appropriate.
3/ The user messages go in the normal message queue.
I hope that helps a little, and wish you luck with your learning. And if I misunderstood your question, I hope the short answers help too.
Iain.
Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.
|
|
|
|
|
Iain Clarke wrote: We read a book about windows programming.
I love your humour.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I did try and give a nice answer two lines down, but the first line just popped into my head and I couldn't resist! I try and soften my raw snarky instincts, otherwise I'd be insufferable (and probably was when I was 19).
In his defense, when I first did X-Windows [*], I didn't realise just how much of a conceptual jump there was between console programs chewing their way through main and event driven programming... Just like pointers are impossible until you click that they're just an integer pointing to a memory address where something lives.
Iain.
[*] Win32 / MFC came later. Same ideas though.
Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.
|
|
|
|