Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi, Makyo,
I have test you codes, the result is same as you.
[root@localhost pgplot]# echo " Results from no makefile:"
Results from no makefile:
[root@localhost pgplot]# make -f null FC=g77 FFLAGS:='-fno-backslash -ffree-form' one
g77 -fno-backslash -ffree-form one.f -o one
[root@localhost pgplot]#
[root@localhost pgplot]# ./one
abc\nde
abc\ude
By the way,have you used the PGPLOT before?
Now, I want to run the codes of the demos, for example, run pgdemo1.f, but there are some errors appears, I think te error is about the choice of FFLAGD of g77 in the makefile of PGPLOT.
The original is "FFLAGD=-fno-backslash", and I modified it into "FFLAGD=-fno-backslash -ffree-form", the same error also appears,
I also use the command "g77 -fno-backslash -ffree-form pgdemo1.f -o pgdemo1 /usr/lib/libpng12.so.0.1.2.7 -L/usr/X11R6/lib -lX11 -L/usr/local/pgplot -lpgplot", it also doesn't work.
Can you give me some suggestion about that, thanks.
The details of error as follow:
[jing@localhost pgplot]$ g77 pgdemo1.f -o pgdemo1 /usr/lib/libpng12.so.0.1.2.7 - L/usr/X11R6/lib -lX11 -L/usr/local/pgplot -lpgplot
pgdemo1.f: In subroutine `pgex1':
pgdemo1.f:102:
CALL PGLAB('(x)', '(y)', 'PGPLOT Example 1: y = x\u2')
^
Unknown escape sequence `\u' at (^)
pgdemo1.f: In subroutine `pgex5':
pgdemo1.f:289:
CALL PGLAB('Frequency, \gn (GHz)',
^
Unknown escape sequence `\g' at (^)
pgdemo1.f:290:
1 'Flux Density, S\d\gn\u (Jy)',
^
Unknown escape sequence `\d' at (^)
pgdemo1.f:290:
1 'Flux Density, S\d\gn\u (Jy)',
^
Unknown escape sequence `\g' at (^)
pgdemo1.f:290:
1 'Flux Density, S\d\gn\u (Jy)',
FFLAGS ^
Unknown escape sequence `\u' at (^)
pgdemo1.f: In subroutine `pgex10':
pgdemo1.f:644:
CALL PGPTXT(8.-ffree-form0, 0.7, 0.0, 0.0, ' \fiy = J\d0\u(x)')
^
Unknown escape sequence `\d' at (^)
pgdemo1.f:644:
CALL PGPTXT(8.0, 0.7, 0.0, 0.0, ' \fiy = J\d0\u(x)')
^
Unknown escape sequence `\u' at (^)
pgdemo1.f:645:
CALL PGPTXT(12.0, 0.5, 0.0, 0.0, ' \fiy = J\d1\u(x)')
^
Unknown escape sequence `\d' at (^)
pgdemo1.f:645:
CALL PGPTXT(12.0, 0.5, 0.0, 0.0, ' \fiy = J\d1\u(x)')
^
Unknown escape sequence `\u' at (^)
It is difficult to read your posts where you include code and results. Please use the forum formatting facilities for doing that -- the [ CODE ] - [ /CODE ] markers. You can easily do that by selecting the text with your mouse, then clicking the "#" symbol just above the editing window. The result of surrounding the string "Hello world." with those markers would then look like this:
Code:
Hello, world.
To answer your question, I don't recall using PGPLOT.
I used "-free-form" because I didn't use the standard columns in the small test program. It's likely that the pgplot source is written in standard format, so specifying -free-form is probably not a solution for the problem.
I used the command:
Code:
make -p | grep -i fflag
to see if the builtin rules for make had an FFLAGD, and, on Debian, I could not find anything for FFLAGD, only for FFLAGF and F77FLAGS, so FFLAGD must be something in the makefile for pgplot. It may be difficult, but you may need to go through the makefile to find that if that is causing the problem. The other possibility is that it may work if you use FFLAGF, not FFLAGD.
Hi, Makyo,
I have test you codes, the result is same as you.
[root@localhost pgplot]# echo " Results from no makefile:"
Results from no makefile:
[root@localhost pgplot]# make -f null FC=g77 FFLAGS:='-fno-backslash -ffree-form' one
g77 -fno-backslash -ffree-form one.f -o one
[root@localhost pgplot]#
[root@localhost pgplot]# ./one
abc\nde
abc\ude
Results from using Makefile:
[root@localhost pgplot]# g77 -ffree-form -fno-backslash one.f -o one
[root@localhost pgplot]# ./one
abc\nde
abc\ude
By the way,have you used the PGPLOT before?
Now, I want to run the codes of the demos, for example, run pgdemo1.f, but there are some errors appears, I think te error is about the choice of FFLAGD of g77 in the makefile of PGPLOT.
The original is "FFLAGD=-fno-backslash", and I modified it into "FFLAGD=-fno-backslash -ffree-form", the same error also appears,
I also use the command "g77 -fno-backslash -ffree-form pgdemo1.f -o pgdemo1 /usr/lib/libpng12.so.0.1.2.7 -L/usr/X11R6/lib -lX11 -L/usr/local/pgplot -lpgplot", it also doesn't work.
Can you give me some suggestion about that, thanks.
The details of error as follow:
[jing@localhost pgplot]$ g77 pgdemo1.f -o pgdemo1 /usr/lib/libpng12.so.0.1.2.7 - L/usr/X11R6/lib -lX11 -L/usr/local/pgplot -lpgplot
pgdemo1.f: In subroutine `pgex1':
pgdemo1.f:102:
CALL PGLAB('(x)', '(y)', 'PGPLOT Example 1: y = x\u2')
^
Unknown escape sequence `\u' at (^)
pgdemo1.f: In subroutine `pgex5':
pgdemo1.f:289:
CALL PGLAB('Frequency, \gn (GHz)',
^
Unknown escape sequence `\g' at (^)
pgdemo1.f:290:
1 'Flux Density, S\d\gn\u (Jy)',
^
Unknown escape sequence `\d' at (^)
pgdemo1.f:290:
1 'Flux Density, S\d\gn\u (Jy)',
^
Unknown escape sequence `\g' at (^)
pgdemo1.f:290:
1 'Flux Density, S\d\gn\u (Jy)',
FFLAGS ^
Unknown escape sequence `\u' at (^)
pgdemo1.f: In subroutine `pgex10':
pgdemo1.f:644:
CALL PGPTXT(8.-ffree-form0, 0.7, 0.0, 0.0, ' \fiy = J\d0\u(x)')
^
Unknown escape sequence `\d' at (^)
pgdemo1.f:644:
CALL PGPTXT(8.0, 0.7, 0.0, 0.0, ' \fiy = J\d0\u(x)')
^
Unknown escape sequence `\u' at (^)
pgdemo1.f:645:
CALL PGPTXT(12.0, 0.5, 0.0, 0.0, ' \fiy = J\d1\u(x)')
^
Unknown escape sequence `\d' at (^)
pgdemo1.f:645:
CALL PGPTXT(12.0, 0.5, 0.0, 0.0, ' \fiy = J\d1\u(x)')
^
Unknown escape sequence `\u' at (^)
Hi, Makyo,
I have submit my question again as you said, but it looks same as the former.
You're right,the pgplot source code is written in standard format, the "FFLAGD" is in the makefile of pgplot,
The details as follow:
# Fortran compiler and compilation flags
#
FCOMPL=g77
FFLAGC=-u -Wall -fPIC -O
FFLAGD=-fno-backslash
#
I think "\" can not be used in my code because of "FFLAGD=-fno-backslash",but it is really strange when I delete it, the "\" also can not be used.
I have try that,the pgdemo1.f can be compiled without errors. but I have question how to run the pgdemo1.f after complied.
Before, when I use this code:
No - the .o file is not supposed to run. It hasn't yet been linked. I was just trying to clarify whether your error is a compile error or a link error.
1. I understand the following command compiles without 'unknown escape sequence' error
Hi,Steve,
When I use the command:
g77 -fno-backslash -ffree-form pgdemo1.f -o pgdemo1 /usr/lib/libpng12.so.0.1.2.7 -L/usr/X11R6/lib -lX11 -L/usr/local/pgplot -lpgplot
there are too many errors to show,many statement name can not be recognized, a part of errors as follow:
Code:
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f: In function `pgbsj0':
pgdemo1.f:912:
C-----------------------------------------------------------------------
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:913:
C Bessel function of order 0 (approximate).
1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:914:
C Reference: Abramowitz and Stegun: Handbook of Mathematical Functions.
1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:915:
C-----------------------------------------------------------------------
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:917:
C
1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:922:
PGBSJ0 = 1.0 + T*(-2.2499997 +
12
Missing operand for operator at (1) at end of expression at (2)
pgdemo1.f:922:
PGBSJ0 = 1.0 + T*(-2.2499997 +
1 2
Missing close parenthese at (2) needed to match open parenthese at (1)
pgdemo1.f:923:
1 T*( 1.2656208 +
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:924:
2 T*(-0.3163866 +
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:925:
3 T*( 0.0444479 +
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:926:
4 T*(-0.0039444 +
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:927:
5 T*( 0.0002100))))))
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:930:
F0 = 0.79788456 +
12
Missing operand for operator at (1) at end of expression at (2)
pgdemo1.f:931:
1 T*(-0.00000077 +
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:923:
1 T*( 1.2656208 +
1
pgdemo1.f:931: (continued):
1 T*(-0.00000077 +
2
Label 1 already defined at (1) when redefined at (2)
pgdemo1.f:932:
2 T*(-0.00552740 +
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:924:
2 T*(-0.3163866 +
1
pgdemo1.f:932: (continued):
2 T*(-0.00552740 +
2
Label 2 already defined at (1) when redefined at (2)
pgdemo1.f:933:
3 T*(-0.00009512 +
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:925:
3 T*( 0.0444479 +
1
pgdemo1.f:933: (continued):
3 T*(-0.00009512 +
2
Label 3 already defined at (1) when redefined at (2)
pgdemo1.f:934:
4 T*( 0.00137237 +
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:926:
4 T*(-0.0039444 +
1
pgdemo1.f:934: (continued):
4 T*( 0.00137237 +
2
Label 4 already defined at (1) when redefined at (2)
pgdemo1.f:935:
5 T*(-0.00072805 +
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:927:
5 T*( 0.0002100))))))
1
pgdemo1.f:935: (continued):
5 T*(-0.00072805 +
2
Label 5 already defined at (1) when redefined at (2)
pgdemo1.f:936:
6 T*( 0.00014476))))))
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:937:
THETA0 = X - 0.78539816 +
12
Missing operand for operator at (1) at end of expression at (2)
pgdemo1.f:938:
1 T*(-0.04166397 +
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:923:
1 T*( 1.2656208 +
1
pgdemo1.f:938: (continued):
1 T*(-0.04166397 +
2
Label 1 already defined at (1) when redefined at (2)
pgdemo1.f:939:
2 T*(-0.00003954 +
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:924:
2 T*(-0.3163866 +
1
pgdemo1.f:939: (continued):
2 T*(-0.00003954 +
2
Label 2 already defined at (1) when redefined at (2)
pgdemo1.f:940:
3 T*( 0.00262573 +
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:925:
3 T*( 0.0444479 +
1
pgdemo1.f:940: (continued):
3 T*( 0.00262573 +
2
Label 3 already defined at (1) when redefined at (2)
pgdemo1.f:941:
4 T*(-0.00054125 +
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:926:
4 T*(-0.0039444 +
1
pgdemo1.f:941: (continued):
4 T*(-0.00054125 +
2
Label 4 already defined at (1) when redefined at (2)
pgdemo1.f:942:
5 T*(-0.00029333 +
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:927:
5 T*( 0.0002100))))))
1
pgdemo1.f:942: (continued):
5 T*(-0.00029333 +
2
Label 5 already defined at (1) when redefined at (2)
pgdemo1.f:943:
6 T*( 0.00013558))))))
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:936:
6 T*( 0.00014476))))))
1
pgdemo1.f:943: (continued):
6 T*( 0.00013558))))))
2
Label 6 already defined at (1) when redefined at (2)
pgdemo1.f:946:
C-----------------------------------------------------------------------
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f: In function `pgbsj1':
pgdemo1.f:951:
C-----------------------------------------------------------------------
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:952:
C Bessel function of order 1 (approximate).
1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:953:
C Reference: Abramowitz and Stegun: Handbook of Mathematical Functions.
1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:954:
C-----------------------------------------------------------------------
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:956:
C
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:961:
PGBSJ1 = 0.5 + T*(-0.56249985 +
12
Missing operand for operator at (1) at end of expression at (2)
pgdemo1.f:961:
PGBSJ1 = 0.5 + T*(-0.56249985 +
1 2
Missing close parenthese at (2) needed to match open parenthese at (1)
pgdemo1.f:962:
1 T*( 0.21093573 +
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:963:
2 T*(-0.03954289 +
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:964:
3 T*( 0.00443319 +
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:965:
4 T*(-0.00031761 +
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:966:
5 T*( 0.00001109))))))
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:970:
F1 = 0.79788456 +
12
Missing operand for operator at (1) at end of expression at (2)
pgdemo1.f:971:
1 T*( 0.00000156 +
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:962:
1 T*( 0.21093573 +
1
pgdemo1.f:971: (continued):
1 T*( 0.00000156 +
2
Label 1 already defined at (1) when redefined at (2)
pgdemo1.f:972:
2 T*( 0.01659667 +
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:963:
2 T*(-0.03954289 +
1
pgdemo1.f:972: (continued):
2 T*( 0.01659667 +
2
Label 2 already defined at (1) when redefined at (2)
pgdemo1.f:973:
3 T*( 0.00017105 +
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:964:
3 T*( 0.00443319 +
1
pgdemo1.f:973: (continued):
3 T*( 0.00017105 +
2
Label 3 already defined at (1) when redefined at (2)
pgdemo1.f:974:
4 T*(-0.00249511 +
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:965:
4 T*(-0.00031761 +
1
pgdemo1.f:974: (continued):
4 T*(-0.00249511 +
2
Label 4 already defined at (1) when redefined at (2)
pgdemo1.f:975:
5 T*( 0.00113653 +
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:966:
5 T*( 0.00001109))))))
1
pgdemo1.f:975: (continued):
5 T*( 0.00113653 +
2
Label 5 already defined at (1) when redefined at (2)
pgdemo1.f:976:
6 T*(-0.00020033))))))
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:977:
THETA1 = X -2.35619449 +
1 2
Missing operand for operator at (1) at end of expression at (2)
pgdemo1.f:978:
1 T*( 0.12499612 +
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:962:
1 T*( 0.21093573 +
1
pgdemo1.f:978: (continued):
1 T*( 0.12499612 +
2
Label 1 already defined at (1) when redefined at (2)
pgdemo1.f:979:
2 T*( 0.00005650 +
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:963:
2 T*(-0.03954289 +
1
pgdemo1.f:979: (continued):
2 T*( 0.00005650 +
2
Label 2 already defined at (1) when redefined at (2)
pgdemo1.f:980:
3 T*(-0.00637879 +
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:964:
3 T*( 0.00443319 +
1
pgdemo1.f:980: (continued):
3 T*(-0.00637879 +
2
Label 3 already defined at (1) when redefined at (2)
pgdemo1.f:981:
4 T*( 0.00074348 +
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:965:
4 T*(-0.00031761 +
1
pgdemo1.f:981: (continued):
4 T*( 0.00074348 +
2
Label 4 already defined at (1) when redefined at (2)
pgdemo1.f:982:
5 T*( 0.00079824 +
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:966:
5 T*( 0.00001109))))))
1
pgdemo1.f:982: (continued):
5 T*( 0.00079824 +
2
Label 5 already defined at (1) when redefined at (2)
pgdemo1.f:983:
6 T*(-0.00029166))))))
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:976:
6 T*(-0.00020033))))))
1
pgdemo1.f:983: (continued):
6 T*(-0.00029166))))))
2
Label 6 already defined at (1) when redefined at (2)
pgdemo1.f:987:
C-----------------------------------------------------------------------
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f: In function `pgrnrm':
pgdemo1.f:992:
C-----------------------------------------------------------------------
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:993:
C Returns a normally distributed deviate with zero mean and unit
1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:994:
C variance. The routine uses the Box-Muller transformation of uniform
1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:995:
C deviates. For a more efficient implementation of this algorithm,
1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:996:
C see Press et al., Numerical Recipes, Sec. 7.2.
1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:997:
C
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:998:
C Arguments:
1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:999:
C ISEED (in/out) : seed used for PGRAND random-number generator.
1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1000:
C
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1001:
C Subroutines required:
1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1002:
C PGRAND -- return a uniform random deviate between 0 and 1.
1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1003:
C
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1004:
C History:
1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1005:
C 1995 Dec 12 - TJP.
1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1006:
C-----------------------------------------------------------------------
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1008:
C
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1014:
C-----------------------------------------------------------------------
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f: In function `pgrand':
pgdemo1.f:1019:
C-----------------------------------------------------------------------
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1020:
C Returns a uniform random deviate between 0.0 and 1.0.
1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1021:
C
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1022:
C NOTE: this is not a good random-number generator; it is only
1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1022:
C NOTE: this is not a good random-number generator; it is only
1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1023:
C intended for exercising the PGPLOT routines.
1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1024:
C
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1025:
C Based on: Park and Miller's "Minimal Standard" random number
1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1026:
C generator (Comm. ACM, 31, 1192, 1988)
1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1027:
C
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1028:
C Arguments:
1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1029:
C ISEED (in/out) : seed.
1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1030:
C-----------------------------------------------------------------------
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pgdemo1.f:1037:
C-
12
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
But when use the command:
g77 pgdemo1.f -o pgdemo1 /usr/lib/libpng12.so.0.1.2.7 -L/usr/X11R6/lib -lX11 -L/usr/local/pgplot -lpgplot
there are just some error about "\".
Maybe I need I modify the section about g77 in the makefile of the Pgplot, before I just delete or comment "FFLAGD=-fno-backslash". the same error still appears.
Sorry it took so many iterations to get to a solution! It was only when I downloaded PGPLOT and tried for myself that I could see what was happening.
By the way on my main machine I'm now using gfortran instead of g77. Interestingly it seems that with gfortran the default behaviour is
'-fno-backslash'. That's why I originally couldnt replicate the 'escape sequence' errors.
Everything seemed to be ok, as the final './pgdemo1' worked fine.
Then I tryed to compile the code lengyue put in this thread. I found no problem with the command: 'gfortran test.f95 /usr/lib/libpng.so -o test -L/usr/X11R6/lib -lX11 -L/usr/lib -lpgplot'
And here is my trouble. When I try to compile the code test.f95 from the folder test_folder I write: gfortran -o TEST test.f95, and the bash answer me:
/tmp/ccY7pvbc.o: In function `MAIN__':
plot.f95.text+0x115): undefined reference to `pgopen_'
plot.f95.text+0x159): undefined reference to `pgenv_'
plot.f95.text+0x18d): undefined reference to `pglab_'
plot.f95.text+0x1ad): undefined reference to `pgline_'
plot.f95.text+0x1cf): undefined reference to `pgpt_'
plot.f95.text+0x1d4): undefined reference to `pgclos_'
Im afraid I maybe didnt quite catch what I suppose to do...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.