superlu_dist icon indicating copy to clipboard operation
superlu_dist copied to clipboard

error: too many arguments to function ‘FILE* fopen()’ #64

Open ztdepztdep opened this issue 3 years ago • 5 comments

I copy the content of "pddrive1.c" into my c++ project, and set the include path and link with the library. the compiler fed back the following error: error: too many arguments to function ‘FILE* fopen()’ /2T/Projects/SuperLU_dist/main.cpp:92:36: error: ‘STDC_VERSION’ was not declared in this scope

what caused this problem?

ztdepztdep avatar Sep 08 '22 04:09 ztdepztdep

Can you show me Line 92 in your main.cpp code? I suppose you are using C++ compiler? It complains about too many arguments in fopen().

xiaoyeli avatar Sep 09 '22 09:09 xiaoyeli

Yes, I use the c++ compiler. I want to use superlu_dist in my c++ project. how to treat this issue?

ztdepztdep avatar Sep 09 '22 10:09 ztdepztdep

Can you show me Line 92 in your main.cpp code?

xiaoyeli avatar Sep 10 '22 06:09 xiaoyeli

printf("STDC_VERSION %ld\n", STDC_VERSION);

| | Professor Ding、 | | @.*** | ---- Replied Message ---- | From | X. Sherry @.> | | Date | 9/10/2022 14:45 | | To | @.> | | Cc | @.> , @.> | | Subject | Re: [xiaoyeli/superlu_dist] error: too many arguments to function ‘FILE* fopen()’ #64 (Issue #116) |

Can you show me Line 92 in your main.cpp code?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

ztdepztdep avatar Sep 10 '22 10:09 ztdepztdep

There are 2 errors: one complains about fopen(), with too many arguments. the other is STDC_VERSION undefined. (You need to check where this is defined. )

xiaoyeli avatar Sep 11 '22 16:09 xiaoyeli