Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Can't find wx header files but they are there.

  1. #11
    Join Date
    Jul 2010
    Beans
    18
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Can't find wx header files but they are there.

    Quote Originally Posted by Arndt View Post
    I think I see the error in the Makefile: you have .cpp source files but do

    OBJS = ${SOURCES:.c=.o}

    Do

    OBJS = ${SOURCES:.cpp=.o}

    instead, and then the building ought to follow the steps outlined in the first answers to your question. Maybe it even works, but if not, we will have a more correct compilation step.
    Nope. Sorry it didn't work but thank you for your post!

  2. #12
    Join Date
    Sep 2009
    Beans
    1,293

    Re: Can't find wx header files but they are there.

    I take it since it's looking in /usr/local that you're using a manually built version of wx. sorry if you'ce checked but are you *absolutely* sure that
    Code:
     $ ls /usr/local/include/wx-2.8/wx/wx.h
    exists?

  3. #13
    Join Date
    Jun 2007
    Location
    Maryland, US
    Beans
    6,267
    Distro
    Kubuntu

    Re: Can't find wx header files but they are there.

    Quote Originally Posted by Yoshi65 View Post
    Nope. Sorry it didn't work but thank you for your post!
    Arndt is correct; you have a flaw in your Makefile. Simply because your Makefile still fails is because you still have other issues (with the Makefile).

    You do not use pkg-config to obtains the flags/libs for the wxwidgets package; use wx-config instead. (I know... very dumb developers, those wxwidget folks are!)

    To get you on your way, here's a Makefile that hopefully should work:
    Code:
    PACKAGE  = myprg
    
    SRCS     = hworld.cpp
    OBJS     = ${SRCS:.cpp=.o}
    CXXFLAGS = `wx-config --cxxflags`
    LDFLAGS  = `wx-config --libs`
    
    
    ${PACKAGE} : ${OBJS}
    	${CXX} -o $@ $^ ${LDFLAGS}

  4. #14
    Join Date
    Jul 2010
    Beans
    18
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Can't find wx header files but they are there.

    Quote Originally Posted by dwhitney67 View Post
    Arndt is correct; you have a flaw in your Makefile. Simply because your Makefile still fails is because you still have other issues (with the Makefile).

    You do not use pkg-config to obtains the flags/libs for the wxwidgets package; use wx-config instead. (I know... very dumb developers, those wxwidget folks are!)

    To get you on your way, here's a Makefile that hopefully should work:
    Code:
    PACKAGE  = myprg
    
    SRCS     = hworld.cpp
    OBJS     = ${SRCS:.cpp=.o}
    CXXFLAGS = `wx-config --cxxflags`
    LDFLAGS  = `wx-config --libs`
    
    
    ${PACKAGE} : ${OBJS}
    	${CXX} -o $@ $^ ${LDFLAGS}
    Thank you so much it works! Even with the GTK+ library! Thanks again! How does it work though? What is different?

  5. #15
    Join Date
    Dec 2006
    Beans
    Hidden!

    Re: Can't find wx header files but they are there.

    Quote Originally Posted by Yoshi65 View Post
    Okay thanks guys! That fixed that problem but it isn't finding the wx/wx.h header and it does the for the GTK+ header too. But both of them are there. Why is it not seeing both of the header files? I switched from GTK+ to wxWidgets because of this problem but I see it here too!
    If you switched from one widely-used platform to another widely-used platform, just because of a tiny little problem that you couldn't figure out, I don't think you will be very successful in your programming endeavours.

    You do not throw something at the wall and expect it to stick. You need to read more about compilation and Makefiles, before placing the blame on others.

Page 2 of 2 FirstFirst 12

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •