Jump to content

C++ dependancies in Leadwerks?


Neuro
 Share

Recommended Posts

I just spent an entire day farting about with dependencies in c++, worst of all, has been ImageMagick, I mean, plugging in the header files into my cpp has been an absolute nightmare, I've been reading forums and everything and even had my friend here, a computer science graduate with quite a bit of work experience now, help me with this. (i'm running linux)

 

Now, this has been an absolute nightmare, so much so that I feel like never want to use c++ again. Will I have to worry about this kind of horror at all when I'm using leadwerks?

Link to comment
Share on other sites

Including header files in your code won't help when the linker can't find the object/library to it.

 

This article could interest you: http://en.wikipedia.org/wiki/Linker_%28computing%29

 

Also, since you're using GNU/Linux, you might want to consider taking a look at GNU Make.

 

At last I'd recommend you to take a look at the g++ manpage. Specifically the 'Linker Options' section will interest you.

LINUX: Viagra for the PC.

 

running Slackware GNU/Linux since 1996

Linux Developer

 

Windows is a 32 bit shell for a 16 bit extension to an 8 bit Operating System designed for a 4 bit microchip by a 2 bit company which can't stand one bit of competition

 

You can protect yourself from the 12/21/12 thing by not using the US short hand date format :lol:

 

21/12/12 ... Nope, that doesn't work

12/12/21 ... Doesn't work either

 

 

Crisis averted...

 

EVE-Online exclusive 21-day trial

Link to comment
Share on other sites

Regarding Linux, I can't tell you in detail yet. On other operating systems we make C++ compiling as easy as possible. It just works out of the box, 95% of the time.

 

In Linux it is possible for us to package dependencies with Leadwerks itself, and also with your games you export from Leadwerks. My inclination is to include everything rather than trying to be clever and save space, so I believe the process will be as simple as possible.

 

We're already making headway in "cleaning up" the Linux experience for users. For example, I have discovered that Intel integrated graphics interfere with the detection of a discrete GPU, making it all but impossible to install graphics drivers. (Tentative, not officially confirmed yet.) If this is indeed the case, my position is that those CPUs are incompatible with Linux. This and other useful information we discover will be added to the Ubuntu wiki in a page of our recommendations.

  • Upvote 2

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

  • 1 month later...

I just spent an entire day farting about with dependencies in c++, worst of all, has been ImageMagick, I mean, plugging in the header files into my cpp has been an absolute nightmare, I've been reading forums and everything and even had my friend here, a computer science graduate with quite a bit of work experience now, help me with this. (i'm running linux)

 

Now, this has been an absolute nightmare, so much so that I feel like never want to use c++ again. Will I have to worry about this kind of horror at all when I'm using leadwerks?

 

Compiling C/C++ code on linux is easy.

 

Headers are normally found in /usr/include or /usr/local/include

Library's are normally found in /usr/lib and /usr/local/lib

 

So assuming I have the ImageMagick Library and Development Headers installed to link against it I would ...

 

g++ main.cpp -o main -lpthread -lMagick++ -lMagickWand -lMagickCore -lz -ldl

 

To Manually specify the location of the ImageMagick Librarys ... Example:

-L/usr/lib/ImageMagick

 

To Manually specify the location of the ImageMagick Headers ... Example:

-I/usr/include/ImageMagick

 

Just remember the linking order matters.

 

You could also use a build tool like premake4

Link to comment
Share on other sites

@Neuro

 

Some tips:

1. Check if you installed development files, they usually have names with "-dev" or "-devel" on the end for example: libmagick++-dev for C++ ImageMagick interface.

 

2. If your files are in other place, than the ones where Linux distributions usually install them, for example you compiled them by yourself and didn't make usual install. Then you have to use environment variables to show your linker places where it can search for those files.

Type 'set' in terminal or check this link - https://wiki.debian.org/EnvironmentVariables

Link to comment
Share on other sites

I have more information on this now. The engine itself just requires OpenGL and X11. That's two lines in the terminal, if you don't have them installed already.

 

The editor will take more, but I am going to try to include the libraries with the editor, so you don't have to install a bunch of stuff.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

I have more information on this now. The engine itself just requires OpenGL and X11. That's two lines in the terminal, if you don't have them installed already.

 

The editor will take more, but I am going to try to include the libraries with the editor, so you don't have to install a bunch of stuff.

 

I would ship static libs for Lua and Newton Dynamics, Lua versions from distro to distro vary and major lua versions are incompatible, plus lua is small enough that shipping it wouldn't be an issue. Newton on the other hand, isn't typically found in most Linux distro repository's. Newton is a little confusing to compile and Newton's build system doesn't provide away to actually install it,

the situation is that you have to manually copy the headers and lib.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...