Raised This Month: $32 Target: $400
 8% 

Metamod:Source PostgreSQL, libpq, dll linking


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sheral93
New Member
Join Date: May 2017
Old 05-06-2017 , 21:25   Metamod:Source PostgreSQL, libpq, dll linking
Reply With Quote #1

Hello, guys!

I need a plugin for CS:GO to save the statistics of the mathes to PostgreSQL database.
I'm using a libpq library. When I load my plugin to the server "meta list" commad returns:
"Listing 1 plugin:
[02] <ERROR>"

When I am trying to "meta retry 2" it returns:
"Error reloading plugin: ═х эрщфхэ єърчрээ√щ ьюфєы№."

I guess it needs some dll files in the same folder, but how could I know what is the name of that dll.
I have tried to copy all the *.dll files from postgresql/bin, but it didn't work. However, on another console application copying those files is enough to run the application.

So, how could I know which dll files can not be found? Or can I compile a plugin with static linking a libpq?

Thank you for your attention.
sheral93 is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 05-07-2017 , 15:06   Re: Metamod:Source PostgreSQL, libpq, dll linking
Reply With Quote #2

These aren't really MM:S questions but questions about Windows and Postgres.

You can use a tool like Dependency Walker to find what's missing, but the problem is probably that you're not putting them in a place where Windows is looking for them. You can look up the DLL search locations on MSDN somewhere. Off the top of my head it's roughly the program's EXE directory, then the system directory, then the working directory, and then in $PATH.

For static linking of Postgres, you would have to look in their docs.
Fyren is offline
sheral93
New Member
Join Date: May 2017
Old 05-07-2017 , 15:32   Re: Metamod:Source PostgreSQL, libpq, dll linking
Reply With Quote #3

Thank you very much. It was late at night and I was sleepy, so that's my mistake that I wrote in a wrong forum. However, placing postgresql dll files in the bin folder of server solved that problem!
sheral93 is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 05-07-2017 , 21:52   Re: Metamod:Source PostgreSQL, libpq, dll linking
Reply With Quote #4

You could use the postgresql interface for sourcemod or check the code to see how to link statically against libpq.
https://forums.alliedmods.net/showthread.php?t=236415
https://github.com/alliedmodders/sourcemod/pull/32
__________________
Peace-Maker is offline
Reply


Thread Tools
Display Modes

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 03:59.


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