|
tiwal wrote: I have atlbase.h and atlconv.h in right places, and both malloc.h and stdlib.h are included beforehand. That is not relevant to the problem; header files are used by the compiler to convert source code into object code. Your problem is within the linker phase combining the object files, when references to functions that exist in system libraries are not being found. Under normal circumstances when you create a project in one of the Microsoft IDEs the system and common libraries are automatically included. You need to look at the linker properties of your project to see that the 'standard' libraries are being included.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
.lib standard files are all included in the linker settings . More, I manually included (though I don't think it was really needed) the atl lib file in the linker settings ,as well as the path to it . But what leaves me baffled is that, it seems that the object code of a standard function like _recalloc() can' t be found anywhere in the standard libraries.
|
|
|
|
|
I can only assume it is something to do with using ATL or your project settings. I coded a very simple program that made a call to _recalloc() and it found it in the standard MSVCRT100 library without me having to add anything to the project's properties.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
i tried to change the settings in every possible configuration, playing with the Atl and Mfc use switches ... all I could get is different methods involved, but always errors LNK2001 and LNK2019, always from methods relating to Atl. This smells like an environment flaw ....
|
|
|
|
|
The only thing I can suggest is to try creating a new project and seeing if that builds successfully.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
I set up a minimal application which just uses CA2WEX,, and I kept getting the same errors.
Then, I eliminated the CA2WEX and substituted that with an explicit LPWSTR variable .. this, as I expected, eliminated all the Atl errors.
What I didn't expect though (well, almost..) was another error: "internale Error during IncrBuildImage" (LNK1000).
After that, a popup appeared stating that the linker had stopped working .... this sounds quite hilarious to me .... ))
|
|
|
|
|
Sorry, but I have no real idea of what is going on, and cannot understand what it is about your VS setup that is causing the problems.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
A couple of seconds ago, I just eliminated the "atlsd.lib" library from the Additional Dependencies ... though I have a "ImageList_Create()" call that, according to MSDN, requires the library "ImgCtl.lib", this library doesn't seem to be anywhere. So I just added "comctl32.lib", and everything linked correctly .
Please don't ask me why, since I did the same thing at the beginning and it didn't work ...
I just ask myself if I can really trust this environment.....
Thank you anyway for the support.
|
|
|
|
|
The environment is fine, but you seem to be using some strange libraries. For example, look at the documentation for ImageList_Create() [^], there is no mention of ImgCtl.lib; what documentation are you working from?
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
I am using MSDN for VS 2008 ... actually when looking at ImageList_create(), I didn't realize I was reading the Windows CE 5.0 documentation, which includes "ImgClt.lib". Just trying I realized comctl32.lib is enough. Anyway the real problem seems to have been my inclusion of atlsd.lib, which I did when I realized the _recalloc() couldn't be linked. I don't know what changed but now it seems to be ok ... anyway I keep having serious doubts about the reliability of the environment , since more than once , building twice the same application without making any change between builds, I got different and contrasting results ...
|
|
|
|
|
There are probably millions of people around the world using Visual Studio to build their applications. If there was such a fundamental flaw in it then I think it would have been brought to Microsoft's attention by now. I have used the express versions (2005, 2008 and 2010) and never come across anything even vaguely resembling your problem. But if you are trying to include CE libraries into a standard desktop application it's little wonder that things are looking strange.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Well I agree with you .... even though , there are tons of people who see such strange things and never report to Microsoft ... and most of them don't even dare thinking there's a problem ... .... Anyway , I don't think what I saw, that is , those two differents results with two builds of the same version, can be caused by any programmer's error....
|
|
|
|
|
tiwal wrote: I don't think what I saw, that is , those two differents results with two builds of the same version, can be caused by any programmer's error Don't you believe it. I've had many more 'strange' problems that were caused by me, than were caused by Visual Studio.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
I want to develope web service in c++ (.net 2003).
i have no idea to do it please guide me
|
|
|
|
|
Start here[^].
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Read here, specifically point #2.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Hi All
I need your suggestion for my following questions.
Recently i have buillt one standalone desktop software application and my question is ,
1. Application should be installed only one pc.
2. Once installed single PC it wont work/install otherPC/same PC next time.
3. We cannot used database for that application, also internet connection.
Please guide me how to proceed !
Thanks N Advance
Failure is Success If we learn from it!!
|
|
|
|
|
This does not look like a C++ question, you may like to try a more appropriate forum. You may also like to explain in more detail what actual problem you are facing.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Not a C++ question, and you haven't provided enough information to answer the question without making a lot of assumptions.
So, assuming the platform is Windows, and that the PC is not connected to the internet:
1. Make a pre-install application that reports a unique ID for the PC. If you don't fancy rolling your own algorithm (not recommended), consider using the value found in the Registry at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductId which is probably unique and tied to an installation of Windows (see this StackOverflow discussion).
2. Once the user has run this application and reported the unique number, use it, with a secret key and a suitable hashing algorithm, to generate a unique hash tied to this ID. Deliver this hash to the user (in a letter, or email to other PC, or in a text message, or however you like).
3. In the installer, get the unique ID (by reading the Registry above), apply the hashing algorithm, ask the user for his or her hash, and compare the two. If they correspond, this is the correct PC, if not, abort the installation.
4. After installation is complete, Windows Installer will make a that this application has been installed. You can check this at the start of the installer to make sure it's not re-installed.
Basically, if you want to limit an application to be installed on only one PC, you need some way of identifying this single PC. If internet access isn't available, it can't be done during installation, so will need to be done in a two-step process.
|
|
|
|
|
Orjan Westin's suggestion of a unique key is probably the way to go, but you could also consider a hardware "dongle", e.g HASP, KeyLok, SecuTech etc.
The key can be shipped to the customer with the product media, or delivered separately when they request a license, and will ensure only one copy of the software is running per key supplied. Some dongle systems allow for upgrading, enabling additional features, and time-limited trial versions as well.
Days spent at sea are not deducted from one's alloted span - Phoenician proverb
|
|
|
|
|
Hi,
I am using Dialogbar in my application, but i can't resize my dialogbar. It appears in bottom side.
below see my code
if(!m_wndBottomBar.Create(this,IDD_ALM_BOTTOM,CBRS_BOTTOM | WS_VISIBLE|WS_CHILD|CBRS_LEFT|CBRS_SIZE_DYNAMIC ,IDD_ALM_BOTTOM))
{
TRACE0("Failed to create dialog bar\n");
return -1;
}
m_wndBottomBar.SetBarStyle(m_wndBottomBar.GetBarStyle()|CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
m_wndBottomBar.EnableDocking(CBRS_ALIGN_ANY);
I have to resize bottom dialog bar any other way to resize my dialog bar?
Please help me ASAP.
|
|
|
|
|
|
Hi,
I am have C++ files (.h, .cpp) that include functions to read a specify file type (.dgn). And I want to use these functions in C# for the same purpose . I am intending use "__declspec(dllexport)" to use C++ functions.
But, I don't know what type in C# is similar to "typedef void *" in C++.
Please see belows is C++ codes
typedef void *DGNHandle;
DGNHandle CPL_DLL DGNOpen( const char *, int );
void CPL_DLL DGNSetOptions( DGNHandle, int );
int CPL_DLL DGNTestOpen( GByte *, int );
const DGNElementInfo CPL_DLL *DGNGetElementIndex( DGNHandle, int * );
Thanks and regards,
|
|
|
|
|
Use the following in google
"C#" interop void pointer
|
|
|
|
|