Zeex/sampgdk — Issue #5: linker not used (-lsampgdk). linux compile normal makefile issue
Author: grasmanek94
Created: 2012-01-02 16:44:28+00:00
State: open

The terminal log:

[rafal@localhost source]$ make RouteConnectorPlugin
rm -f *~ *.o *.so
g++ -D RouteConnectorPlugin -m32 -fPIC -c -lsampgdk -I./libsampgdk-2.1.3-Linux/include -I./libsampgdk-2.1.3-Linux/lib -w -D LINUX -D PROJECT_NAME=\"RouteConnectorPlugin\" -I ./amx/ *.cpp
g++: -lsampgdk: linker input file unused because linking not done
g++ -m32 -fshort-wchar -shared -o "./RouteConnectorPlugin.so" *.o

The makefile:

This file demonstrates how to compile the RouteConnectorPlugin project on Linux.

#

# To compile RouteConnectorPlugin do:

#

# make RouteConnectorPlugin

#

GPP = g++

GCC = gcc

RouteConnectorPlugin_OUTFILE = "./RouteConnectorPlugin.so"

COMPILE_FLAGS = -m32 -fPIC -c -lsampgdk -I./libsampgdk-2.1.3-Linux/include -I./libsampgdk-2.1.3-Linux/lib -w -D LINUX -D PROJECT_NAME=\"RouteConnectorPlugin\" -I ./amx/

RouteConnectorPlugin = -D RouteConnectorPlugin $(COMPILE_FLAGS)

all: RouteConnectorPlugin

clean:

-rm -f *~ *.o *.so

RouteConnectorPlugin: clean

$(GPP) $(RouteConnectorPlugin) *.cpp

$(GPP) -m32 -fshort-wchar -shared -o $(RouteConnectorPlugin_OUTFILE) *.o

Steps I did:
1) from download section download the .sh file and run it,
2) edit my makefile
3) try to compile

If you want the source:
http://gpb.googlecode.com/files/RouteConnector_172.zip (EVERYTHING included)
the server:
http://gpb.googlecode.com/files/samp03dsvr_all.zip

Can you identify the issue?