Open coalcandy opened 2 years ago
Hi. I managed to do it the following way.
I downloaded and installed gcc-11.3.0-64.exe . From this site http://www.equation.com/servlet/equation.cmd?fa=fortran After installation, I checked that it works. gcc --version
After that, I made the following changes to the makefile. Path to makefile RTKLIB_2.4.3_b34\app\consapp\str2str\gcc\makefile
.
CC = gcc
OPTION = -DENAGLO -DENAGAL -DENAQZS -DENACMP -DENAIRN -DTRACE -DNFREQ=5 -DNEXOBS=3 -DSVR_REUSEADDR -DWIN32
LDLIBS = -lm -lpthread -lwinmm -lws2_32
make
Hi Daniel, I am trying to compile str2str on Windows following your instructions, but it fails with this error:
$ make
gcc -c -Wall -O3 -ansi -pedantic -Wno-unused-but-set-variable -I../../../../src -DENAGLO -DENAGAL -DENAQZS -DENACMP -DENAIRN -DTRACE -DNFREQ=5 -DNEXOBS=3 -DSVR_REUSEADDR -DWIN32 -g ../str2str.c
../str2str.c: In function 'main':
../str2str.c:301:12: error: 'SIGHUP' undeclared (first use in this function)
301 | signal(SIGHUP ,SIG_IGN);
| ^~~~~~
../str2str.c:301:12: note: each undeclared identifier is reported only once for each function it appears in
../str2str.c:302:12: error: 'SIGPIPE' undeclared (first use in this function); did you mean 'SIGFPE'?
302 | signal(SIGPIPE,SIG_IGN);
| ^~~~~~~
| SIGFPE
make: *** [makefile:23: str2str.o] Error 1
Any idea what might be the issue?
Here are my make
and gcc
versions:
make
$ make --version
GNU Make 4.3
This program is built by Equation Solution <http://www.Equation.com>.
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
gcc
$ gcc --version
gcc.exe (GCC) 12.3.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I have also attached the makefile.txt (as .txt to be able to attach it in this text box).
any help is really appreciated, thanks!
EDIT
I fixed the issue by changing lines 299-303 of str2str.c
:
signal(SIGTERM,sigfunc);
signal(SIGINT ,sigfunc);
#ifdef __unix__
signal(SIGHUP ,SIG_IGN);
signal(SIGPIPE,SIG_IGN);
#endif
Everything works fine now!
@alex-skyfora , ops, my bad. I'm so sorry. I forgot about it. Your corrections are correct😅👍
Hi! Sorry for this (probably) noob question, I've tried a lot of things, but haven't managed to compile str2str on Windows. I have tested out strsvr and now I want to harness this power from the command line.
If I press enter, the makefile is opened, but I can't do anything with it, except replace text.
The manual suggests making edits to the makefile to suit the platform. I would be very thankful for some pointers on how to figure out what edits I need to do. Thanks in advance!