Hi lcli,

> /usr/lib/gcc/i386-redhat-linux/4.3.0/../../../crt1.o: In function
> `_start':
> (.text+0x18): undefined reference to `main'
> collect2: ld returned 1 exit status
ld is the linker. It states it cannot find the customary entry point main().

Crypto++ provides des.cpp and des.h. Presumably, you are also
providing a des.cpp which offers main().

I'm not a *nix user. But the first thing I would do is stop playing
games with file names. Name the file which contains the entry point
main.cpp. Alternately you could make with .\des.cpp to explicitly
state you want your version of des.cpp. Finally, if your program must
be named des.exe [or des or des.out], provide a main.cpp and use a
linker switch to change the output name.

Otherwise, step up the verbosity of the compile/link process so that
you can verify that des.cpp is your implementation of des (with a
main), and not Crypto++'s implementation.

Jeff

On 2/20/09, lcli <[email protected]> wrote:
>
> When I build and link:
> g++ -o des des.o -L. -lcryptopp
>
> error messages:
>
> /usr/lib/gcc/i386-redhat-linux/4.3.0/../../../crt1.o: In function
> `_start':
> (.text+0x18): undefined reference to `main'
> collect2: ld returned 1 exit status
>
>
> [ SNIP ]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---

Reply via email to