Re: [OT] Compiling with wxWindows
>>>>> "RS" == Roberto Sanchez <rcsanchez97@yahoo.es> writes:
RS> I have recently (actually, today) embarked on learning wxWindows so as to be
RS> able to properly develop cross-platform apps. Mostly because I am now a
RS> diehard Linux user (zealot even) and most of my professors only hear the drone
RS> of the Microsoft marketing machine. But, I digress.
RS> I was having a heck of a time because nothing would compile. I finally decided
RS> to go the website and read a tutorial. Anyhow, this is the command that I need
RS> to execute to compile my Hello World! program:
RS> g++ -g hworld.cpp `wx-config --libs` `wx-config --cxxflags` -o hworld
RS> I have been using gcc/g++ for a few months now, but for the life of me I can't
RS> figure out what `wx-config --libs` means and what `wx-config --cxxflags` means.
RS> I tried substituting -lwx-config for the first one, but that doesn't work.
I've never compiled a wxWindows app, but the backtick operators (` `)
tell the shell to replace the string in backticks with the output of
the string as a shell command. On my box, this is:
jdb@bigbox:~$ wx-config --libs
-pthread -lwx_gtk-2.3
jdb@bigbox:~$ wx-config --cxxflags
-I/usr/lib/wx/include/gtk-2.3 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES
So your command line is really:
g++ -g hworld.cpp -pthread -lwx_gtk-2.3 -I/usr/lib/wx/include/gtk-2.3 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -o hworld
--Joe
--
Joseph Barillari -- http://barillari.org
Reply to: