starzia / sonarpm Goto Github PK
View Code? Open in Web Editor NEWLinux/Windows/Mac cross-platform SonarPM display power management utility
Home Page: http://stevetarzia.com/sonar/
License: Other
Linux/Windows/Mac cross-platform SonarPM display power management utility
Home Page: http://stevetarzia.com/sonar/
License: Other
First I got:
$ make clean sonar_gui
rm -f sonar_tui sonar_gui sonar_tui.exe sonar_gui.exe audio.o dsp.o SysInterface.o Config.o Logger.o audio.O dsp.O SysInterface.O Config.O Logger.O *~ sonar.tar.gz
cd gui; make clean
make[1]: Entering directory `/home/pj/src/SonarPM/gui'
rm -f App gui.a gui.A App.o Frame.o TaskBarIcon.o PlotPane.o SonarThread.o SonarEvent.o ConfigFrame.o CloseConfirmFrame.o App.O Frame.O TaskBarIcon.O PlotPane.O SonarThread.O SonarEvent.O ConfigFrame.O CloseConfirmFrame.O *~
make[1]: Leaving directory `/home/pj/src/SonarPM/gui'
g++ -O3 -Wall -ggdb -DPLATFORM_LINUX -c audio.cpp -o audio.o
g++ -O3 -Wall -ggdb -DPLATFORM_LINUX -c dsp.cpp -o dsp.o
g++ -O3 -Wall -ggdb -DPLATFORM_LINUX -c SysInterface.cpp -o SysInterface.o
SysInterface.cpp: In static member function ‘static bool SysInterface::sleep_monitor()’:
SysInterface.cpp:49:38: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
system( "xset dpms force standby" );
^
g++ -O3 -Wall -ggdb -DPLATFORM_LINUX -c Config.cpp -o Config.o
In file included from Config.cpp:3:0:
SimpleIni.h: In instantiation of ‘bool CSimpleIniTempl<SI_CHAR, SI_STRLESS, SI_CONVERTER>::Converter::ConvertToStore(const SI_CHAR*) [with SI_CHAR = char; SI_STRLESS = SI_GenericNoCase<char>; SI_CONVERTER = SI_ConvertA<char>]’:
SimpleIni.h:2190:17: required from ‘SI_Error CSimpleIniTempl<SI_CHAR, SI_STRLESS, SI_CONVERTER>::Save(CSimpleIniTempl<SI_CHAR, SI_STRLESS, SI_CONVERTER>::OutputWriter&, bool) const [with SI_CHAR = char; SI_STRLESS = SI_GenericNoCase<char>; SI_CONVERTER = SI_ConvertA<char>]’
SimpleIni.h:2150:40: required from ‘SI_Error CSimpleIniTempl<SI_CHAR, SI_STRLESS, SI_CONVERTER>::SaveFile(FILE*, bool) const [with SI_CHAR = char; SI_STRLESS = SI_GenericNoCase<char>; SI_CONVERTER = SI_ConvertA<char>; FILE = _IO_FILE]’
SimpleIni.h:2115:47: required from ‘SI_Error CSimpleIniTempl<SI_CHAR, SI_STRLESS, SI_CONVERTER>::SaveFile(const char*, bool) const [with SI_CHAR = char; SI_STRLESS = SI_GenericNoCase<char>; SI_CONVERTER = SI_ConvertA<char>]’
Config.cpp:102:54: required from here
SimpleIni.h:418:50: error: ‘SizeToStore’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
size_t uLen = SizeToStore(a_pszString);
^
SimpleIni.h:418:50: note: declarations in dependent base ‘SI_ConvertA<char>’ are not found by unqualified lookup
SimpleIni.h:418:50: note: use ‘this->SizeToStore’ instead
make: *** [Config.o] Error 1
So I tried this patch (which may, in fact, be incorrect, of course):
diff --git a/SimpleIni.h b/SimpleIni.h
index 4f84a87..c3eb903 100644
--- a/SimpleIni.h
+++ b/SimpleIni.h
@@ -415,7 +415,7 @@ public:
return *this;
}
bool ConvertToStore(const SI_CHAR * a_pszString) {
- size_t uLen = SizeToStore(a_pszString);
+ size_t uLen = SI_CONVERTER::SizeToStore(a_pszString);
if (uLen == (size_t)(-1)) {
return false;
}
and that got me to:
$ make clean sonar_gui
rm -f sonar_tui sonar_gui sonar_tui.exe sonar_gui.exe audio.o dsp.o SysInterface.o Config.o Logger.o audio.O dsp.O SysInterface.O Config.O Logger.O *~ sonar.tar.gz
cd gui; make clean
make[1]: Entering directory `/home/pj/src/SonarPM/gui'
rm -f App gui.a gui.A App.o Frame.o TaskBarIcon.o PlotPane.o SonarThread.o SonarEvent.o ConfigFrame.o CloseConfirmFrame.o App.O Frame.O TaskBarIcon.O PlotPane.O SonarThread.O SonarEvent.O ConfigFrame.O CloseConfirmFrame.O *~
make[1]: Leaving directory `/home/pj/src/SonarPM/gui'
g++ -O3 -Wall -ggdb -DPLATFORM_LINUX -c audio.cpp -o audio.o
g++ -O3 -Wall -ggdb -DPLATFORM_LINUX -c dsp.cpp -o dsp.o
g++ -O3 -Wall -ggdb -DPLATFORM_LINUX -c SysInterface.cpp -o SysInterface.o
SysInterface.cpp: In static member function ‘static bool SysInterface::sleep_monitor()’:
SysInterface.cpp:49:38: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
system( "xset dpms force standby" );
^
g++ -O3 -Wall -ggdb -DPLATFORM_LINUX -c Config.cpp -o Config.o
g++ -O3 -Wall -ggdb -DPLATFORM_LINUX -c Logger.cpp -o Logger.o
Logger.cpp: In member function ‘bool Logger::phone_home()’:
Logger.cpp:161:63: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
system( ("gzip -df " + this->filename + ".gz").c_str() );
^
true
cd gui; make gui.a
make[1]: Entering directory `/home/pj/src/SonarPM/gui'
g++ -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -Wno-write-strings -ggdb -O3 -Wall -DPLATFORM_LINUX -c App.cpp -o App.o
g++ -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -Wno-write-strings -ggdb -O3 -Wall -DPLATFORM_LINUX -c Frame.cpp -o Frame.o
Frame.cpp: In member function ‘void Frame::startSonar()’:
Frame.cpp:109:9: warning: variable ‘choice’ set but not used [-Wunused-but-set-variable]
int choice;
^
g++ -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -Wno-write-strings -ggdb -O3 -Wall -DPLATFORM_LINUX -c TaskBarIcon.cpp -o TaskBarIcon.o
g++ -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -Wno-write-strings -ggdb -O3 -Wall -DPLATFORM_LINUX -c PlotPane.cpp -o PlotPane.o
g++ -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -Wno-write-strings -ggdb -O3 -Wall -DPLATFORM_LINUX -c SonarThread.cpp -o SonarThread.o
g++ -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -Wno-write-strings -ggdb -O3 -Wall -DPLATFORM_LINUX -c SonarEvent.cpp -o SonarEvent.o
g++ -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -Wno-write-strings -ggdb -O3 -Wall -DPLATFORM_LINUX -c ConfigFrame.cpp -o ConfigFrame.o
g++ -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -Wno-write-strings -ggdb -O3 -Wall -DPLATFORM_LINUX -c CloseConfirmFrame.cpp -o CloseConfirmFrame.o
ar rvs gui.a App.o Frame.o TaskBarIcon.o PlotPane.o SonarThread.o SonarEvent.o ConfigFrame.o CloseConfirmFrame.o
ar: creating gui.a
a - App.o
a - Frame.o
a - TaskBarIcon.o
a - PlotPane.o
a - SonarThread.o
a - SonarEvent.o
a - ConfigFrame.o
a - CloseConfirmFrame.o
make[1]: Leaving directory `/home/pj/src/SonarPM/gui'
g++ -o sonar_gui audio.o dsp.o SysInterface.o Config.o Logger.o gui/gui.a \
-L/usr/lib/x86_64-linux-gnu -pthread -Wl,-Bsymbolic-functions -Wl,-z,relro -L/usr/lib/x86_64-linux-gnu -lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8 -lXss -lportaudio -lm
/usr/bin/ld: SysInterface.o: undefined reference to symbol 'XOpenDisplay'
//usr/lib/x86_64-linux-gnu/libX11.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [sonar_gui] Error 1
...but it's still not all the way built. Any hints?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.