CONS perl script!


(ujuwegein) #1

I was edited WET_SOURCE in winxp env but I know vc60 env can’t complie to linux qagame file

I install RED HAT 9.0 into my other partition and linux is running well

I look sticky : “cons” first line at my perl directory, it changed type text to perl script.

finally I type ./cons – release or ./cons – release gcc3

but not working! always i had “bad interpreter” message

plz help me

plz


(Seph64) #2

You may have to try dos2unix the cons file as well as the .c and .h files. I could be wrong about this though…

Might be helpful to copy and paste the error code here.


(mod3m) #3

someone posted a fix for this. in cons.pl, one of the lines is wrong. i forget which. just use the search feature in this forum. anyways it was a line like GCC VERSION ^_$@!$#@$ etc. was some bad checker. all i had to do was replace that one line and it worked fine :d


(ujuwegein) #4

Thaks to reply to Seph64 and mod3m

sorry i don’t understand mean ‘dos2unix’

I mounted windows partition and copy WET_SOURCE to linux partition. this can cause be problem?

for complie to linux qagame I install and uninstall REDHAT 5 time…

I don’t have no idea about linux

I changed “con”'s first line to my which perl location

[root@localhost unix]# which perl
/usr/bin/perl

this is my “con” 's top line

#!/usr/bin/perl

NOTE: Cons intentionally does not use the “perl -w” option or

“use strict.” Because Cons “configuration files” are actually

Perl scripts, enabling those restrictions here would force them

on every user’s config files, wanted or not. Would users write

“better” Construct and Conscript files if we forced “use strict”

on them? Probably. But we want people to use Cons to get work

done, not force everyone to become a Perl guru to use it, so we

don’t insist.

but not working I always encounter this problem

[root@localhost unix]# dir
Cons_gcc.pm Conscript-game Conscript-ui cons ldd_check.pm
Conscript-cgame Conscript-pk3 Construct cons~
[root@localhost unix]# ./cons
: bad interpreter: 그런 파일이나 디렉토리가 없음
[root@localhost unix]#
[root@localhost unix]# ./cons – release gcc3
: bad interpreter: 그런 파일이나 디렉토리가 없음
[root@localhost unix]# ./cons – release
: bad interpreter: 그런 파일이나 디렉토리가 없음

그런 파일이나 디렉토리가 없음 <- is korean sorry -_-… this mean no such file or directory

thanks advance.


(SCDS_reyalP) #5

You need to convert the script files from dos text format to unix format. The dos2unix command can do this.
It says ‘bad interpreter’ because there is a ^M after #!/usr/bin/perl


(ujuwegein) #6

manu thanks to SCDS_reyalP and Seph64 and mod3m! I find solution!!! I type -> perl cons – gcc3
oh working!!!
thanks!!!