I have downloaded LEDA free edition from this website
http://www.algorithmic-solutions.com/leda/ledak/index.htm
First quetion:
I want to use this library with my project in VS2010 ide, but i didn't really catch from installation notes, how can i install this library on windows platform.
There were already some static libs (you can see them on the image), which i added to my project with appropriate headers. But that, i suggest, is not a right way. So i will be glad if you will briefly describe the steps, which i should make to compile this library...
The root library directory looks like this
Second question:
In leda's installation guide i can see two main sections:
1.) CONFIGURATION/INSTALLATION FOR UNIX
2.) CONFIGURATION/INSTALLATION for MS Visual C++
In "CONFIGURATION/INSTALLATION for MS Visual C++" i can see the following:
Go to the LEDA main directory (at the command prompt used above).
Type: lconfig msc [dll] [ ml | mld | md | mdd | mt | mtd ]
I'am sorry, i have never seriously used UNIX based systems, but i always thought that MS Visual C++ is a thing, strongly connected with Windows, and lconfig is a unix command?
So i confused, this guide is for unix or for windows or ...?
Thank you, sorry for possibly stupid questions.
The LEDA "free" edition does not include source code. They sell the source code for users who want to modify / compile it. What you have downloaded can be used by including the .h in \incl and linking against the appropriate .lib files. It appears that the package gives you several .lib files to cover all the options of static linking or dynamic linking.
The lconfig instructions are for when you do have the source code, and you want to control which configuration of dll/lib gets built.
"lconfig" is not a standard or even niche UNIX tool; a quick google suggests it's something that actually comes with LEDA itself. Since you've downloaded it, you ought to see it someplace in the bundle.
Related
I'm a beginner when it comes to c++ and overall including libraries, so I spent the good part of my last 3 days trying to install various GUI libraries and trying to make them work with Visual Studio, but none of these tries were successful.
It comes down to the problem of having to include the files and link the libraries. It seems, at least to me, extremely tedious and time consuming having to copy paste everything in those boxes in Visual Studio.
I need a helping hand to figure out what I'm doing wrong, here is how I tried:
Visual Studio 2017 - gtkmm library with the windows installer
I download the required Gtk+ and install it successfully.
I open the properties of my project, go to the includes and paste the required paths. I go to the linker and proceed to paste those paths.
Accept,try to paste a hello world program with the includes -> everything is underlined with red.
And this isn't even the actual gtkmm implementation.
Now my question is, did I forget a step or is it just the basic snippet that doesn't work (I'll spare you from posting it).
What do I do, when the tutorial for the library tells me to include 2 or 3 files whilst I have like 20 in my folder?
Also, is it somehow bad practice to place the libraries onto a different drive?
Sorry if I sound lost, but that's pretty much how I feel in those tutorials..
Edit, just in case, this is the snippet I'm referring to:
#include <gtk/gtk.h>
int main(int argc, char *argv[]) {
gtk_init(&argc, &argv);
g_printf("GTK+ version: %d.%d.%d\n", gtk_major_version,
gtk_minor_version, gtk_micro_version);
g_printf("Glib version: %d.%d.%d\n", glib_major_version,
glib_minor_version, glib_micro_version);
return 0;
}
g_printf, glib_major_version, glib_minor_version and glib_micro_version are red underlined, but not gtk_major_version
EDIT:
Thank you for the suggestions and the in-depth tutorial although questions like this don't fit stackoverflow.
Can you tell me how to include huge amounts of header and lib files when they are in many folders? Do you I need to access all folders manually and include them?
Yes, you undoubtedly missed a step in Visual Studio. No, its not bad to install it on another drive.
The general idea is:
1) Install the library somewhere on your machine. Doesn't really matter where. Take note of the "lib" directory and the "include" directory paths.
The include directory contains header files which allow your code to understand the forward declarations of the code your trying to use.
The lib directory contains the binaries (dll for dynamic linking, lib for static linking). Sometimes there are different binaries for release/debug. I'd link the debug library and worry about the release code when you get there
Note, sometimes they want you to compile the code yourself and create the binaries. They will include compile instructions. After you create the binaries you can go back to step 1 here and repeat the steps. This is because they either don't want to precompile binaries for your platform or their project philosophy is to do it yourself.
2) In Visual Studio you have to tell the compiler (separately) where the new additional include and library directories are. On 2017 that is...
Include Directory: Project > {Name} Properties > C/C++ > General > Additional Include Directories
Library Directory: Project > {Name} Properties > Linker > General > Additional Library Directories
3) Now include the libraries (binaries) themselves. On 2017 that is...
Library Binaries: Project > {Name} Properties > Linker > Input > Additional Dependencies
They should provide you a list of binaries to include in the project if there are external dependencies or they have broken their project up into multiple libraries for modularity.
If you want to program in C/C++, this is a process you're going to go through again and again. Its a bit arcane, but once you get it down, its not going to surprise you.
Edit:
Oh, and as an aside, people have mentioned Qt. This framework is a little different in regards to Visual Studio. Its very involved to set up the dependencies yourself because they have included language extensions and a tool for creating GUIs. For this reason, there is a tool (which is quite nice) for creating Qt projects from a template. This sets up all the compiler steps, includes, and linked libraries for you.
In my opinion its probably the best and most mature of the GUI libraries for C/C++ on Windows and is also cross platform.
I needed SQLite for Win x64 to use in the C++ project in MS VS 2010. And I found this post with the link to x64 build, but it needs .net framework. Can I use in the my project? Also, I am about to use automated building on server side in this project, so it can be a problem to meet additional requirements (does it?).
So, does anyone have a link to precompiled SQLite DLL for x64 or I need to build it from sources? Also, if I am wrong about .net version and it is the one I need, let me know, please.
There is no official precompiled 64-bit Windows DLL of SQLite.
However, compiling it yourself is trivial: just download the amalgamation and add the .c file to your project; there are no additional configuration steps or requirements.
If you do not wish to link the library statically (or compile it directly into your application as suggested in the only answer available here so far), you can use the short tutorial I created recently. The binaries are available there as well if you need them. It uses MS VS 2015. A long time passed since your original question, but maybe someone else can find this useful.
Edit: As somebody stated below, simply providing the link is not enough, so just briefly the basics of the tutorial: You have to download the amalgamation source code from the original SQLite page and you can compile dll from it in your visual studio, but crucial is to set proper pre-processor directives for the compiler:
SQLITE_ENABLE_FTS4=1
SQLITE_ENABLE_RTREE=1
SQLITE_ENABLE_COLUMN_METADATA=1
SQLITE_API=__declspec(dllexport)
Especially last one is the one which makes your library usable. This information is not mentioned in the original instructions for building the library from the sources using the Microsoft toolchain.
I have some C++ code which uses boost's GIL image library, and wants to write files using boost::gil::png_write_view from boost/gil/extension/io/png_io.hpp. That header itself includes png.h, and of course results on a link dependency.
On Debian it compiles and links fine. If it did complain about anything missing, the necessary headers and libs would be a few seconds away via an aptitude install libpng-dev.
On Windows (VisualStudio 2008 on XP64), I'm having to face the idea that it looks like I'll have to build libpng from source (and so also its zlib dependency) myself. If there's an obvious packaging already out there, I'm not seeing it. Can anyone enlighten me if there is such a useful resource anywhere ?
Libpng's own packaging itself seems to supply project files for vc6 and VC7.1 (VS2003). And more recent releases also come with VC10 project files. But nothing for VC8(VS2005) or VC9(VS2008). However there are instructions here (which I've yet to try) which describe building for 2008 after running the 7.1 project files through the conversion wizard.
I did initally try the GnuWin32 build of libpng, but (apart from being 32 bit only) it crashed in a libpng call to fwrite when passed a FILE* from VS2008's CRT. libpng's own documentation has something to say about this and the perils of mixing different versions of MSVC but their suggested workround is only relevant to direct libpng users (and I'm using it via boost GIL).
Update: the converted project files do work pretty well (maybe some minor obvious fixups). By far the biggest part of the job was creating the 64bit builds; the original and converted project files don't include any such configuration and while visual studio will have a go at creating them, there was a fair amount of config dialog editing to get consistent folder/file names etc.
I've downloaded the midiIO library and in the readme it says:
edit the file Makefile.library and set the OSTYPE and OSSUBTYPE to match your hardware/os setup.
type "make library" to compile the library. It will be created as lib/libmidiio.a in unix.
edit the file Makefile.examples and set the OSTYPE and OSSUBTYPE to match your hardware/os setup.
Also, if you are using ALSA, then uncomment out the POSTFLAG to use the alsa library (-lasound).
type "make examples" to compile the example programs in the examples directory. The example programs will be place in the bin directory.
1 + 3 are fine but 2 + 4 are over my head. I've worked in a unix environment before and have used gcc with flags but I need to get this done in Windows. I typically use Visual Studio but don't know how to achieve this with that.. I've downloaded Dev-C++ if that's any use but I don't know what to do with the makefiles?
Ignore the makefiles and set up a fresh project in Visual C++. Make your target a static library (which will be a .lib file in Win32, not a .a file as in unix as you probably know). It is unlikely that the project will build out of the box, so you might have to deal with some compilation errors relating to unix-specific symbols. I took a quick look at the source code, and it looks fairly well-written, so I don't think you should have many problems building it directly in Windows.
Alternately, you could build the source using the real make tool in cygwin, but this means that you would need to distribute the cygwin library with your final product. This may or may not be more trouble than it's worth, especially if you are already using VC++ for the rest of your project's code.
ACE supplied solution file for Visual Studio, and there were solution files for static and dynamic liking.(ACE.sln and ACE_static.sln)
After they release 6.0, there was no static.sln anymore.
I can't understand. Why did they remove solution file for static? Is there a reason?
I'm putting predefined values for static build by myself. It's very annoying me.
Is there other convenient way?
I've just posted the same question on the comp.soft-sys.ace newsgroup where I got some help from one of the ACE developers:
ACE 6.0 Static Builds
Basically there's a Perl tool called MPC that's distributed with ACE that they use to compile all the build files (I haven't gotten it to work yet but then that's probably just something I'm doing wrong :)
Anyway if you open up the .sln files in Notepad you'll actually see the MPC command line used to build it near the top in the comments.
I just tried to compile ACE 6.3.1 on Win32. Instructions given at http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/ACE-INSTALL.html were bit confusing for me as there was no file ace.sln as mentioned in instructions. To generate the sln file, followed below steps using windows cmd -
Set env variable ACE_ROOT to complete path of ACE-src-6.3.1\ACE_wrappers
go to dir %ACE_ROOT%\ace
Run cmd as I was interested in VS 2010 solution file
perl %ACE_ROOT%\bin\mwc.pl -type vc10 ace.mwc
This has generated solution file inside ACE_ROOT/ace dir and I was able to compile the solution using VS2010 express edition.