Thread: Introducing Linux based C++ code in VC++

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

    Introducing Linux based C++ code in VC++

    Hi all,

    I need some help in properly compiling a library in VC++.
    Here is the scenario:

    I have a library, called miracl, which is natively windows based and I have compiled it in VC 2005 without any problems. I have the resulting library file which was generated during the build process.

    Now, I have another library, called PRL, whose functions I want to use.
    This PRL calls miracl headers and functions. The real problem is, that PRL is originally built for Linux, with the make file and gcc etc..

    What would be the best way to use the functions from PRL in my own VC++ code?

    1. Should I put all the codes from both PRL and miracl in a single project and compile.
    2. Or should I make another project for PRL and include the miracl library file.

    Actually, I tried both the things but VC++ gives me all types of syntax error..
    I feel I am definitely doing it the wrong way.


    Apologies for the lenthy and confusing post..

    Many thanks,

    Abhi

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Look at the makefile and see what files are used when compiling the thing. Are the errors from using Linux system calls? If so, translate to the Windows equivalent. Are the errors from trying to call miracl functions? If so, make sure the .lib file you created earlier is available.

  3. #3
    Registered User
    Join Date
    Oct 2009
    Posts
    7
    thanks tabstop..

    I 'll try this and will get back to u via this thread.

    Regards,

    abhi

  4. #4
    Registered User
    Join Date
    Oct 2009
    Posts
    7
    Hi,

    I tried including the PRL code in VC++ and also included the library file created for miracl..

    I m just trying a single file for PRL and it gives errors like this..

    error C3767: 'bits': candidate function(s) not accessible
    could be the friend function at < here it gives location of big.h> : : 'bits' [may be found via argument-dependent lookup]

    I have included the file big.h...
    i also put it manually in the folder which contains the PRL source...

    wht can be the problem?

    Regards,
    Abhi

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linux G++ Makefile (Or C++ Code)
    By NOX in forum C++ Programming
    Replies: 7
    Last Post: 10-05-2009, 11:34 AM
  2. writing dhcp client code using sockets on Linux
    By dash in forum Linux Programming
    Replies: 3
    Last Post: 08-04-2009, 10:20 AM
  3. Wireless Network Linux & C Testbed
    By james457 in forum Networking/Device Communication
    Replies: 3
    Last Post: 06-11-2009, 11:03 AM
  4. This code won't compile in Red Hat Linux 9
    By array in forum Linux Programming
    Replies: 7
    Last Post: 04-27-2004, 06:30 AM
  5. code to run (linux) programs WITH arguments
    By N8760 in forum C++ Programming
    Replies: 3
    Last Post: 12-27-2001, 03:35 PM