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 Studio Chat / [SOLVED] #include relative folders question

Author
Message
BitManip
10
Years of Service
User Offline
Joined: 20th Dec 2013
Location: Essex
Posted: 21st Oct 2022 10:11
Hi all

Been a while since I played with agk so a little rusty. Thanks in advance!

I want to create files that are commonly used in all T1 apps I may make. An example of such a common file would be a math.agc file.

I want these common libraries to be in a common folder, not the project folder. However every time I attempt this, it seems inaccessible.

I understand that the read folder is the current folder of my project?

Imagine my folder structure as follows
>T1_Projects
>CommonLibs
>Projects
>Project 1
>Media
>Project 2
>Media

So if working on 'Project 2"

I figure the '#include should be something like this?
#include "../../CommonLibs/math.agc"

But I keep getting an error Failed to Open File.

What am I doing wrong?
I control all the juicy in here!

The author of this post has marked a post as an answer.

Go to answer

Heavens
8
Years of Service
User Offline
Joined: 10th May 2015
Location:
Posted: 21st Oct 2022 21:06
This post has been marked by the post author as the answer.
I have my files the same way, you are going back two directories where you only need to go back one

So

#include "../CommonLibs/math.agc"

Should be what you want.

Login to post a reply

Server time is: 2024-03-29 06:47:33
Your offset time is: 2024-03-29 06:47:33