Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Unable to add Steam API to the Linux Template Tier 2

Author
Message
Parry
AGK Developer
14
Years of Service
User Offline
Joined: 16th Dec 2009
Location: Swampstone
Posted: 11th Jun 2018 17:25 Edited at: 27th Jul 2018 22:08
EDIT: I finally figured how to get steam working. Check this thread for Instructions: https://forum.thegamecreators.com/thread/222679

I misunderstood the -shared flag in g++

-------------------------------------------------------------------------------------------------------------

Has anyone been able to get the steam API working with the agk linux template? I'm getting an error that wants libAGKLinux.a to be recompiled with the "-fPIC" flag.

This is what I've done so far.

1> Make sure Steam is running and you are logged into the account where you paid your Product Submission Fee.

2> Download the steam sdk and extract it into your template folder. It should add a folder called "sdk".

3> Edit MakeFile

Change:

INC = -I../../common/include -I../../common -I../interpreter -I../../bullet -I../../bullet/BulletCollision/CollisionShapes

To:

INC = -I./sdk/public/steam -I../../common/include -I../../common -I../interpreter -I../../bullet -I../../bullet/BulletCollision/CollisionShapes

Change:

CFLAGS = -02

To:

CFLAGS = -02 -fPIC

Change:

# link the .o files
Executable: | $(OBJS)
$(CC) $(OBJS) -o build/LinuxApp$(ARCH) $(LDFLAGS) -Wl,-Bstatic -lAGKLinux -lglfw3 -Wl,-Bdynamic -lGL -lXt -lX11 -lXxf86vm -lXrandr -lpthread -lXi -lXinerama -lXcursor -lcurl -lopenal -ludev -ldl

To:

# link the .o files
Executable: | $(OBJS)
$(CC) $(OBJS) -o build/LinuxApp$(ARCH) $(LDFLAGS) -Wl,-Bstatic -lAGKLinux -lglfw3 -Wl,-Bdynamic -lGL -lXt -lX11 -lXxf86vm -lXrandr -lpthread -lXi -lXinerama -lXcursor -lcurl -lopenal -ludev -ldl -shared libsteam_api.so

4>Add "libsteam_api.so" in the template directory. It is located in "sdk\redistributable_bin\linux64"

5>Create a text file called "steam_appid.txt" and type your app id number. Save this file and place it in the directory that will contains the complied executable file.

6>Edit template.c to the following:



My MAKEFILE:



ERROR:

Login to post a reply

Server time is: 2024-11-23 20:52:54
Your offset time is: 2024-11-23 20:52:54