Click here to Skip to main content
15,867,834 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to convert a byte[] to Bitmap image? Pin
CPallini23-Apr-09 3:01
mveCPallini23-Apr-09 3:01 
GeneralRe: How to convert a byte[] to Bitmap image? Pin
kapardhi23-Apr-09 3:03
kapardhi23-Apr-09 3:03 
GeneralRe: How to convert a byte[] to Bitmap image? Pin
CPallini23-Apr-09 5:37
mveCPallini23-Apr-09 5:37 
Questionlibcmtd.lib(strtol.obj) : error LNK2005: strtoul already defined in . . . Pin
RKP72823-Apr-09 1:52
RKP72823-Apr-09 1:52 
QuestionRe: libcmtd.lib(strtol.obj) : error LNK2005: strtoul already defined in . . . Pin
CPallini23-Apr-09 2:01
mveCPallini23-Apr-09 2:01 
AnswerRe: libcmtd.lib(strtol.obj) : error LNK2005: strtoul already defined in . . . Pin
RKP72823-Apr-09 2:18
RKP72823-Apr-09 2:18 
GeneralRe: libcmtd.lib(strtol.obj) : error LNK2005: strtoul already defined in . . . Pin
CPallini23-Apr-09 2:43
mveCPallini23-Apr-09 2:43 
AnswerRe: libcmtd.lib(strtol.obj) : error LNK2005: strtoul already defined in . . . Pin
Stuart Dootson23-Apr-09 3:21
professionalStuart Dootson23-Apr-09 3:21 
rupeshk_p wrote:
I have also customized definition of this function defined in my project.

Why re-use the name of a function defined in the standard? That seems the foolish thing to me - if you'd just used a different name, than a) you'd not have these linker problems, and b) you'd be able to see exactly where you used the 'customised' function.
rupeshk_p wrote:
Why is the VS2008 linker using the customized function instead of using the standard one.

Probably because the linker sees your definition is test.lib(string.obj) before it sees the one in libcmtd.lib.
rupeshk_p wrote:
What the difference between VS2003 and VS2008 which is causing the error.

The behaviour actually changes between VS2003 and VS2005 (yes, I've tried it, with VS2003, 2005 and 2008) - VS2008 just follows VS2005's behaviour. The only thing I can think of is that the C run-time now requires strtol, and so will bring in strtol.obj (which contains both strtol and strtoul). [later] This would appear to be confirmed - when I compile and link this small program (which I've called a.c):
#include <stdio.h>

int main()
{
   printf("%d\n", 1);
}
with the command cl a.c /link /map, the map file contains strtol when built with VS2008, but doesn't when built with VS2003.
rupeshk_p wrote:
Any solution for it ?

Add implementations of all the functions exported by strtol.obj from libcmtd.lib?



GeneralRe: libcmtd.lib(strtol.obj) : error LNK2005: strtoul already defined in . . . Pin
RKP72823-Apr-09 19:26
RKP72823-Apr-09 19:26 
GeneralRe: libcmtd.lib(strtol.obj) : error LNK2005: strtoul already defined in . . . Pin
Stuart Dootson23-Apr-09 20:06
professionalStuart Dootson23-Apr-09 20:06 
GeneralRe: libcmtd.lib(strtol.obj) : error LNK2005: strtoul already defined in . . . Pin
RKP72823-Apr-09 22:06
RKP72823-Apr-09 22:06 
GeneralRe: libcmtd.lib(strtol.obj) : error LNK2005: strtoul already defined in . . . Pin
Stuart Dootson23-Apr-09 22:18
professionalStuart Dootson23-Apr-09 22:18 
GeneralRe: libcmtd.lib(strtol.obj) : error LNK2005: strtoul already defined in . . . Pin
RKP72824-Apr-09 0:11
RKP72824-Apr-09 0:11 
GeneralRe: libcmtd.lib(strtol.obj) : error LNK2005: strtoul already defined in . . . Pin
Stuart Dootson24-Apr-09 1:16
professionalStuart Dootson24-Apr-09 1:16 
GeneralRe: libcmtd.lib(strtol.obj) : error LNK2005: strtoul already defined in . . . Pin
RKP72824-Apr-09 1:53
RKP72824-Apr-09 1:53 
GeneralRe: libcmtd.lib(strtol.obj) : error LNK2005: strtoul already defined in . . . Pin
Stuart Dootson24-Apr-09 3:23
professionalStuart Dootson24-Apr-09 3:23 
GeneralRe: libcmtd.lib(strtol.obj) : error LNK2005: strtoul already defined in . . . Pin
RKP72824-Apr-09 22:09
RKP72824-Apr-09 22:09 
GeneralRe: libcmtd.lib(strtol.obj) : error LNK2005: strtoul already defined in . . . Pin
RKP72826-Apr-09 21:32
RKP72826-Apr-09 21:32 
QuestionHow to implement CCrypto class into a MDI project ? Pin
mesajflaviu23-Apr-09 1:46
mesajflaviu23-Apr-09 1:46 
AnswerRe: How to implement CCrypto class into a MDI project ? Pin
Iain Clarke, Warrior Programmer23-Apr-09 2:10
Iain Clarke, Warrior Programmer23-Apr-09 2:10 
GeneralRe: How to implement CCrypto class into a MDI project ? Pin
mesajflaviu23-Apr-09 8:35
mesajflaviu23-Apr-09 8:35 
GeneralRe: How to implement CCrypto class into a MDI project ? Pin
Iain Clarke, Warrior Programmer24-Apr-09 5:54
Iain Clarke, Warrior Programmer24-Apr-09 5:54 
GeneralRe: How to implement CCrypto class into a MDI project ? Pin
mesajflaviu25-Apr-09 6:56
mesajflaviu25-Apr-09 6:56 
GeneralRe: How to implement CCrypto class into a MDI project ? [modified] Pin
mesajflaviu3-May-09 20:35
mesajflaviu3-May-09 20:35 
QuestionHow to load a region from an image file? Pin
Frank Isensee23-Apr-09 0:46
Frank Isensee23-Apr-09 0:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.