LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-14-2007, 07:34 AM   #1
mohtasham1983
Member
 
Registered: Apr 2005
Location: San Jose
Distribution: Fedora 3,4- Ubuntu 6.06 to 8.10, Gentoo and Arch
Posts: 408

Rep: Reputation: 30
Running GUI wxWidgets program on eclipse


Hello everybody,
I have followed instruction at http://www.wxwidgets.org/wiki/index.php/Eclipse
to configure eclipse to compile wxWidgets library.

When eclipse compiles the program, it doesn't create the executable file, although it doesn't find any errors and everything seems to be fine.

Here is the output of eclipse when compiling:

Code:
**** Build of configuration Debug for project practice ****

make -k all 
Building file: ../chapter3.cpp
Invoking: GCC C++ Compiler
g++ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"chapter3.d" -MT"chapter3.d" -o"chapter3.o" "../chapter3.cpp"
Finished building: ../chapter3.cpp
 
Building target: practice
Invoking: GCC C++ Linker
wx-config --libs g++  -o"practice"  ./chapter3.o   
-pthread   ++ -opractice ./chapter3.o -lwx_gtk2u_g++-2.8 -lwx_gtk2u_-opractice-2.8 -lwx_gtk2u_./chapter3.o-2.8 -lwx_baseu-2.8 
Finished building target: practice
 
Build complete for project practice

I compiled the same program using the following command on console and I could see the program running.

Code:
g++ chapter3.cpp `wx-config --libs` `wx-config --cxxflags` -o chapter
Has anyone had the same problem?
 
Old 06-23-2007, 01:40 PM   #2
gawhelan
LQ Newbie
 
Registered: Jun 2007
Posts: 2

Rep: Reputation: 0
It looks like the linker command is set to "`wx-config --libs` g++" rather than "g++ `wx-config --libs`".
You can change it in the project's properties by selecting "C/C++ Build" then the "Tool Settings" tab and clicking on "GCC C++ Linker". You should see a field called "Command" which should read "g++ `wx-config --libs`".
 
Old 06-23-2007, 01:49 PM   #3
mohtasham1983
Member
 
Registered: Apr 2005
Location: San Jose
Distribution: Fedora 3,4- Ubuntu 6.06 to 8.10, Gentoo and Arch
Posts: 408

Original Poster
Rep: Reputation: 30
great!!! I should have done this more carefully indeed.

You really helped someone with your first post. Keep going.

Thank you very much.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[wxWidgets] how to unfroze the GUI while the event is running? sylvaticus Programming 10 10-24-2006 02:57 PM
Running program in GUI opens term window zer0hmz Linux - Newbie 2 08-05-2006 02:36 AM
making a program in Eclipse Shaun32 Fedora 1 04-21-2006 02:40 PM
[bash] running a GUI program as root billiejoex Linux - General 3 01-02-2006 01:21 PM
LXer: Book Review: Cross platform GUI programming with wxWidgets LXer Syndicated Linux News 2 12-21-2005 12:52 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration