ParaToxic Posted May 20, 2011 Share Posted May 20, 2011 Hey , i have searched for the error in the Netwerks Lib in LEadwerks.I Think lots of people in this forum want netwerk connecting in there games. Josh: The Command in the netwerks.c (ExitFunc make a Linking error),so please delete the codeline #ifndef LEADWERKS_ENGINE_NETWERKS and #endif LEADWERKS... Then i would works I hope iam not the only one with this error and it would helps other. Thanks Quote Link to comment Share on other sites More sharing options...
Canardia Posted May 20, 2011 Share Posted May 20, 2011 There is no error in netwerks.cpp, but you need to include engine.h before netwerks.h. Netwerks.h works also without engine.h, but then you must not include engine.h after it. So you have 2 options to use netwerks.h: Leadwerks Engine with Leadwerks Netwerks: #include "engine.h" #include "netwerks.h" or Standalone Leadwerks Netwerks without Leadwerks Engine (for example for a Leadwerks Game Server): #include "netwerks.h" // DON'T include engine.h now! Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
ParaToxic Posted May 20, 2011 Author Share Posted May 20, 2011 Yea but the problem is,when you add netwerks.cpp to your projekt ,it gives an error,without including the header file anywhere. When you delete that lines it works Quote Link to comment Share on other sites More sharing options...
Canardia Posted May 20, 2011 Share Posted May 20, 2011 You might need to define LEADWERKS_ENGINE_NETWERKS in your project's compiler settings. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
ParaToxic Posted May 20, 2011 Author Share Posted May 20, 2011 Yes you can but what is the meaning of the commandline?? I Thinks its easier to delete this line Quote Link to comment Share on other sites More sharing options...
Pixel Perfect Posted May 20, 2011 Share Posted May 20, 2011 It's simply to ensure there is only ever one instance of this defined, any attempt to add a second #include "netwerks.h" will not attempt to redefine the same contents if they have already been defined. It should be left in. netwerks.cpp will reference the header as an include so the include file either needs to be included in your project or at least the path to the include file specified in your compiler options. Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
Canardia Posted May 20, 2011 Share Posted May 20, 2011 Well the whole idea of #ifdef in C++ is that you don't need to change the source code, since you can control the contents with compiler defines. I tried to compile it, and it seems there is one letter too much in netwerks.cpp: It should say #ifdef and not #ifndef. I have sent Josh the fixed header. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
ParaToxic Posted May 20, 2011 Author Share Posted May 20, 2011 Ok thats right now:D But i have one Question.I have created a host,peer and a Packet where i write an integer 4 in.So now in the main loop i will read a integer ,the other netuser have sended to my ip.But in the Command ReadLine oder other Read... you need the Objekt TStream,which don`t exist.I mean the Lib doesen`t have any commands for this objekt,so how can i read the message the other netuser broadcasted? Quote Link to comment Share on other sites More sharing options...
Canardia Posted May 20, 2011 Share Posted May 20, 2011 Forum search helps: http://www.leadwerks.com/werkspace/topic/3043-networking/page__view__findpost__p__28203 Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
ParaToxic Posted May 20, 2011 Author Share Posted May 20, 2011 thanks Quote Link to comment Share on other sites More sharing options...
Pixel Perfect Posted May 21, 2011 Share Posted May 21, 2011 thanks It's good to see someone trying the Leadwerks Networking again. I have no need for networking presently so I've never looked at this but I'll look forward to seeing if you manage to get it all working. Good luck! Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
Rick Posted May 25, 2011 Share Posted May 25, 2011 Im pretty sure everyone who has tried le networking has given up due to frustration. If and when that happens I'd recommend raknet. I've used it many times and it works nicely! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.