The worst thing about C++ in my opinion is trying to use a library (with VS2010 at least). It always causes me great pain, and usually I am not met with success.

So, I'm trying to use the Magick++ library, which is a part of the ImageMagick program, and I tried following the source installation instructions and was not successful. Ideas anyone?

define "not successful"

I don't have much to offer, I'm afraid, beyond agreeing that I had a great deal of trouble getting Magick++ to work; not just with Win, but also on Linux. The information about which libraries to actually link was not as easy to find as I might have hoped, and ended up relying on adding a command to the compiler call that itself returned a list of libraries to be linked. They found a way to take the simple, elegant way of linking to a library using g++ (i.e. add "-l" and the name of the library file) and made it difficult. I expect they had good reason.

In the end, I gave up and switched to a different image library.

Disclaimer; this was probably around four or five years ago, so for all I know it's all far better now than it was.

Not successful means I built it successfully (I think) and added include and lib paths, and got compilation errors when trying to build a simple hello magick++ app. Definitely a bunked include path, have no idea how to fix it.

>>Definitely a bunked include path

Try to locate the header files manually in the hard-drive. Possibly, add all the sub-directories to the include path list. Make sure you have all the dependencies met.

did you install the headers manually and library manually or through an installer? ehh I wish windows had a /usr/include directory. As far as image libraries libpng is pretty good for well png's this might also be worth looking into Cimg it was first on the list for a google search indicating that it has a high number of views.

Thanks guys I'll try to work something out, good ideas too.

I'm not one to push anything on anyone but have you considered using Code::Blocks as an IDE its less M$-esque than VS meaning that its simpler(well a ton more easy to navigate than VS in my opinion) it doesn't lack in any feature that VS has except VS's Winforms and the M$ logo :P

sorry for bumping but Code::blocks is at least worth noting(although you could just use cygwin or mingw (essentially gcc for windows but cygwin comes with a linux-esque environment terminal))

I'm not one to push anything on anyone but have you considered using Code::Blocks as an IDE its less M$-esque than VS meaning that its simpler(well a ton more easy to navigate than VS in my opinion) it doesn't lack in any feature that VS has except VS's Winforms and the M$ logo :P

sorry for bumping but Code::blocks is at least worth noting(although you could just use cygwin or mingw (essentially gcc for windows but cygwin comes with a linux-esque environment terminal))

What about code snippets? Refactoring tools? I actually use C++/CLI too. A task list? Disassembly output? Class Diagrams? I use C#, F#, and sometimes VB also, does Code::Blocks support these languages? Why would I want to switch to an environment that doesn't have a drag & drop designer, that seems like a pretty stupid thing to do when using C# or VB. Also, C++/CLI is a pretty powerful language, allowing me to use the .NET framework as well as native C++, I don't really want to do without.

What about code snippets? Refactoring tools? I actually use C++/CLI too. A task list? Disassembly output? Class Diagrams? I use C#, F#, and sometimes VB also, does Code::Blocks support these languages? Why would I want to switch to an environment that doesn't have a drag & drop designer, that seems like a pretty stupid thing to do when using C# or VB. Also, C++/CLI is a pretty powerful language, allowing me to use the .NET framework as well as native C++, I don't really want to do without.

Ahh. Much to learn, you have. My young Padawan...

On a more serious note, different tasks require different tools. You seem to be happy with the tool you have, for the tasks that you do. It doesn't mean others would find VS appropriate for theirs. For example, by my perspective:

>>code snippets?
Useless. I need neither example codes, nor pre-made start-up code, I don't think any experienced programmer would need them.

>>Refactoring tools?
Refactoring tools are over-rated. If your library is so big you cannot refactor it by hand, don't do so. If your library is not too big, refactor by hand, the result will usually be better (although I heard VS2010 is pretty good for automated refactoring).

>>C++/CLI
If not doing .NET, this is useless, and a nuisance.

>>task list?
An old fashion TO-DO list works fine, a doxygen-generated TODO list is also good. I file this under "bells and whistles".

>>Disassembly output?
I can't remember the last time I used a debugging tool, let alone inspecting disassembly listings. I write code that doesn't fail in any significant way, and the small problems I have are easily found with a few well placed console outputs.

>>Class Diagrams?
I mostly do generic programming, where class diagrams are not applicable. For the OOP I do, I have never found class diagrams (UML) to be useful. Doxygen-generated class diagram are fine by me, and most open-source software documentation.

>>I use C#, F#, and sometimes VB also, does Code::Blocks support these languages?
I don't. Why would I want an IDE that supports languages I don't need, and carries the weight of the software required to support them.

>>Why would I want to switch to an environment that doesn't have a drag & drop designer
If I need to do drag-drop design, I use a drag-drop designer. Why would I want to use an IDE to design a GUI? These are two different tasks and are best served by two different softwares, IMHO.

>>C++/CLI is a pretty powerful language
Isshh, I hate to hear that. But, in the sense that you mean it, I guess it is true. I personally have a problem with hybrid languages that mix semantics so much. If you have a clear idea of what is C++ and what is CLI, you are OK, but you need a-priori knowledge of both, but the line can get blurry for beginners, and that is a very bad thing, learning-wise.

>>I don't really want to do without.
It seems you have found the tool that is right for you. Good for you. Don't discard other options on the basis of what tasks you are doing.

Ahh. Much to learn, you have. My young Padawan...

On a more serious note, different tasks require different tools. You seem to be happy with the tool you have, for the tasks that you do. It doesn't mean others would find VS appropriate for theirs. For example, by my perspective:

>>code snippets?
Useless. I need neither example codes, nor pre-made start-up code, I don't think any experienced programmer would need them.

>>Refactoring tools?
Refactoring tools are over-rated. If your library is so big you cannot refactor it by hand, don't do so. If your library is not too big, refactor by hand, the result will usually be better (although I heard VS2010 is pretty good for automated refactoring).

>>C++/CLI
If not doing .NET, this is useless, and a nuisance.

>>task list?
An old fashion TO-DO list works fine, a doxygen-generated TODO list is also good. I file this under "bells and whistles".

>>Disassembly output?
I can't remember the last time I used a debugging tool, let alone inspecting disassembly listings. I write code that doesn't fail in any significant way, and the small problems I have are easily found with a few well placed console outputs.

>>Class Diagrams?
I mostly do generic programming, where class diagrams are not applicable. For the OOP I do, I have never found class diagrams (UML) to be useful. Doxygen-generated class diagram are fine by me, and most open-source software documentation.

>>I use C#, F#, and sometimes VB also, does Code::Blocks support these languages?
I don't. Why would I want an IDE that supports languages I don't need, and carries the weight of the software required to support them.

>>Why would I want to switch to an environment that doesn't have a drag & drop designer
If I need to do drag-drop design, I use a drag-drop designer. Why would I want to use an IDE to design a GUI? These are two different tasks and are best served by two different softwares, IMHO.

>>C++/CLI is a pretty powerful language
Isshh, I hate to hear that. But, in the sense that you mean it, I guess it is true. I personally have a problem with hybrid languages that mix semantics so much. If you have a clear idea of what is C++ and what is CLI, you are OK, but you need a-priori knowledge of both, but the line can get blurry for beginners, and that is a very bad thing, learning-wise.

>>I don't really want to do without.
It seems you have found the tool that is right for you. Good for you. Don't discard other options on the basis of what tasks you are doing.

By code snippets I mean pressing Tab at the right time and generating a stub for an event handler, an if-block, or something else, it saves time and it's less strain on my fingers. You may not know how to use the features of VS2010 properly.

Open a C# project, find an event you want to add a handler for, type this and then press tab twice: event += it generates a nice little event handler stub for you that throws a notimplementedexception, which of course you'll want to change.

@mike, BTW, what kind of setup are you using, and what kind of work are you doing?

>>By code snippets I mean pressing Tab at the right time and generating a stub for an event handler, an if-block, or something else,
Yeah, I know. I understand you can save typing with that. I personally find it annoying, and rarely useful. But I can understand that it is helpful for GUI code, because GUI library often require a bit of special code.

I do, however, value "code-completion" very much. This is when you type the first few letters of an identifier and the IDE gives a list of possible matches, and simply pressing tab or enter puts the rest of the name. That is very useful because it allows you to have long and descriptive variable names without additional typing effort. And, I would say, this is the primary reason that I use an IDE to code and not an enhanced text editor (like emacs or vim). The problem is, my code is heavily templated (generic programming and template meta-programming) which makes it very difficult for code-completion to work in a timely fashion. So far, I have only found KDevelop 4 to be able to keep up (both VS and Code.Blocks are just too slow and resource-hungry when code-completion is enabled when coding my stuff).

>>BTW, what kind of setup are you using,

Basically, quite opposite to yours. I code almost exclusively on Linux (Kubuntu 11.04). I use KDevelop as an IDE. I use a rolling version of GCC (by "rolling", I mean that I keep a copy of the GCC source code in sync with the svn repository, and I periodically bootstrap it ("bootstaping" means that the compiler recompiles a newer version of itself)), currently, I sync to the 4.6.2 experimental branch (4.7.0 is not quite ready yet). I use Qt Designer for any GUI I make (not very often), which is only a drag-and-drop GUI designer, not an IDE for coding. Then, I use "cmake" as a build system (which then uses "make" to drive the build). I use "git" as a version control system. I use valgrind for any memory debugging, but I rarely need to. I have not yet found the need for a real profiler, just using some simple macros. And I don't use a debugger, but I guess I would be using gdb if I ever need to do any non-trivial debugging (it is a nice perk of having coding experience, I hardly need to debug anymore, and when I do, it's solved very quickly). Finally, I use doxygen for document generation. And, of course, once in a while I'll need a simple text editor, in which case I use either "gedit" or "nano". Oh, and I use "sloccount" for counting lines of code (very nice little program).

That's about all I can think of as "my setup".

>>what kind of work are you doing?

Robotics. C++ programming is only a tool for me. I develop path-planning, control and estimation software for robots. A lot of that work is pen-and-paper mathematical derivations to come up with the "ultimate" or "optimal" algorithm for a particular robot. Then, I put all this math into C++ programs that run either on a robot or to control it remotely. I also do a fair amount of hardware (I am a "Mechanical Engineer", after all). Mostly, my coding involves multi-body dynamics simulations, model-based controllers, state estimators, sensor-fusion algorithms, and path-planners (both deterministic and probabilistic). But, of course, my code has to interface with reality, so I do code a fair amount of HAL (Hardware Abstraction Layer) software as well as other things like agent-based systems and asynchronous signals. More specifically, I have written code for a UAV, a rolling robot, a large industrial manipulator, a digging robot, a humanoid robot, and now, for a mobile manipulator, and a few small embedded systems as well.

When it comes to C++ code, I write standard compliant, cross-platform, light-weight software. The only dependency I admit are the Boost libraries and the C++ standard libraries, everything else is library code that I developed. If I use external libraries, it is always for specific applications, since my library code is generic, and I always isolate the external dependencies. I mostly do library code, using generic programming techniques, with a healthy dose of OOP and template meta-programming. This repo is my public git repo where I put some useful libraries of mine.

But, of course, my coding experiences go back quite a bit, and I have done many other kinds of things (computer games, encryption, GUIs, physics engines, AI, etc.). And my "setup" was quite different, for the different tasks, back then.

Someday I will be a scientist like you :)

(like i said I'm not pushing anything on you i just wanted you to know that there are other IDE's you don't have to chew my head off :P )
just a suggestion can't knock it if you haven't tried it and yes it does have a pretty good debugger if you get the package with mingw gdb is an excellent debugger.

By the way have fun with your whitespaceless F#. From all the sharps in there one would think you are playing the piano.


as far as VB goes it should be supported as far as syntax highlighting.
C::B isn't meant to autorun your scripts although it can be configured to do so.

but like mike said i don't use snippets i use the manual/documentation whatever you want to call it. :P

anyhow seems like your used to using a lot of VS so i'm not going to try to convert you i just wanted it to get out there.
Code blocks is less technical its a laymans IDE.


Actually in all truthfulness I don't even use an IDE I use vi or nano with the occasional makefile here or there :P

oh and mike
wc -l = lines in a file including blank lines on nix :P but i'm sure you know that :P

>>wc -l = lines in a file including blank lines on nix

Actually, I didn't know that (I don't know all *nix commands). I guess you are referring to my mention of sloccount to count the lines of code. This program is very different (try it), it doesn't just count the number of lines in a text file, it recognizes which kind of source code it is, disregards the comment-only lines (for whatever way comments are marked in the programming language of each file), disregards empty lines, and produces a true LOC count of for almost any programming language. It also produces nice little statistics and folder break-downs. It also evaluates the man-year measures and cost of software. So, it is no equivalent to "wc -l", if you count empty-lines and comments in your LOC count, you are grossly overestimating it.

I think I'll give C::B a try after all, and *nix too. I don't use *nix but I did actually know about the word count tool.

Will definately try it wc -l is good for using sed on particular lines :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.