Thread: 'LoadLibraryW' Error

  1. #1
    Registered User
    Join Date
    Jul 2008
    Posts
    4

    'LoadLibraryW' Error

    HI ,
    I am trying to compile a code ( that runs in Dev C++) with visual c++ 2008 but it doesnt like to do it and makes complaint that:

    1>d:\main data folder\drosophila_project\myod-for-georgy\myod\myod\common-binding-sites.cpp(27) : error C2664: 'LoadLibraryW' : cannot convert parameter 1 from 'const char [8]' to 'LPCWSTR'

    I have no idea what this means and what to do?
    Any Idea please?
    Hash-mobtadi

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Yes, you are mixing "ascii" with "unicode" - either add L to your text, or turn off Unicode in the compile options. E.g. L"Mydll.dll".

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

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, 08:18 PM
  2. An error is driving me nuts!
    By ulillillia in forum C Programming
    Replies: 5
    Last Post: 04-04-2009, 09:15 PM
  3. Making C DLL using MSVC++ 2005
    By chico1st in forum C Programming
    Replies: 26
    Last Post: 05-28-2008, 01:17 PM
  4. Connecting to a mysql server and querying problem
    By Diod in forum C++ Programming
    Replies: 8
    Last Post: 02-13-2006, 10:33 AM
  5. Couple C questions :)
    By Divx in forum C Programming
    Replies: 5
    Last Post: 01-28-2003, 01:10 AM