Page 3 of 3 FirstFirst 123
Results 21 to 27 of 27
  1. #21
    Join Date
    Dec 2005
    Posts
    97
    Again, I don't fully understand visual studio enough to know what all of this stuff means. However, I believe every project links to the same 2 setup.h files. One of those setup.h is used for the normal build, the other is for the "Universal" build. I'm not sure what Universal is (if you were curious, I'm sure searching around the wxwidgets page would reveal it)...but I don't think you want to do it. By default it should do the standard build, and I don't think it has the #ifdef" around the define USE_GLCANVAS. I would set that one to 1 (if you want to use OpenGL), and build it. You can also tell, because if you look at the top of the setup.h files, one of them talks about being a "Universal" build, or something like that.

  2. #22
    Join Date
    Mar 2008
    Posts
    24
    Looks like I'm going to have to do some more research. Problem is, there are two setup.h header files in every program in the list. So which one/s do I change?

    I'm now working on the VTMs HelloWorldApp lesson. Basically it's just for testing to see if wxWidgets is setup right.

    I've included just about everythng that can be included under tools, properties, general, preproccesor, linker, etc.

    But yet, my "HelloWorldApp" keeps saying, "cannot open include file: 'wx/setup.h': No such file or directory"

    Funny thing is, I tested some of the sample programs in the wxWidgets folder and they compile just fine. But my HelloWorld program can't find the setup.h file. lol

    Oh well, back to the drawing board. haha

  3. #23
    Join Date
    Dec 2005
    Posts
    97
    Hey, Did you read the thing I said above (my first post in this thread I believe)? If you do that, it should be able to find the right file. Also, like I said...I don't think there are a bunch of setup.h files. Only 2. Each project references the same file, so you don't need to worry about "which" you selected, except between the Universal and regular.

    Now, for a quick explanation of my understanding of how Visual Studio and compiling works. For every file you include (#include), Visual Studio needs to know the location. As best I can tell there are 3 ways to do this:
    1. Tools:Options -> Projects and Solutions: VC++ Directories -> Include Files. In there, add any directories that you want Visual Studio to search for include files. This is permanent to Visual Studio, so every time you create a new project, it will look in this directory.
    2. Right-click on your project : Properties -> Configuration Properties : General : Additional Include Directories. This is similar to the above (add appropriate directories), but is only relevant to that project. This is also why you can compile the wxWidgets sample files: they all reference stuff in this way.
    3. Create a property sheet and apply it. This is what I explained before. This is more like option #2, except it can store all sorts of project properties.

    With that said, you need to include wx/setup.h, which should be located in the following location (assuming you installed wxWidgets to the default spot):
    C:\wxWidgets-2.8.8\include\msvc
    You can see this in the property sheet here: AdditionalIncludeDirectories=""$(wxwidgets)\i nclude\msvc";"$(wxwidgets)\include" " (I think the &quot can be deleted).

    Once you get that working, chances are good you will get linker errors next. That's even more painful, and to be honest I don't even know all the libraries you need to link with (they might have changed names slightly from the tutorials). That's one nice thing about that property sheet...it appears to just work with it.

    At any rate, hopefully that helps get past that error.

  4. #24
    Join Date
    Mar 2008
    Posts
    24
    No, I didn't earlier because I was following the video and got side tracked, But I was intending to, and will, try it.

    BTW, what you said aerlier about the setup.h files. You're right. I went ahead and changed the value of the GLCANVAS setting in just one of them (the one you said to change), in just one of the programs, and built it. Afterwards I checked the rest of the programs down the list and all the like setup.h files were changed as well.

    So that setup.h file is actually the same file being use in many programs. That setup.h file is all over the freeking place! The one that my program can't seem to find???? LOL So I will try what you said and see if that works.


    Thanks again.

  5. #25
    Join Date
    Mar 2008
    Posts
    24
    BlueHyrax, I finally found some time (been very busy with job)to try out what you posted in your first post. It worked great!

    I used the Hello World coding from the VTM, but used your method to set it up and it compiled fine. I don't understand exactly why it works, but it does.

    BTW, you were saying that you didn't remember where you got that file for the wx.vsprops. Well, in the Vid that you gave me the link for, the guy uses that same code for his wx.vsprops setup file. I found the guys actual web link where the vid came from. The dl link for it is just below the video screen.

    http://www.e-socrates.org/mod/resource/view.php?id=1609

    For some reason, his didn't work for me but I think I had everything so screwed up at the time that nothing would work. Since then I set everything back to default, installed a fresh copy of wxWidgets 2.8.8, rebuilt it, and used your method for adding the wx.vsprops.

    Thanks alot. Thank both of you guys. Because I'd be completely lost in this without your help.
    Last edited by Brusher; 08-01-2008 at 02:42 AM.

  6. #26
    Join Date
    Mar 2008
    Posts
    394
    Yay! Success finally. Congrats to BlueHyrax for finding the cure.

    Brusher, as a reward, you need to keep going with C++ and wxWidgets and come back with coding problems next time

    It would be nice to see a more active C++ community, so I hope you'll become one of those users!

  7. #27
    Join Date
    Mar 2008
    Posts
    24
    No doubt Khalhern. I'm sure I will have a few coding issues. But hopefully I can be of some help to someone, someday, as well.

Page 3 of 3 FirstFirst 123

Posting Permissions

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