开发者

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?


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.


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.


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.


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.

Linking Problems

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜