Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Problem with Building My Own Project with Crypto++ (Probably Simple Newbie Issue)
Problem with Building My Own Project with Crypto++ (Probably Simple Newbie Issue) [message #1017059] Fri, 08 March 2013 19:15
Hal VaughanFriend
Messages: 1
Registered: March 2013
Junior Member
I don't know if I'm dealing with a total newbie problem, or if this is specific to Crypto++ or specific to Eclipse and the CDT, but I'd like to figure out how to build my project with Crypto++ included (or, prefferably, just the files I need to include).

I'm sure if I were more experienced in C++, I'd know just where to look to figure this out. I've been reading tutorials and code examples. While I'm new to C++, I have done a lot of work in Perl and Java. I can understand or work through a lot of the actual writing of code, but I'm still learning C++ syntax and dealing with issues around building a program.

In this case, I have a very simple program with just main() and a test subroutine. It builds and does a "Hello World" fine. I'm using the CDT in Eclipse 4.2.1 to do this. I'm on OS X 10.8.2. Eclipse is, by default, using gcc to compile and the MacOS X C++ Linker. (I'd like to use GNU tools for linking, too, just for consistency - using one set of tools, but I guess that doesn't really matter.) Crypto++ is 5.6.2.

Even though I know Crypto++ is complex, one reason I want to use this from the start is because I know as I get more and more advanced in C++, I won't outgrow it - I'll find more and more that I can use in it.

I imported Crypto++ into Eclipse as a project with a makefile and it builds successfully on its own.

The short of it is that I want to use Blowfish (which I've used before under Java) and, later, the DEFLATE/INFLATE features of Crypto++.

I've been doing a lot of searching on this, but I'm still confused. I thought I needed to add all the .o files to my current project by adding them in the Linker->Miscellaneous section under "Other Objects," and tried that, but then I still needed the header files, so I tried adding the .h files.

The problem was if I added blowfish.h, then I had to add more headers - and no matter what I did, it needed several dozen header files added. It seems like I can add either all the files (excluding testing, validating, and benchmarking files) or none. I can't just add a few. (This is using .o and .h files from the Crypto++ project.)

Then I found this example. I can't link (fewer than five posts so far), but it's at "groups.google.com/forum/?fromgroups=#!topic/cryptopp-users/QEkVYpNuj84". It's specifically for blowfish and uses a total of 5 includes from Crypto++:

#include "crypto521/cryptlib.h"
#include "crypto521/modes.h"
#include "crypto521/blowfish.h"
#include "crypto521/files.h"
#include "crypto521/hex.h"

I then tried adding a directory for Crypto++ within my project and copying over the .cpp and .h files listed above to that directory and using just those 5 includes. I didn't add any code to my program - just added the includes like shown above. I ran into the same thing. One include required more and more and more. I kept having problems with each header or .cpp file referencing symbols that it couldn't find or needing a .h file it couldn't find until I added the include statement. I had to add all the Crypto++ .h and .cpp files (again, excluding the testing, validating, and benchmarking files).

So I've tried using .o files that are in another project and have been built. I've also tried using the source files and headers within my project. In both cases, I need to add more and more files.

With all the .h and .cpp files from Crypto++ in the directory within my project, I always run into an error in salsa. I figure that is because I'm not making it with the Crypto++ makefile, so something is being left out.

My goal, for now, is to be able to build my program using only what is needed for using blowfish from Crypto++. From there, I'm used to namespaces and objects and classes and there are many examples to figure out how to use blowfish.

Is this an easy newbie problem because I just don't know the rules yet about building? If it's possible, I'd like to know what I need to be searching for or reading so I have a better understanding of how to work through things like this on my own.

And, of course, any immediate help is also greatly appreciated.
Previous Topic:help: cdt with cygwin g++ compile helloworld wrong
Next Topic:Assembly highlighting with intel syntax?
Goto Forum:
  


Current Time: Thu Apr 25 15:19:24 GMT 2024

Powered by FUDForum. Page generated in 0.03199 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top