• Custom Module ~ Couldn't load module library!
    6 replies, posted
I remade a C++ script built for win32 to Linux currently getting the error "Couldn't load module library!" I built the dll/so file directly on the same computer there is no real debug from this just it says it cant load it?.. [CODE] [ERROR] lua_run:1: Couldn't load module library! 1. require - [C]:-1 2. unknown - lua_run:1 [/CODE] It has gmsv_ at the start and _linux.dll at the end of the file name Linux server from here [url]http://wiki.garrysmod.com/page/Creating_Binary_Modules[/url] No errors on build one warning about a deprecation but that's fine..
The weird -1 error I believe is for missing dependency. I've gotten it before due to a missing msvc dll of some sort on windows. Could be a weird linux issue but maybe try compiling with [url=http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html]-static-libstdc++[/url]? Also if possible see if you can get some debug output from running steam with -console and garrysmod (hl2.exe) with -dev through terminal. Not sure if it will tell what dependency is missing.
[QUOTE=mcd1992;41805233]The weird -1 error I believe is for missing dependency. I've gotten it before due to a missing msvc dll of some sort on windows. Could be a weird linux issue but maybe try compiling with [url=http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html]-static-libstdc++[/url]? Also if possible see if you can get some debug output from running steam with -console and garrysmod (hl2.exe) with -dev through terminal. Not sure if it will tell what dependency is missing.[/QUOTE] I'm not sure how to build with -static-libstdc++ ? But -debug is enabled. make -I static-libstdc++ ?
In the Makefile there should be gcc <bunch of shit here> mymodule.cpp or something. Paste your Makefile for me. But it is a tick that goes with g++/gcc.
The .make [url]http://pastebin.com/J4VTNZnx[/url] The Makefile [url]http://pastebin.com/Q8Lig8bf[/url]
In the .make on line 29 with the [code]CFLAGS += $(CPPFLAGS) $(ARCH) -g -msse -O2 -ffast-math -fPIC[/code] put it with the other ticks. I cant guarantee anything though. I've never compiled for srcds linux before.
[QUOTE=mcd1992;41805857]In the .make on line 29 with the [code]CFLAGS += $(CPPFLAGS) $(ARCH) -g -msse -O2 -ffast-math -fPIC[/code] put it with the other ticks. I cant guarantee anything though. I've never compiled for srcds linux before.[/QUOTE] Thanks but it didn't work... Wonder what I'm missing..
Sorry, you need to Log In to post a reply to this thread.