Raised This Month: $51 Target: $400
 12% 

My episode1 plugin loads fine in Windows, but not in Linux


Post New Thread Reply   
 
Thread Tools Display Modes
taansari
Member
Join Date: Nov 2011
Old 02-22-2012 , 04:42   Re: My episode1 plugin loads fine in Windows, but not in Linux
Reply With Quote #21

@everyone

Thanks for all your guidance and help, I think I have spotted the cause of this error. In simple words: I shouldn't have used Code::blocks for anything more than compiling against syntax errors - I should have used 'make' command manually.

Doing so worked in stub_mm plug-in, and now it is being loaded. Now, as I tried this with my actual plug-in, it is not being loaded. Having read some where not to use stl containers anywhere (I am using ifstream), I think this should be the reason why my plug-in is now not working. Fiddling with sample_mm plug-in (with and without ifstream) shows exactly the same behavior. I had read somewhere not to rely on STL for MM:S, and had plans to correct this portion - now is the time.

I'll try to patch my plug-in and get back with updates!

Thanks to everyone, your feedback really helped me debug my problem!
taansari is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 02-22-2012 , 05:22   Re: My episode1 plugin loads fine in Windows, but not in Linux
Reply With Quote #22

Quote:
Originally Posted by http://wiki.alliedmods.net/Metamod:Source_Development#Linux
  • -lstdc++ (same as using g++) - Even if you use the exact same compiler build as Valve, linking against the libstdc++ will be painful. Not all Linux distributions use the same version, and in general ABI compatibility on this library is frequently broken. You will find that users report load failures or even crashes, and the problem may be very difficult to trace. As such, you should avoid using exceptions or any part of the Standard Template Library (STL). Valve provides many abstractions that should suffice, and SourceHook provides some as well.
__________________

Last edited by asherkin; 02-22-2012 at 05:22.
asherkin is offline
taansari
Member
Join Date: Nov 2011
Old 02-22-2012 , 05:32   Re: My episode1 plugin loads fine in Windows, but not in Linux
Reply With Quote #23

Thanks for the tip. But what I'm trying to say here is: that is only part 2 of the problem. Part 1 (which took the most time), was bottom lined to using the 'make' command manually.

Thanks!

p.s. Plug-in is loading fine now... Thanks to all for your help!
taansari is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 02-22-2012 , 05:38   Re: My episode1 plugin loads fine in Windows, but not in Linux
Reply With Quote #24

Quote:
Originally Posted by taansari View Post
Thanks for the tip. But what I'm trying to say here is: that is only part 2 of the problem. Part 1 (which took the most time), was bottom lined to using the 'make' command manually.
C::B was probably trying to use G++ instead of GCC, it would work fine if configured correctly.
__________________
asherkin is offline
taansari
Member
Join Date: Nov 2011
Old 02-22-2012 , 06:17   Re: My episode1 plugin loads fine in Windows, but not in Linux
Reply With Quote #25

Quote:
Originally Posted by asherkin View Post
C::B was probably trying to use G++ instead of GCC, it would work fine if configured correctly.
Hmm... don't think this could be the reason; my current settings say "Selected compiler: GNU GCC Compiler"
taansari is offline
Old and Slow
Senior Member
Join Date: May 2005
Location: Arlington, Texas
Old 02-22-2012 , 20:26   Re: My episode1 plugin loads fine in Windows, but not in Linux
Reply With Quote #26

Well, I am still curious about this. I have used some STL in my MM:S plugins - mainly <string> and <vector> on both Linux and Windows. I have also heard to avoid STL to some extent.

Also, looking at the Fortress-Forever installation notes, it has you download the HL2MP fileset. Where does Episode 1 fit into this?
__________________
.......Chuck |TxA| Old and Slow [AARP]
Old and Slow is offline
PAL-18
AlliedModders Donor
Join Date: Jul 2010
Old 02-22-2012 , 20:56   Re: My episode1 plugin loads fine in Windows, but not in Linux
Reply With Quote #27

I'll take this one again since its not likely known by much others.

Fortress Forever originally required HL2DM for the base files. But HL2DM was upgraded to the orangebox engine, so to get the same functionality, you install the Episode1 files.
PAL-18 is offline
taansari
Member
Join Date: Nov 2011
Old 02-23-2012 , 00:06   Re: My episode1 plugin loads fine in Windows, but not in Linux
Reply With Quote #28

Overall, how you guys tried to debug made it 'click'!

Thanks!
taansari is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:45.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode