G
Guest
Hi there,
I have built a DLL in Visual C++ 6. When I build the DLL it builds fine for
the debug version of the DLL (and this DLL works fine), however, I seem
unable to build a Release version of the DLL. If I do a 'Batch Build' and
select both Debug and Relase versions for building it will build the debug
version but throws up errors for the Release version. For example, the output
I get for a Batch Build is this -
--------------------Configuration: DartmNowWebSvcs - Win32
Release--------------------
Compiling resources...
Compiling...
StdAfx.cpp
Compiling...
DartmNowWebSvcs.cpp
H:\WEBSERVICES\DartmNowWebSvcs\DartmNowWebSvcs.cpp(109) : error C2491:
'ProcessData' : definition of dllimport function not allowed
H:\WEBSERVICES\DartmNowWebSvcs\DartmNowWebSvcs.cpp(344) : error C2491:
'FreeOutData' : definition of dllimport function not allowed
H:\WEBSERVICES\DartmNowWebSvcs\DartmNowWebSvcs.cpp(363) : error C2491:
'DisplayConfig' : definition of dllimport function not allowed
H:\WEBSERVICES\DartmNowWebSvcs\DartmNowWebSvcs.cpp(417) : error C2491:
'GetDLLVersion' : definition of dllimport function not allowed
H:\WEBSERVICES\DartmNowWebSvcs\DartmNowWebSvcs.cpp(450) : error C2491:
'GetDLLVersionH' : definition of dllimport function not allowed
DlgConfig.cpp
Generating Code...
Error executing cl.exe.
DartmNowWebSvcs.dll - 5 error(s), 0 warning(s)
--------------------Configuration: DartmNowWebSvcs - Win32
Debug--------------------
Compiling resources...
Compiling...
StdAfx.cpp
Compiling...
DartmNowWebSvcs.cpp
DlgConfig.cpp
Generating Code...
Linking...
Creating library Debug/DartmNowWebSvcs.lib and object
Debug/DartmNowWebSvcs.exp
DartmNowWebSvcs.dll - 0 error(s), 0 warning(s)
I dont believe the code is wrong because I used the code from a template DLL
app and the template is written the same and gives no errors for a Release
build. Thus, it must be due to a link problem but after checking and checking
the Project Settings I can see no difference with the Settings? Unless I'm
missing a setting somwhere? Any advice offered much appreciated.
Thanks,
David
I have built a DLL in Visual C++ 6. When I build the DLL it builds fine for
the debug version of the DLL (and this DLL works fine), however, I seem
unable to build a Release version of the DLL. If I do a 'Batch Build' and
select both Debug and Relase versions for building it will build the debug
version but throws up errors for the Release version. For example, the output
I get for a Batch Build is this -
--------------------Configuration: DartmNowWebSvcs - Win32
Release--------------------
Compiling resources...
Compiling...
StdAfx.cpp
Compiling...
DartmNowWebSvcs.cpp
H:\WEBSERVICES\DartmNowWebSvcs\DartmNowWebSvcs.cpp(109) : error C2491:
'ProcessData' : definition of dllimport function not allowed
H:\WEBSERVICES\DartmNowWebSvcs\DartmNowWebSvcs.cpp(344) : error C2491:
'FreeOutData' : definition of dllimport function not allowed
H:\WEBSERVICES\DartmNowWebSvcs\DartmNowWebSvcs.cpp(363) : error C2491:
'DisplayConfig' : definition of dllimport function not allowed
H:\WEBSERVICES\DartmNowWebSvcs\DartmNowWebSvcs.cpp(417) : error C2491:
'GetDLLVersion' : definition of dllimport function not allowed
H:\WEBSERVICES\DartmNowWebSvcs\DartmNowWebSvcs.cpp(450) : error C2491:
'GetDLLVersionH' : definition of dllimport function not allowed
DlgConfig.cpp
Generating Code...
Error executing cl.exe.
DartmNowWebSvcs.dll - 5 error(s), 0 warning(s)
--------------------Configuration: DartmNowWebSvcs - Win32
Debug--------------------
Compiling resources...
Compiling...
StdAfx.cpp
Compiling...
DartmNowWebSvcs.cpp
DlgConfig.cpp
Generating Code...
Linking...
Creating library Debug/DartmNowWebSvcs.lib and object
Debug/DartmNowWebSvcs.exp
DartmNowWebSvcs.dll - 0 error(s), 0 warning(s)
I dont believe the code is wrong because I used the code from a template DLL
app and the template is written the same and gives no errors for a Release
build. Thus, it must be due to a link problem but after checking and checking
the Project Settings I can see no difference with the Settings? Unless I'm
missing a setting somwhere? Any advice offered much appreciated.
Thanks,
David