anon235370
anon235370

Reputation:

Linking Problems

I've tried this on Linux and Windows... I've used C and C++... I've tried with wxWidgets, gtkmm, glfw and GTK+. I've tried with various IDE's and so on. (I managed to get GLFW to work fine at one point)

My problem is I am somehow not linking libraries properly. However I cannot find out which library isn't linked because the errors are cryptic... I just know that I'm forgetting something... I cant give error as it happens with all things I try to link but this is what I do...

These are my steps to adding libraries to an IDE, please correct me if I'm doing something wrong:

  1. I always include the "include" directory for specific library(ies) in my IDE's.
  2. Then in my IDE's I add the folder of the specific library (lib) (but not each individual library)
  3. Make dummy code to test
  4. Compile and 'cannot find' errors and so on...

How to fix?

Upvotes: 0

Views: 225

Answers (4)

agupta666
agupta666

Reputation: 269

This site has a lot of information about linking and libraries for Linux systems.

For windows you need to look up Programming Windows by Jeffry Ritcher. alt text

Meanwhile if you are stuck with a specific problem, please share the errors messages.

Upvotes: 0

user001
user001

Reputation: 444

Can you please check the specified directory for existence of libraries.

In case of gtkmm, GTK+ below link will help you for developing application on windows and linux platform

http://library.gnome.org/devel/gtkmm-tutorial/unstable/sec-packages-windows.html.en

Hope this will solve your problem.

Upvotes: 0

Jerry Coffin
Jerry Coffin

Reputation: 490108

At least in Visual Studio, you normally specify both the directory where a library is located and you specify the library to link.

It sounds like you've already specified the directory where the libraries are located, so I won't get into that. Specifying the actual library is done as part of the project properties. In the <project name> Property Pages, look for configuration properties, Linker, Input, Additional Dependencies, and add the name of the library.

With a different IDE, the details will change, but at least in most cases, the general idea will be pretty similar: you have to tell it both what library to use, and where to find that library.

Upvotes: 0

Tagore Smith
Tagore Smith

Reputation: 1554

It would be really useful to see one of those cryptic error messages (one man's cryptic is another man's bread and butter) along with platform details, but generally speaking you do have to specify the libraries.

Upvotes: 3

Related Questions