Development of c ++ program using eclipse

  Not only can develop eclipse java, download cdt plugin can also develop c ++, and to good effect (Why use eclipse, should be free, to speak really quite easy to use at present). Access to mysql database as an example, the development environment to build, encountered some problems, and try it yourself by Baidu, finally resolved, even comfort.

  Download the official c ++ connector, but the header file path is not deep, not in the standard header to access the folder. By project-> Properties-> c ++ build-> setting may include the following c ++ complier menus, folder path is added, so that the eclipse can be identified.

  Development c / c ++, involves the concept of compiler and linker, which is reflected in the ide there, it has a command-line compiler and linker run, but ide to help us do it. Where project-> Properties-> c ++ build-> setting-> linker in a shared library checkbox, then do not understand the election, suggesting there is no binary code at run time, you can read the flag code does not run, and more lib application name prefix, but then I realized this is the option to generate the library. Uncheck the development app.

  Then run time and reported no iamge. I am very wonder, linker has no problem ah. Baidu found to the problem of dynamic libraries, run-> run configuration-> environment, macos dynamic library suffix named .dylib, and so suffix after the linux difference. Adding environment variables DYLD_LIBRARY_PATH, we have tried the full path, not found, the runtime error, find duplicate file names. The original DYLD_LIBRARY_PATH is a folder name, it can automatically match the dynamic library folder under the runtime.

   After more attempts to take up a development environment, the development of a very smooth.

Guess you like

Origin www.cnblogs.com/Robin008/p/12099706.html