|
Thank you white sky. link is very usefull.
|
|
|
|
|
You're welcome
|
|
|
|
|
Hi All,
If I comment out the following, the program compiles:
std::cout << _T("0x") << std::hex << dwBaseAddress << std::endl;
I've included <iostream>, <string>, <iomanip>, and <locale>. Google turned up 0 hits for std::hex and LNK2019 (Google Search[^]). The same is true for LNK2019 and std::locale::facet::_Register, etc. I'm not sure what library I am missing since the other Standard C++ stuff works.
Does anyone know how to compile a release version of a program that uses a hex modifier during output?
Jeff
CodeDump error LNK2019: unresolved external symbol "public: void __thiscall std::locale::facet::_Register(void)" (?_Register@facet@locale@std@@QAEXXZ) referenced in function "?use_facet@?$@V?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@@std@@YAABV?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@1@ABVlocale@1@@Z" (?use_facet@?$@V?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@@std@@YAABV?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@1@ABVlocale@1@@Z)
CodeDump error LNK2019: unresolved external symbol "public: class std::locale::facet const * __thiscall std::locale::_Getfacet(unsigned int)const " ...
CodeDump error LNK2019: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " ...
CodeDump error LNK2019: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " ...
|
|
|
|
|
Hey, I can compile this tiny code without any problem in console(VC6,VC8).
Try to shorten the problem code, and compile it in separate app.
|
|
|
|
|
Hi Prasad,
Selecting multi-threaded - /MT - solved the problem in release (a stock console application selects single threaded).
Jeff
|
|
|
|
|
Hi,
can any one help me in upgrading my VC++ SP4 to SP6.can it be freely downloaded from NET?
mpk1979
|
|
|
|
|
|
How can i convert the above?
Thanks
|
|
|
|
|
You mean CString to TCHAR* , isn't it ?
|
|
|
|
|
No,i have to convert a Cstring variable to TCHAR variable only.No pointer for TCHAR.
|
|
|
|
|
Have you considered fact , that CString is a 'string' , array of characters ? In other words its array of TCHAR . Do you want signle TCHAR out of CString ? If yes, then reply by Navin suffice.
But seems strange wording.
|
|
|
|
|
CString cs = "some text";
TCHAR c = cs[0];
nave
|
|
|
|
|
I got it.Thanks both of you.
|
|
|
|
|
radhika28 wrote: I got it.Thanks both of you.
What was your problem? What you got?
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
radhika28 wrote: How can i convert the above?
is your application UNICODE enabled
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
hi..
try this out... TEXT("string");
|
|
|
|
|
Having just discovered that as from the February 2005 DirectX SDK, the D3DX_##.dll must be installed on the target machine and static linking is no longer an option.
Considering I am only using one function from the library 'D3DXCreateTextureFromFileEx ' Why should I add megabytes to my app? So I figure it's better to roll my own and leave D3DX out altogether.
From reading the docs, I figure I can create an IDirect3DTexture9 by calling IDirect3DDevice9::CreateTexture , I can load the texture using OleLoadPicture into an IPicture instance, but how do you copy between the two? From what I can see, the only method is to copy the bits while performing a color conversion on each pixel. Is there an easier way?
|
|
|
|
|
I guess not...
Well I have put together my own D3DXCreateTextureFromFileEx function which does more or less the same thing. I ended up having to copy the bits over since I wanted to make use of a transparent color.
|
|
|
|
|
I have one piece of code that opens a text file and returns a HANDLE to it (The actual open operation is done by c# code and the HANDLE is returned via an IntPtr).
I have another bit of code that takes a FILE* type and writes text to it using fprintf(). Is it possible to convert the HANDLE to a FILE* to pass to this bit of code?
System.IO.Path.IsPathRooted() does not behave as I would expect
|
|
|
|
|
Maybe _open_osfhandle() will do what you want? It returns an integer descriptor, not a FILE* , but at least it's something you can use with other CRT functions.
|
|
|
|
|
Thanks Michael
The solution was to use
int fd = _open_osfhandle((intptr_t)myHandle, _O_TEXT);
FILE * f = _fdopen(fd, "ac");
Now I can have c# client apps writting to the same log file as existing c++ libraries without modifying the existing c++ logging code
System.IO.Path.IsPathRooted() does not behave as I would expect
|
|
|
|
|
This[^] article is very helpful in this regard.
|
|
|
|
|
is there any zip format using checksum MD5, not CRC32?
or, any idea to compare between MD5 and CRC32????
plz help!
|
|
|
|
|
MD5 is a hash algorithm, which means it does not contain enough info to turn back in to the original data. CRC32 is, I believe, the same. There is therefore no way I can see that you could compare the two. I also don't know of any zip format that uses MD5.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
yeah.
thanks for reply. i just trying to find another way...
|
|
|
|