Problems with DLLEXPORT while updating a program

This is a discussion on Problems with DLLEXPORT while updating a program within the C++ Programming forums, part of the General Programming Boards category; I have a program that builds an executable file, which in turn calls DLL functions through a import file (*.lib). ...

  1. #1
    Registered User
    Join Date
    Sep 2008
    Posts
    1

    Problems with DLLEXPORT while updating a program

    I have a program that builds an executable file, which in turn calls DLL functions through a import file (*.lib). All the DLL functions are declared in a h-file.

    The *.lib, *.h and *.dll files are provided as a toolkit from a website and are continuously updated (every year or so). My program works fine but I need to update it using the latest toolkit version. When I tried to do it, I merely replaced the old files with the new ones. However, when I try to rebuild my executable, I get the following error message 55 times:

    "error C4430: missing type specifier - int assumed. Note: C++ does not support default-int"

    The compiler points to the entire section in the *.h file where 55 DLL functions are declared. I observed and compared the "old" vs the "new" h-files, which are basically the same, except for the referred section that has changed the way DLL functions are declared. I add one line as an example:

    NEW h-FILE contains:

    ************************************************** *******
    int DLLEXPORT ENepanet(char *, char *, char *, void (*) (char *));
    ************************************************** *******

    Whereas OLD h-FILE has

    ************************************************** *******
    EXTERN int CALLTYPE ENepanet(char *, char *, char *, void (*) (char *));
    ************************************************** *******

    I sort of know what DLLEXPORT does; however, I usually do not deal with the files that are provided from the website (I do not even touch them, I only use them). Rather, I deal with projects that use the provided DLL functions. I think I am missing one declaration on the top of my main cpp-file in order to account for that change. I should add that I DID NOT MODIFY MY MAIN CPP-FILE AT ALL.

    I will really appreciate any help. Thanks in advance,

    Pirata

  2. #2
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Hmmm usually when I get this specific type of error its because I need to do a make clean or rebuild project or whatever you need to do for recompiling your whole project. Also, perhaps you need to have __declspec(dllimport) defined as something and denoted in your header files.

  3. #3
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,543
    Or perhaps EXTERN or DLLEXPORT is defined to something you don't want.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  4. #4
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    try using _declspec(dllexport) instead.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Program Plan
    By Programmer_P in forum C++ Programming
    Replies: 0
    Last Post: 05-11-2009, 01:42 AM
  2. having problems with my card program
    By mac025 in forum C Programming
    Replies: 4
    Last Post: 01-31-2006, 03:26 PM
  3. GPA Program Problems
    By Clint in forum C Programming
    Replies: 3
    Last Post: 04-28-2005, 10:45 AM
  4. structure problems in windows program.
    By Bajanine in forum Windows Programming
    Replies: 3
    Last Post: 04-19-2004, 06:18 PM
  5. fopen();
    By GanglyLamb in forum C Programming
    Replies: 8
    Last Post: 11-03-2002, 11:39 AM

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