Author Topic: g++ no input file  (Read 18044 times)

Offline Varz

  • Single posting newcomer
  • *
  • Posts: 9
Re: g++ no input file
« Reply #15 on: January 28, 2008, 02:32:19 am »
I read somewhere to add 'wx-config --cflags' and 'wx-config --libs' to solve this problem:


-------------- Build: Release in wxtest ---------------

g++ -I/usr/local/lib/wx/include/gtk2-ansi-release-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread  -Wall  -O2  -I/usr/local/lib/wx/include/gtk2-ansi-release-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread     -c /home/mark/Documents/CB/wxtest/wxtestApp.cpp -o obj/Release/wxtestApp.o
In file included from /home/mark/Documents/CB/wxtest/wxtestApp.cpp:10:
/home/mark/Documents/CB/wxtest/wxtestApp.h:13:20: error: wx/app.h: No such file or directory
In file included from /home/mark/Documents/CB/wxtest/wxtestApp.cpp:13:
/home/mark/Documents/CB/wxtest/wxtestMain.h:14:22: error: wx/sizer.h: No such file or directory
/home/mark/Documents/CB/wxtest/wxtestMain.h:15:25: error: wx/stattext.h: No such file or directory
/home/mark/Documents/CB/wxtest/wxtestMain.h:16:25: error: wx/statline.h: No such file or directory
/home/mark/Documents/CB/wxtest/wxtestMain.h:17:23: error: wx/button.h: No such file or directory
/home/mark/Documents/CB/wxtest/wxtestMain.h:18:23: error: wx/dialog.h: No such file or directory
/home/mark/Documents/CB/wxtest/wxtestApp.cpp:14:22: error: wx/image.h: No such file or directory
/home/mark/Documents/CB/wxtest/wxtestApp.h:16: error: expected class-name before ‘{’ token
/home/mark/Documents/CB/wxtest/wxtestApp.h:16: warning: ‘class wxtestApp’ has virtual functions but non-virtual destructor
/home/mark/Documents/CB/wxtest/wxtestMain.h:22: error: expected class-name before ‘{’ token
/home/mark/Documents/CB/wxtest/wxtestMain.h:25: error: expected `)' before ‘*’ token
/home/mark/Documents/CB/wxtest/wxtestMain.h:31: error: ‘wxCommandEvent’ has not been declared
/home/mark/Documents/CB/wxtest/wxtestMain.h:32: error: ‘wxCommandEvent’ has not been declared
/home/mark/Documents/CB/wxtest/wxtestMain.h:43: error: ISO C++ forbids declaration of ‘wxButton’ with no type
/home/mark/Documents/CB/wxtest/wxtestMain.h:43: error: expected ‘;’ before ‘*’ token
/home/mark/Documents/CB/wxtest/wxtestMain.h:44: error: ISO C++ forbids declaration of ‘wxStaticText’ with no type
/home/mark/Documents/CB/wxtest/wxtestMain.h:44: error: expected ‘;’ before ‘*’ token
/home/mark/Documents/CB/wxtest/wxtestMain.h:45: error: ISO C++ forbids declaration of ‘wxBoxSizer’ with no type
/home/mark/Documents/CB/wxtest/wxtestMain.h:45: error: expected ‘;’ before ‘*’ token
/home/mark/Documents/CB/wxtest/wxtestMain.h:46: error: ISO C++ forbids declaration of ‘wxButton’ with no type
/home/mark/Documents/CB/wxtest/wxtestMain.h:46: error: expected ‘;’ before ‘*’ token
/home/mark/Documents/CB/wxtest/wxtestMain.h:47: error: ISO C++ forbids declaration of ‘wxStaticLine’ with no type
/home/mark/Documents/CB/wxtest/wxtestMain.h:47: error: expected ‘;’ before ‘*’ token
/home/mark/Documents/CB/wxtest/wxtestMain.h:48: error: ISO C++ forbids declaration of ‘wxBoxSizer’ with no type
/home/mark/Documents/CB/wxtest/wxtestMain.h:48: error: expected ‘;’ before ‘*’ token
/home/mark/Documents/CB/wxtest/wxtestMain.h:51: error: ISO C++ forbids declaration of ‘DECLARE_EVENT_TABLE’ with no type
/home/mark/Documents/CB/wxtest/wxtestMain.h:52: error: expected ‘;’ before ‘}’ token
/home/mark/Documents/CB/wxtest/wxtestMain.h:52: error: expected `;' before ‘}’ token
/home/mark/Documents/CB/wxtest/wxtestApp.cpp:17: error: expected constructor, destructor, or type conversion before ‘;’ token
/home/mark/Documents/CB/wxtest/wxtestApp.cpp: In member function ‘virtual bool wxtestApp::OnInit()’:
/home/mark/Documents/CB/wxtest/wxtestApp.cpp:23: error: ‘wxInitAllImageHandlers’ was not declared in this scope
/home/mark/Documents/CB/wxtest/wxtestApp.cpp:26: error: no matching function for call to ‘wxtestDialog::wxtestDialog(int)’
/home/mark/Documents/CB/wxtest/wxtestMain.h:22: note: candidates are: wxtestDialog::wxtestDialog()
/home/mark/Documents/CB/wxtest/wxtestMain.h:22: note:                 wxtestDialog::wxtestDialog(const wxtestDialog&)
/home/mark/Documents/CB/wxtest/wxtestApp.cpp:27: error: ‘SetTopWindow’ was not declared in this scope
/home/mark/Documents/CB/wxtest/wxtestApp.cpp:28: error: ‘class wxtestDialog’ has no member named ‘ShowModal’
Process terminated with status 1 (0 minutes, 0 seconds)
32 errors, 1 warnings
 


Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: g++ no input file
« Reply #16 on: January 28, 2008, 08:49:44 am »
This problem comes from not having the wxWidgets includes in the include path. It can be solved in several ways, one is inserting the output of wx-config into the build commandline as "extra option".
However, as eranif already pointed out, it will only work with backticks, not with quotes.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Varz

  • Single posting newcomer
  • *
  • Posts: 9
Re: g++ no input file
« Reply #17 on: January 28, 2008, 09:51:30 am »
That last error message is from a new project with no options added and it has the output of wx-config --cflags already included in the build command:
-I/usr/local/lib/wx/include/gtk2-ansi-release-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread
I'll just remove any options I added.

wx-config must be wrong because I looked in the directories it lists "/usr/local/lib/wx/include/gtk2-ansi-release-2.8" and "/usr/local/include/wx-2.8" and there is no app.h, sizer.h, stattext.h or any other file mentioned as being missing in the build log.

Does anyone know where these files are typically installed to?  I tried searching and I couldn't find them.



Offline Varz

  • Single posting newcomer
  • *
  • Posts: 9
Re: g++ no input file
« Reply #18 on: January 29, 2008, 01:57:34 am »
nvm it works now I installed it again, this time from the source.
Thx for your help.