I am getting the below errors when I build the file in Visual studio, How can I resolve these errors? anyone can help me?

Error 1 error C2660: 'strcpy' : function does not take 3 arguments 129
Error 2 error C2732: linkage specification contradicts earlier specification for 'pro_str_to_wstr' 1405
Error 3 error C2732: linkage specification contradicts earlier specification for 'pro_wstr_to_str' 1412
Error 4 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 443
Error 5 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 446
Error 6 error C2660: 'ProMessageDisplay' : function does not take 2 arguments 493
Error 7 error C2660: 'ProMessageDisplay' : function does not take 2 arguments 532
Error 8 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 538
Error 9 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 658
Error 10 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 675
Error 11 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 700
Error 12 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 728
Error 13 error C2660: 'ProMessageDisplay' : function does not take 2 arguments 835
Error 14 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 863
Error 15 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 890
Error 16 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 895
Error 17 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 925
Error 18 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 938
Error 19 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 954
Error 20 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 965
Error 21 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 977
Error 22 error C2660: 'ProMessageDisplay' : function does not take 2 arguments 987
Error 23 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 1009
Error 24 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 1078
Error 25 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 1168
Error 26 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 1206
Error 27 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 1267
Error 28 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 1308
Error 29 error C2660: 'ProMessageDisplay' : function does not take 4 arguments 1388
Error 30 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 1397
Error 31 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 1475
Error 32 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 1477
Error 33 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 1555
Error 34 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 1597
Error 35 error C2660: 'ProMessageDisplay' : function does not take 2 arguments 1688
Error 36 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 1991
Error 37 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 2266
Error 38 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 2379
Error 39 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 2392
Error 40 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 2433
Error 41 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 2525
Error 42 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 2753
Error 43 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 2779
Error 44 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 2838
Error 45 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 2871
Error 46 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 2886
Error 47 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 2912
Error 48 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 2927
Error 49 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 2951
Error 50 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 2962
Error 51 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 2986
Error 52 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 3008
Error 53 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 3054
Error 54 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 3096
Error 55 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 3184
Error 56 error C2660: 'ProMessageDisplay' : function does not take 2 arguments 3258
Error 57 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 3439
Error 58 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 3464
Error 59 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 3555
Error 60 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 3564
Error 61 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 3571
Error 62 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 3646
Error 63 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 3657
Error 64 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 3731
Error 65 error C2660: 'ProMessageDisplay' : function does not take 2 arguments 3781
Error 66 error C2660: 'ProMessageDisplay' : function does not take 2 arguments 3782
Error 67 error C2660: 'ProMessageDisplay' : function does not take 2 arguments 3793
Error 68 error C2660: 'ProMessageDisplay' : function does not take 2 arguments 3794
Error 69 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 3826
Error 70 error C2660: 'ProMessageDisplay' : function does not take 2 arguments 3871
Error 71 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 3978
Error 72 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 4274
Error 73 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 4282
Error 74 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 4286
Error 75 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 4292
Error 76 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 4369
Error 77 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 4380

Recommended Answers

All 7 Replies

Member Avatar for iamthwee

I think, and I say this cautiously because I'm not too sure, as your error log is quite ambiguous.

But is there a problem with the number of arguments you are passing?

commented: Holy sh*t, you might be right! +22
commented: :) +13

Hey folks,

I am getting the below errors when I compile my main.cpp file,

I am new to this Studio2005 environment


Error 1 error C2660: 'strcpy' : function does not take 3 arguments

Error 2 error C2732: linkage specification contradicts earlier specification for 'pro_str_to_wstr'
Error 3 error C2732: linkage specification contradicts earlier specification for 'pro_wstr_to_str'
Error 4 error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error 5 error C2660: 'ProMessageDisplay' : function does not take 3 arguments

What's the purpose of this post?
Did you think: "hey, let's ask my question in an even more stupid way and maybe someone will answer it this time"

Why didn't you take Iamthwee's advice and check if strcpy() indeed had too many parameters? (as the compiler is telling you)

hi folks,

I am compiling my c program in visual studio 2005 and am getting the below warnings,could anyone help me?

Warning 2 warning C4090: 'function' : different 'const' qualifiers
Warning 4 warning C4090: 'function' : different 'const' qualifiers

No, we can't help you because we can't see your program. The warning/error messages give you the line number in your program, all you have to do is go to that line and see the problem.

if (line_num > 1)
        {
            qsort(statistic, line_num+1, sizeof(TestStatistic), 
	        (int (*)(PRO_CONST_ARG void *, PRO_CONST_ARG void *))
  	        ProTestStatisticCmp);
  	}

this is my code

The third parameter is wrong. The parameter is a function pointer to your comparison function

int compare(const void *p1, const void* p2)
{
    // assume the two pointers are really integers
    int* i1 = (int *)p1;
    int* i2 = (int *)p2;
    return *i1 - *i2;

   // This would also work
    return *(int *)p1 - *(int *)p2;
}


...
qsort(statistic, line_num+1, sizeof(TestStatistic), compare);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.