Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


can't open wx/defs.h
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Sat Jul 12, 2008 10:34 pm    Post subject: can't open wx/defs.h Reply with quote

I finally got code to find a public IP but whenver I try to compile VC++ says it can't find wx/defs.h. I looked in the folder where I have the include directories set up and it's right there...defs.h. So I tried setting it to just the include folder so it would include wx/defs.h, but then it couldn't find wx/setup.h. I don't see why it can't find it. It's not my code is it o.O

Code:

#include <socket.h>
#include <string.h>

int main()
{
   wxIPV4address *ipaRemote = new wxIPV4address(); // IP addy objects..
   wxIPV4address *ipaLocal = new wxIPV4address();
   ipaRemote->Hostname( wxT("www.google.com") ); // Remote host
   ipaRemote->Service(80); // Remote port

   wxSocketClient *sClient = new wxSocketClient(); // Make a socket
   if( sClient->Connect(*ipaRemote) ) { // Connect the socket to the remote host
      sClient->GetLocal(*ipaLocal); // Fill the object
      wxPuts( ipaLocal->IPAddress() ); // Get the IP address AND DISPLAY IT.
   }

   // Clean-up
   delete ipaRemote;
   delete ipaLocal;
   delete sClient;

   return 0;
}

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Zand
Master Cheater
Reputation: 0

Joined: 21 Jul 2006
Posts: 424

PostPosted: Sat Jul 12, 2008 11:32 pm    Post subject: Reply with quote

Easiest way to do it is to put it in the actual folder where your other source files are, then use #include "wx/defs.h" and so on. In other words put the entire wx folder into your source folder.
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Sun Jul 13, 2008 12:19 am    Post subject: Reply with quote

Now I get this error.

Quote:

c:\documents and settings\oib\my documents\visual studio 2008\projects\test\test\wx\platform.h(196) : fatal error C1083: Cannot open include file: 'wx/setup.h': No such file or directory


But there is no setup.h in my wx folder. There's settings.h, setup_inc.h, and setup_redirect.h, but no setup.h. I'm using v2.8.8 so if it should be there should I just reinstall it?

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Zand
Master Cheater
Reputation: 0

Joined: 21 Jul 2006
Posts: 424

PostPosted: Sun Jul 13, 2008 12:24 am    Post subject: Reply with quote

You have to compile the wxWidgets library to get that file.

Gotten from CodeProject

Code:
Starting with wxWidgets is really very easy. Just follow these steps:

    * Download the wxMSW-2.6.2-Setup.exe from the sourceforge.net website.
    * Run the setup's EXE and install it in say "C:\wxWidgets\" folder.
    * Add an environment variable $(WXWIN) to your system. The value will be the path of the folder where you have installed wxWidgets.
         1. Right click on the My Computer icon on your desktop.
         2. Select Properties.
         3. A dialog appears. Select the "Advanced" tab in that dialog.
         4. Click "Environment Variables" button.
         5. Another dialog appears. Click on the "New" button in the "System variables" box.
         6. Add "WXWIN" in the "Variable name" text box and the folder path where you have installed wxWidgets in the "Variable value" text box.
         7. Click the OK button till all the dialogs disappear.

    * Open "src\wxWindows.dsw" and "build\msw\wx.dsw" files in Visual studio and build the projects (libraries) in the solution for all the project configurations namely: Debug, Release, Debug DLL, Release DLL, Unicode Debug, Unicode Release, Unicode Debug DLL, Unicode Release DLL. These solution files are in the wxWidgets installation folder. This step will create some libraries needed by our application for linking. These files will be created in the "lib", "lib\vc_lib\" and "lib\vc_dll\" folders under your wxWidgets installation directory.
    * Now everything is ready to feel the power of wxWidgets.
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Sun Jul 13, 2008 1:08 am    Post subject: Reply with quote

I did all that (installed 2.6.2). But I still get the missing wx/setup.h thing! X_X
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Zand
Master Cheater
Reputation: 0

Joined: 21 Jul 2006
Posts: 424

PostPosted: Sun Jul 13, 2008 3:29 am    Post subject: Reply with quote

Installing it is just the first step. AFAIK you gotta open a project that comes with it and compile it to get setup.h.
Back to top
View user's profile Send private message
Jani
Grandmaster Cheater
Reputation: 2

Joined: 29 Dec 2006
Posts: 804

PostPosted: Sun Jul 13, 2008 4:52 am    Post subject: Reply with quote

For static builds, include
Code:
"C:\Program Files\wxMSW-2.8.8\lib\vc_lib\mswu"
or
"C:\Program Files\wxMSW-2.8.8\lib\vc_lib\mswud"
(release/debug)
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Sun Jul 13, 2008 8:46 am    Post subject: Reply with quote

Zand wrote:
Installing it is just the first step. AFAIK you gotta open a project that comes with it and compile it to get setup.h.


No I mean I installed 2.6.2 so I could follow those guys steps and I did. But I still get that error. But I did find setup.h.

C:\wxWidgets-2.6.2\include\msvc\wx

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Zand
Master Cheater
Reputation: 0

Joined: 21 Jul 2006
Posts: 424

PostPosted: Sun Jul 13, 2008 9:12 am    Post subject: Reply with quote

Yea, then you gotta copy the setup into the correct place. (inside wx folder)
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Sun Jul 13, 2008 9:47 am    Post subject: Reply with quote

Yay. I sort of got it. It's now a linking error instead of a compiling error.

Quote:

------ Build started: Project: test, Configuration: Debug Win32 ------
Linking...
LINK : fatal error LNK1104: cannot open file 'wxexpatd.lib'
Build log was saved at "file://c:\Documents and Settings\OIB\My Documents\Visual Studio 2008\Projects\test\test\Debug\BuildLog.htm"
test - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Jani
Grandmaster Cheater
Reputation: 2

Joined: 29 Dec 2006
Posts: 804

PostPosted: Sun Jul 13, 2008 10:40 am    Post subject: Reply with quote

Two reasons I can think of (atm):
1) You haven't compiled the libraries.
2) You linker path isn't setup correctly.
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Sun Jul 13, 2008 11:49 am    Post subject: Reply with quote

I did compile the libraries. And I don't think I have wxexpatd.lib. Can anyone give it to me?
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Zand
Master Cheater
Reputation: 0

Joined: 21 Jul 2006
Posts: 424

PostPosted: Mon Jul 14, 2008 3:30 am    Post subject: Reply with quote

Make sure you copy the correct setup.h and you have compiled the library for debug mode
Back to top
View user's profile Send private message
Jani
Grandmaster Cheater
Reputation: 2

Joined: 29 Dec 2006
Posts: 804

PostPosted: Mon Jul 14, 2008 4:19 am    Post subject: Reply with quote

Compile the libraries and you'll have one.
Code:
nmake -f makefile.vc BUILD=debug MONOLITHIC=0
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Mon Jul 14, 2008 10:01 am    Post subject: Reply with quote

I compiled the libraries (wxWindows.dsw and wx.dsw) just like Zand said.

EDIT:

I got it working using makefiles. But now it says this!

Quote:

------ Build started: Project: test, Configuration: Debug Win32 ------
Linking...
LINK : fatal error LNK1104: cannot open file 'wxbase26ud.lib'
Build log was saved at "file://c:\Documents and Settings\OIB\My Documents\Visual Studio 2008\Projects\test\test\Debug\BuildLog.htm"
test - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites