I am currently working on a Linux port of an application I am developing. The app is written in c++ and works great on windows and mac. On Windows I am using Visual Studio, Xcode on mac, and Netbeans on Ubuntu Linux. My problem is that in both Xcode and Visual studio I can have a resource folder in my project relative to my code:
_Project
__>ResourceFolder
____>Image.png
__>SourceFolder
____>main.cpp
and I can pass the path "ResourceFolder/Image.png" to my load function, which receives the actual location of the image data, which to my knowledge gets embedded into the executable at compile time. When I import my code into the Netbeans 'Source Files' folder on Ubuntu however, my path breaks and I get a segmentation error from my image loading function.
I am currently working around my loading problem by placing my resource files in a directory next to the executable that gets generated, but I prefer not to use the filesystem, rather embedding my resources into the executable so people cannot so easily modify my app. I have tried changing the path many times to reference the files in my project but to no avail.
Does Netbeans support embedding images and other resources added to the project filesystem into the Linux executable and relative access paths similar to Visual Studio, or is a more complicated work around required?