Need help with LNK error

This is a discussion on Need help with LNK error within the Windows Programming forums, part of the Platform Specific Boards category; Hi, when I build my project I got the following errors: main3.obj : error LNK2031: unable to generate p/invoke for ...

  1. #1
    Registered User
    Join Date
    Oct 2009
    Posts
    8

    Need help with LNK error

    Hi, when I build my project I got the following errors:

    main3.obj : error LNK2031: unable to generate p/invoke for "extern "C" unsigned char * __clrcall SHA1(unsigned char const *,unsigned int,unsigned char *)" (?SHA1@@$$J0YMPAEPBEIPAE@Z); calling convention missing in metadata
    main3.obj : error LNK2028: unresolved token (0A000012) "extern "C" unsigned char * __clrcall SHA1(unsigned char const *,unsigned int,unsigned char *)" (?SHA1@@$$J0YMPAEPBEIPAE@Z) referenced in function "int __clrcall openssl(unsigned long,unsigned long)" (?openssl@@$$FYMHKK@Z)
    main3.obj : error LNK2019: unresolved external symbol "extern "C" unsigned char * __clrcall SHA1(unsigned char const *,unsigned int,unsigned char *)" (?SHA1@@$$J0YMPAEPBEIPAE@Z) referenced in function "int __clrcall openssl(unsigned long,unsigned long)" (?openssl@@$$FYMHKK@Z)
    E:\VHDL_work\communication\Communication_Control_P anel\Debug\Communication_Control_Panel.exe : fatal error LNK1120: 2 unresolved externals

    I have already set Linker input option correct, so I can't see where those errors are coming from, can someone help me or give a point ?
    I'm using MS Visual S C++2005

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,851
    Already asked and answered in another thread.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 09:18 PM
  2. Testing some code, lots of errors...
    By Sparrowhawk in forum C Programming
    Replies: 48
    Last Post: 12-15-2008, 04:09 AM
  3. Making C DLL using MSVC++ 2005
    By chico1st in forum C Programming
    Replies: 26
    Last Post: 05-28-2008, 02:17 PM
  4. Avoiding Global variables
    By csonx_p in forum Windows Programming
    Replies: 32
    Last Post: 05-19-2008, 01:17 AM
  5. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21