Click here to Skip to main content
15,892,289 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I downloaded this magnificent class from this web, but when I'm going to compile the project I get a compilation error saying:
Definements.h:42:25: error: conflicting declaration ‘typedef unsigned int DWORD'
windef.h:117:27: error: ‘DWORD’ has a previous declaration as ‘typedef long unsigned int DWORD’
Definements.h:45:25: error: conflicting declaration ‘typedef unsigned int ULONG’
windef.h:25:27: error: ‘ULONG’ has a previous declaration as ‘typedef long unsigned int ULONG’

These are my includes:
C#
#include <string>
#include <windows.h>
#include <FtpClient.h>
#include <sstream>
#include <fstream>
#include <iostream>
#include <stdio.h>
#include <cstdlib>

I'm not sure what can I do. Any solution is welcome.

Thank you very much!
Posted
Updated 19-Oct-13 2:39am
v3

Edit the .h file where the duplicate error occurs.

Wrap the duplicate declaration(s) with #ifndef and #endif.

Example
C++
#ifndef 
typedef unsigned int DWORD
#endif
 
Share this answer
 
v2
According to this table Data Type Ranges[^], the two definitions are compatible, hence you may safely follow Mike Meinz's advice and keep just one of them.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900