- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I am working on VS2010 mixed-programing and use the Intel Compiler / VisualStudio (Intel Parallel 2015) to compile my project in VS 2010.
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <string.h>
//#define readfile readfile_
extern void readfile(char*, int*);
int main()
{
int n, count;
char Fname[9];
char Name[10];
strcpy(Fname,"AMIN.for");
fprintf( stderr, "%s\n", Fname);
readfile( Fname, &n , strlen (Fname));
fprintf( stderr, "n = %d\n", n);
// fprintf( stderr, "%s\n", Name);
getch();
return 0;
}
subroutine - Lib fortran:
subroutine readfile( fname1, m )
character fname1*(*)
integer m
integer iounit,i
iounit=15
write(*,*) fname1
c10 format (a9)
open(iounit,file = fname1,action='read')
read (iounit,*) m
c20 format (i10)
write(*,*) m
close(iounit)
return
end subroutine
My program is compiling on Linux but not compiling in windows(VS) I don't know what happen exactly. Thanks
Link Copied
0 Replies
![](/skins/images/7FC17B7B85029576C25F1E43CE255B51/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page